I'm fairly new to PD, and have a behavior in a patch that I can't understand - perhaps someone can enlighten me. I've reduced the problem down to a simpler patch layout - see attached file. My goal is to read midiin messages from a file via a qlist object, and route them based on channel. I matched up unpack and pack objects to transpose the midiin arguments so I could subsequently route based on channel. But I think a bang event is firing on the pack before it has all the arguments - the first print statement is not the first message from my file. I tried even introducing a 1ms delay before sending the leftmost argument to pack, but that soon got out of sync. Also tried a few approaches storing in floats. Any suggestions? I'm sure it's a basic PD behavior that I just don't quite grasp yet.<br>
<br>Running the attached patch will show the sequence below. The print statement from the [route 4 1 2 3] object is displaying before the one from the [route notein], and the first value it shows - "42 0" - is not the first midiin message from my file - in fact it's the last.. <br>
<br>print: 42 0<br>print: notein 50 127 4<br>print: 50 127<br>print: notein 50 0 4<br>print: 50 0<br>print: notein 45 127 4<br>print: 45 127<br>print: notein 45 0 4<br>print: 45 0<br>print: notein 47 127 4<br>print: 47 127<br>
print: notein 47 0 4<br>print: 47 0<br>print: notein 42 127 4<br>print: 42 127<br>print: notein 42 0 4<br><br>Thanks much,<br><br>Chuck<br>