converting notein messages to bangs

    Feb 18 2010 | 1:56 am
    i started working on a patch which is in a very rough early stage. the idea is to receive midi note-in data and use it to control the display of jpegs or video clips in jitter.
    the problem is i can't work out how to turn messages from the notein object into bangs for note-on and note-off, for each specific note. so e.g. when you hit C-4 you have a bang somewhere for note on and one for note off, and likewise for other notes. so for example i could have a toggle switch for every note which exactly reflects the midi input messages
    i've looked at the help files and stripnote and flush but i still don't know how to do this. if someone could post a patch or suggest how i'd be most grateful

    • Feb 18 2010 | 2:03 am
      sounds like you need select. Say you want midi note 60 to trigger something, put the output from notein into a [sel 60]. Now you will get a bang for 60 at note-on and note-off. put a stripnote before the select to only get note-ons. select can have multiple arguments for multiple notes [sel 60 61 62 63 64 65 66 ...]
      hope this helps.
    • Feb 18 2010 | 2:05 am
      spray might also be useful
    • Feb 18 2010 | 2:25 am
      i had looked at select but i was worried about getting stuck notes, seeing as one missed bang and the whole thing would get reversed. it seems to work o.k. though. i'll take a look at spray also, maybe there is a better way.
    • Feb 18 2010 | 5:44 am
      I don't think you will "miss" a bang. I used some uzis to simulate "really" fast playing and nothing gets missed. I am not saying that there are no situation where you could miss a note. But if it gets into the select, chances are you will get a bang in return.