Associate symbol with index in coll

    Feb 04 2013 | 2:52 am
    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?

    • Feb 04 2013 | 3:51 am
      to store data with a symbol as its index, use the message 'store' ie, the message:
      store cars 17
      will create a listing:
      cars, 17;
      to access the data you need to prepend the index with 'symbol', ie:
      symbol cars
      will return:
      btw all of this is explicitly stated in the coll help file, with functioning examples
    • Feb 04 2013 | 4:09 am
      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!
    • Feb 04 2013 | 4:26 am
      sorry I don't really understand what you are trying to do-- what sort of analysis are you trying to do?
    • Feb 04 2013 | 4:32 am
      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?
    • Feb 04 2013 | 4:49 am
      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.
    • Feb 04 2013 | 6:08 am
      here's one starting point (no coll, sel instead):
    • Feb 05 2013 | 1:29 am
      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?
    • Feb 05 2013 | 2:46 am
      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)...
    • Feb 10 2013 | 8:34 pm
      Thank you for the help everyone! It was greatly appreciated!