Chuck's capture of Midi broken?
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion). The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding. I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators): 20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0 Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability): Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32 Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable... Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-) Thanks! Daniel
Hello Daniel,
I can't say I'm seeing the same thing; if I add
<<
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Here's the same with miniAudicle->File->Open Example->MIDI->gomidi
144 42 97
128 42 19
144 44 72
128 44 2
144 46 97
128 46 30
144 42 21
144 44 27
144 46 14
128 46 61
128 44 62
128 42 36
On Sun, Sep 14, 2014 at 10:12 PM, Michael Heuer
Hello Daniel,
I can't say I'm seeing the same thing; if I add
<<
>>; to the MIDI controller class here (at line 155)
https://github.com/heuermh/lick/blob/master/AlesisQX25.ck
and run this example
https://github.com/heuermh/lick/blob/master/examples/alesisQX25Example.ck
For three separate notes
"ready" : (string) 29634816.000000 144 46 9 keyOn 46 9 29639168.000000 128 46 15 keyOff 46 29665024.000000 144 44 20 keyOn 44 20 29669120.000000 128 44 12 keyOff 44 29695488.000000 144 42 39 keyOn 42 39 29701376.000000 128 42 11 keyOff 42
three played legato slowly
29774336.000000 144 46 19 keyOn 46 19 29796864.000000 144 44 27 keyOn 44 27 29821184.000000 144 42 33 keyOn 42 33 29850880.000000 128 46 55 29850880.000000 128 44 36 keyOff 46 keyOff 44 29851136.000000 128 42 44 keyOff 42
and three played legato quickly
29971200.000000 144 46 14 keyOn 46 14 29972992.000000 144 44 78 keyOn 44 78 29976576.000000 144 42 83 keyOn 42 83 30014976.000000 128 46 56 keyOff 46 30015744.000000 128 44 55 keyOff 44 30016000.000000 128 42 39 keyOff 42
The first column is counting off samples at 44.1 kHz so the key on/off events aren't coming as fast as they are in your example though. Maybe if I could play keys better. :)
And I'm running on OSX 10.9 with chuck built from source, which reports its version as chuck version: 1.3.5.0-beta-4 (chimera).
michael
On Fri, Sep 12, 2014 at 7:43 PM, Daniel Chapiro
wrote: Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hi Michael, Thanks a lot for checking this with AlesisQX25 and with gomidi. Clearly you are also interleaving the ON/OFFs, but you are getting all the events properly. Since both the midi capture tool I used, and the Wivi synthesizer catch all events, I had assumed the interleaving was triggering a bug in Chuck, but it has to be something else. I'll do some more experiments. Daniel On Sep 14, 2014, at 8:16 PM, Michael Heuer wrote:
Here's the same with miniAudicle->File->Open Example->MIDI->gomidi
144 42 97 128 42 19 144 44 72 128 44 2 144 46 97 128 46 30
144 42 21 144 44 27 144 46 14 128 46 61 128 44 62 128 42 36
On Sun, Sep 14, 2014 at 10:12 PM, Michael Heuer
wrote: Hello Daniel,
I can't say I'm seeing the same thing; if I add
<<
>>; to the MIDI controller class here (at line 155)
https://github.com/heuermh/lick/blob/master/AlesisQX25.ck
and run this example
https://github.com/heuermh/lick/blob/master/examples/alesisQX25Example.ck
For three separate notes
"ready" : (string) 29634816.000000 144 46 9 keyOn 46 9 29639168.000000 128 46 15 keyOff 46 29665024.000000 144 44 20 keyOn 44 20 29669120.000000 128 44 12 keyOff 44 29695488.000000 144 42 39 keyOn 42 39 29701376.000000 128 42 11 keyOff 42
three played legato slowly
29774336.000000 144 46 19 keyOn 46 19 29796864.000000 144 44 27 keyOn 44 27 29821184.000000 144 42 33 keyOn 42 33 29850880.000000 128 46 55 29850880.000000 128 44 36 keyOff 46 keyOff 44 29851136.000000 128 42 44 keyOff 42
and three played legato quickly
29971200.000000 144 46 14 keyOn 46 14 29972992.000000 144 44 78 keyOn 44 78 29976576.000000 144 42 83 keyOn 42 83 30014976.000000 128 46 56 keyOff 46 30015744.000000 128 44 55 keyOff 44 30016000.000000 128 42 39 keyOff 42
The first column is counting off samples at 44.1 kHz so the key on/off events aren't coming as fast as they are in your example though. Maybe if I could play keys better. :)
And I'm running on OSX 10.9 with chuck built from source, which reports its version as chuck version: 1.3.5.0-beta-4 (chimera).
michael
On Fri, Sep 12, 2014 at 7:43 PM, Daniel Chapiro
wrote: Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Is it possible that your WX5 is in some kind of monophonic mode? Look at the time stamps on your MIDI Monitor output: 20:34:33.*207* From In Note On 1 F2 30 20:34:33.*208* From In Note Off 1 E2 0 20:34:33.*534* From In Note On 1 G2 30 20:34:33.*535* From In Note Off 1 F2 0 Your note-offs are always just one tick after the next note-on; that is, essentially simultaneous. There's certainly no audible overlap. Joel On 09/12/2014 07:43 PM, Daniel Chapiro wrote:
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hi Joel, The WX5 controller is monophonic, and one plays it like a sax (should/can I tell Chuck anything about it being monophonic?). I hadn't noticed before that the timing is so close: it's what the WX5 does when one plays a new note without having broken the stream of air (regardless of how slowly). Wivi (Wallander Virtual Instruments synthesizer, meant for wind controllers) uses this info to choose a legato articulation. Midi monitor catches all the events too, but you are right that they are fast. However, since all the succeeding CCs do appear correctly in gomidi, it seems that Chuck is not losing the synchronization. Hence, if the problem is strictly raw speed, shouldn't at least later Key ON events show up? Thanks, Daniel On Sep 14, 2014, at 9:14 PM, Joel Matthys wrote:
Is it possible that your WX5 is in some kind of monophonic mode? Look at the time stamps on your MIDI Monitor output: 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 Your note-offs are always just one tick after the next note-on; that is, essentially simultaneous. There's certainly no audible overlap.
Joel
On 09/12/2014 07:43 PM, Daniel Chapiro wrote:
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
I wonder if there is something about the fact that the note-on and note-off messages come in fast succession that causes ChucK to miss them or conflate them. I'm just guessing here, but it's possible that instead of two 3-byte messages, ChucK is reading them as one 6-byte message, which can't get parsed properly. (Are MIDI messages parsed at sample rate? I don't know; it seems unlikely. But you could try running ChucK at a much higher sample rate and see what happens.) If you're feeling ambitious, you could try recompiling ChucK with a printf in midiio_rtmidi.cpp to see how many bytes are being received. Joel On 09/15/2014 12:11 AM, Daniel Chapiro wrote:
Hi Joel,
The WX5 controller is monophonic, and one plays it like a sax (should/can I tell Chuck anything about it being monophonic?). I hadn't noticed before that the timing is so close: it's what the WX5 does when one plays a new note without having broken the stream of air (regardless of how slowly).
Wivi (Wallander Virtual Instruments synthesizer, meant for wind controllers) uses this info to choose a legato articulation. Midi monitor catches all the events too, but you are right that they are fast.
However, since all the succeeding CCs do appear correctly in gomidi, it seems that Chuck is not losing the synchronization. Hence, if the problem is strictly raw speed, shouldn't at least later Key ON events show up?
Thanks, Daniel
On Sep 14, 2014, at 9:14 PM, Joel Matthys wrote:
Is it possible that your WX5 is in some kind of monophonic mode? Look at the time stamps on your MIDI Monitor output: 20:34:33.*207* From In Note On 1 F2 30 20:34:33.*208* From In Note Off 1 E2 0 20:34:33.*534* From In Note On 1 G2 30 20:34:33.*535* From In Note Off 1 F2 0 Your note-offs are always just one tick after the next note-on; that is, essentially simultaneous. There's certainly no audible overlap.
Joel
On 09/12/2014 07:43 PM, Daniel Chapiro wrote:
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu mailto:chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On Sep 14, 2014, at 10:38 PM, Joel Matthys wrote:
I wonder if there is something about the fact that the note-on and note-off messages come in fast succession that causes ChucK to miss them or conflate them.
Given that Michael's test worked fine, your point about the fast succession somehow might be it.
I'm just guessing here, but it's possible that instead of two 3-byte messages, ChucK is reading them as one 6-byte message, which can't get parsed properly. (Are MIDI messages parsed at sample rate? I don't know; it seems unlikely.
I agree, because I would assume that a lower layer is buffering the messages, and passing them properly to Chuck.
But you could try running ChucK at a much higher sample rate and see what happens.)
If you're feeling ambitious, you could try recompiling ChucK with a printf in midiio_rtmidi.cpp to see how many bytes are being received.
Joel
So thanks again Joel and Michael! Now I have several things I can try to narrow down the problem. Best, Daniel
On 09/15/2014 12:11 AM, Daniel Chapiro wrote:
Hi Joel,
The WX5 controller is monophonic, and one plays it like a sax (should/can I tell Chuck anything about it being monophonic?). I hadn't noticed before that the timing is so close: it's what the WX5 does when one plays a new note without having broken the stream of air (regardless of how slowly).
Wivi (Wallander Virtual Instruments synthesizer, meant for wind controllers) uses this info to choose a legato articulation. Midi monitor catches all the events too, but you are right that they are fast.
However, since all the succeeding CCs do appear correctly in gomidi, it seems that Chuck is not losing the synchronization. Hence, if the problem is strictly raw speed, shouldn't at least later Key ON events show up?
Thanks, Daniel
On Sep 14, 2014, at 9:14 PM, Joel Matthys wrote:
Is it possible that your WX5 is in some kind of monophonic mode? Look at the time stamps on your MIDI Monitor output: 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 Your note-offs are always just one tick after the next note-on; that is, essentially simultaneous. There's certainly no audible overlap.
Joel
On 09/12/2014 07:43 PM, Daniel Chapiro wrote:
Hi - I think that Chuck's Midi methods seem not to be working (except for very simple examples), as Chuck is dropping Midi events - I'm using the pre-compiled version of Chuck 1.3.0 (gidora), on a Mac Mini (2.7GHz I7), with OSX 10.7.5 (Lion).
The only type of ON/OFF sequence in which Chuck seems not to "swallow" any notes is of the form Note1 ON, Note1 OFF, Note2 ON, Note2 OFF… Instead, I'm generating Midi streams in which there are new note On events before the prior note goes off. They happen when I play legato with a Yamaha WX5 wind controller, but any Midi keyboard would also generate such sequences if one presses a new key before releasing another one that is already sounding.
I captured the following short sequence with the "MIDI Monitor" app (http://www.snoize.com/MIDIMonitor/). Also it sounds fine with different sound generators):
20:34:33.026 From In Note On 1 E2 22 20:34:33.030 From In Control 1 Breath Control (coarse) 20 20:34:33.036 From In Control 1 Breath Control (coarse) 25 20:34:33.041 From In Control 1 Breath Control (coarse) 27 20:34:33.071 From In Control 1 Breath Control (coarse) 29 20:34:33.182 From In Control 1 Breath Control (coarse) 30 20:34:33.207 From In Note On 1 F2 30 20:34:33.208 From In Note Off 1 E2 0 20:34:33.534 From In Note On 1 G2 30 20:34:33.535 From In Note Off 1 F2 0 20:34:33.664 From In Control 1 Breath Control (coarse) 32 20:34:33.845 From In Note On 1 A2 32 20:34:33.846 From In Note Off 1 G2 0
Capturing the same with Chuck only shows the 1st Note ON (and all the CCs, which are correct), but the rest of the Note ONs/OFFs vanish (BTW, playing very slowly makes no difference). To make sure it was not some bug in my code, I captured the Midi using just Chuck's example in miniAudicle->File->Open Example->MIDI->gomidi (the numeric output is converted below, just for readability):
Note On E2 22 CC BC (msb) 20 CC BC (msb) 25 CC BC (msb) 27 CC BC (msb) 29 CC BC (msb) 30 CC BC (msb) 32
Only by fully ending each note before playing the succeeding one, all the Note ONs/OFFs show up. But that's not useable...
Any help on incantations for Chuck, workarounds, or a fix would be great! (particularly since after learning to ChucK from Rob Poor's Oxygen8, the rest of my ChucK code seems to be working nicely :-)
Thanks! Daniel
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
Daniel Chapiro
-
Joel Matthys
-
Michael Heuer