Associate symbol with index in coll
I am trying to make a patch that will analyse a text document with a poem in it, then associate each letter with a number, then output that number consecutively. I am trying to do this with a coll by setting:
But I cant get it so the index is read as a symbol not a number. Is there a way to accomplish this? Or is there another object that would work better?
to store data with a symbol as its index, use the message ‘store’ ie, the message:
store cars 17
will create a listing:
to access the data you need to prepend the index with ‘symbol’, ie:
btw all of this is explicitly stated in the coll help file, with functioning examples
Sorry I must have missed that part in the help file but thank you, I am quite new to this.
I have edited my coll to include that but it will still not analyze my writing in the text object. When I hit the trigger I need it to go though the text document, letter for letter, then run those letters through the coll to assign a number to each letter then output that number in order.
I really appreciate any help you can offer! Thank you very much!
sorry I don’t really understand what you are trying to do– what sort of analysis are you trying to do?
Im trying to turn text/letters into number values so that I can then use those values to drive an arpeggiator. My goal here is to make a musical representation of a poem by linking letters to midi note values. I apologize if I am making this difficult for you to understand :( Maybe I am going at in all in the wrong way?
It sounds like you’re trying to turn words into strings of numbers? If so, you need to break the words into separate letters – when Max sees a string of letters together it treats it as a single symbol, not a string of individual letters. You’ll need to explicitly break the words into letters to do what I think you are trying to do. Have a look at [fromsymbol] and other related objects.
Hope this helps.
here’s one starting point (no coll, sel instead):
----------begin_max5_patcher---------- 883.3ocyYtsbaBCDF9Z6mBMbsaGjDhC8t9bzISG.q3nLfvCHmllL4cuvJH1t FObPXEeC1Rfj+2uU6pU32WuxIo3UdkC5GnegVs580qVAc0zwp11qbxieMMKt BdLmzh7btT4rQeOE+UEzOoqG4gbgLiqfGGeryhCptdca68wxcIP6u20iXKLY EIO+MRT2L9XgTIiy4vs9YoHN6z6TIdCtC93rrOVk9jPt62k7Tk13Hg02EQba dHDEZfquhdnYDerdcykMFh.7hiffkDAXOFX1ZT3QLhAIGTpB4DLXbOlGsa75 mS828bsTcRhk6bPOzYLk7pZfGqDExS8orHs2j17ga6kii5RDP8a8+D8pgtqe cHvyPDnciS.AmOh6ADvLDA3fohfyFggHHmWUEui2KCHilAjgCzufNCRFbjGX ZLbujYBYN70YOo54i.3C6+kRLrQDaB1NCxZRh.HRBvKos+4VGFRCbjknAQm7 fAQNLWiXwRj7.GXVxCb.ahIONeD2A4Ow9Fh.V3TQvYi3d.AidKjdLFJc4LFI +O054hn6xZYwQUb0DhxI8Xlz4DkuYl48b8zEH5CUKF8kWsHlLemLQmCm3c67 wukgJ46LzA6ZQGbaMv9vFZdTi7uWmIUYhTNBaFWhrOVhbWfk8WAKBUQbu.gN 1XgvY.DQ8IVmMOnDXAhm+sfG6KER0LN67I.weIOnb.XkzH8oDbMxjuVAeYB4 zBK5YU.yVk.6d5KNPeHfYW02UVCDqJDlESLmMGyDUJCHBA6c6hJfuL9fBZOm QZloMgsS2L6LFcKWXA2N3TwyPwnDTJZKhidDsC8DRf3pz9I1UJxnupLlAy53 0R84rfNs8jYXcRq9oNLwPtm+6c9ByXS+m6JpJNTl1Yls3AE9o71xqTBIbfhS dllWqG53AHdRrcKWdZd6shp3jLN.c2dWSLE43Mjb7rpbnCIGl8jy4Nh90i8b ViQMMuHLD1NzwcL5AaM8DNB4z7ddrEdp+kHCIm.qFZgGRN9VUNC5rrWj9nV6 XM0PFiZrWdmnQHmPqplAWH6NPXdtX69h5xyZ2EGSvemUu0i9+0.WWx0EsZ+S .vX1msNJB6lSMxdQoiZkn6c0NfC56saVC6kRkMlsimoZz08Fue+K7xp1oDDR 8gMdtnroo+FnoPpaBynSI+EQ2yGttY19X8+.5R+h0B -----------end_max5_patcher-----------
So I ended up setting it up with an atoi which changes the letters to ASCII numbers then running that through an iter so that I can receive the numbers consecutively. Its basically what I want to do, only problem is I am receiving the note numbers all at once and I only really hear the last note. How would I get it to send out the individual messages over time, like one message per second or something? I have tried speedlim and a few others but I cant seem to get it to work. Suggestions?
----------begin_max5_patcher---------- 863.3oc6X00aaBCE84jeEV7bVEluJr2p51SaUpRU6oooJmfSiaAajwzktp9e e1WfjrrhgDkj1IMIRH19xky83iu95773QNSEKokNnOh9NZznmGOZDzkoiQMs G4jSVNKiTBl4vTjoYTmI0CUPTyVv32cqjNSU6Frm6YtSPAdQla3HnENH7LWz OZdJVJ3Jwz6+.10asujjbphJukxg2g1F2lw35Qfmo0XdUNimQU.n7Z5TR32A lg8hWamnRssg0codpfViYGFW4LA4LU6.mUvrj8qs7FD62lRTj5mSGY++5s7B 8CyDyKiGa9Zx.kvb5O0RuVkjhtDTtNU7BxrGrnr888MZYuHLHvSfFtuttNIo 0QyEb0J46ERFI6U0v3MLesv6L28RGatcHolxBJMMikiVsXMiwoyDUb0lvoaN yGCYCBCgFAcvY96Hm4sKbFtKN6fxTLc9KaRnHOHcXBPGdmaSBEGdLkPmF5fK TT8an+EUAAvsPrMF47ncjQ72EFwceB6p7oVmv8BS1XBOz0Z340e3YcSxiV9j l8E2CBZZkRI3VHnDHkfWXbKyzM+DgsJ6Gn9d+ikNz34rTFiOWzeP1HB7rEjg I+CkDrJmxq5Mt8OutFPWqytgwuUp+1rD5b24M0B6bw2Pe5q2ft4ItZABaVCL w70EOPXnqt9KQXz0BoxxHdqFYtTjithrbCiW00ZqtRyznqkBzmWpiOtIl2dj K0AiTjst.0tVtBeNnRbxCTSp79yi6m.SxQ9VmpCOl4w6LY17LAA3m5ebHIHh RvrQNtvBArGrzOHxF4DbT2jqyD.YrxCKkTHA0X26L1HXpSNXpIzBmbTKEZe1 3OmVVRti9WQ8kYjmPrRzbljlhTBjYoChfJDJjZA0buDUURQyDZWffDAz7Bkt bZsm6UAEiqIq5pHiec1xO5cvVH.vfiIr0eu.Dbl9+S1sTTIm05p1jDH7p3Kk VpIIhhoqlXsQlJB2vnErzTJeycERYklMJR6dddmvi6Pvi6IAOlSK0Kd1hDey wSP36P94DgmjAfms.8wDOwCQOuEnOl3IHZ.3I9zMe4OD7DD89heLGg7DgGyo w5e80oS+DNj0WlCYrW3od6LRQwiTYYiOAnnKK3dgzzLZBzjwqaBdzQRej0Ze 3Xi2dY7uAfNYOUA -----------end_max5_patcher-----------
well if you look (more) carefully at the example I provided yesterday you’ll see I’ve already done that for you (using zl slice and reg)…
Thank you for the help everyone! It was greatly appreciated!