Sorry, total newbie question....
So if [midiin] has no inlet how can I dynamically change what midi channel to use?
Ie.
instead of hardcoding
[midiin 1]
Is there a way to do?
[midiin my_channel_choice]
Thanks
Change midi channel
Sorry, total newbie question....
So if [midiin] has no inlet how can I dynamically change what midi channel to use?
Ie.
instead of hardcoding
[midiin 1]
Is there a way to do?
[midiin my_channel_choice]
Thanks
[midiin] reads on all channels. You can use [midiparse] to decode and extract the channel number. One thing you can do is [pack] all the outputs to a list, reorder them with a message box, then use [route] to select data from specified channels.
[midiin]
|
[ midiparse ]
| | | | | | |
[pack f f f f f f f] <-- seventh element of list is channel number
|
[$7 $1 $2 $3 $4 $5 $6( <-- this says to put the seventh element in the list in the front
|
[route 1] <-- to get channel 1
|
[unpack f f f f f f]
ahhhh!!!
Maelstorm, i think you may have just helped me with a problem i had. Does [midiin] send the midi data one number at a time? i was expecting a list, so always wondered why it wasn't working.
Yep. It just sends each byte individually as a float.
Great! Thanks for your help.
Is there a noticeable difference in performance if I use [midiparse] to search for the channel I'm after rather than specifying which channel in [midiin]? Say if I was to do it more than a 100 times?
You can't specify the channel in [midiin]. It just sends a stream of all raw MIDI data coming from a port. That's why you need [midiparse].
Sorry, I meant [notein], although in this case I'm actually using [ctlin]
Is there a general view on whether it's better, performance wise, to just tap into the midi stream in one point, using [midiparse] or is it better to use [notein] and [ctlin], specifying the channels that you're looking for?
Ah. Well, if there is a difference, it's probably insignificant. But it's definitely less complicated to use [ctlin].
Oops! Looks like something went wrong!