Why is [borax] delaying the next midi note?
I made a patch that takes PC keystroke values (mapped 1-17, with two separate inlets for KEYUP and KEYDOWN events), and converts them to raw midi data for use with [midiout]. When you send a keydown, the note sounds until a keyup event occurs. HOWEVER, for some strange reason, if you change the note, it takes TWO keypresses before it "switches" to that note!?
Just wondering what I'm doing wrong here...
After deleting the [borax] object and rewiring straight to the end, I found out it has to do with the [expr] object (which came BEFORE [borax]). For some reason, it's delaying the next result... ???
I've tried replacing it with [+ 35] but the same thing occurs.
Everything before the [expr] works perfectly. I press a key, and get a value from 1 to 17 going into inlet #1. I release that key, I get the same value coming from inlet #2. So is this some sort of bug? Is it working for anyone else?
Hi,
its more convenient to post patches that work by themselves - there's some patching required to actually test the patch you posted. But from looking at it the trigger order of pack is wrong - velocity triggers the pack & pitch comes "one late". Use t b i & prepend set to fix it or just use noteout instead of midiout.
One other thing to consider is that PC keyboards have a obscure hardware limit on how many keys can be presssed at one that can be annoying in this context.
Thanks, fixed it. As for the hardware limit, I just used the [keydown] and [keyup] objects to determine when to start/end notes. So at the bare minimum, in conjuction with [poly~], people should be able to play a chord or a triad.