<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 14, 2014, at 10:38 PM, Joel Matthys wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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.<br></div></div></blockquote><div><br></div>Given that Michael's test worked fine, your point about the fast succession somehow might be it. &nbsp;&nbsp;</div><div><br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><div class="moz-cite-prefix">
      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. </div></div></blockquote><br></div><div>I agree, because I would assume that a lower layer is buffering the messages, and passing them properly to Chuck.</div><div><br></div><div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><div class="moz-cite-prefix">But you could try
      running ChucK at a much higher sample rate and see what happens.)<br>
      <br>
      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.<br>
      <br>
      Joel<br></div></div></blockquote><div><br></div>So thanks again Joel and Michael! &nbsp;Now I have several things I can try to narrow down the problem.</div><div><br></div><div>Best,</div><div>Daniel</div><div><br></div><div><br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><div class="moz-cite-prefix">
      <br>
      On 09/15/2014 12:11 AM, Daniel Chapiro wrote:<br>
    </div>
    <blockquote cite="mid:D4582EF0-175E-45B8-8AB6-6FD5F18E609D@gmail.com" type="cite">Hi Joel,
      <div><br>
      </div>
      <div>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).&nbsp;</div>
      <div><br>
      </div>
      <div>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.</div>
      <div><br>
      </div>
      <div>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?&nbsp;</div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div>Daniel</div>
      <div><br>
      </div>
      <div><br>
        <div>
          <div>On Sep 14, 2014, at 9:14 PM, Joel Matthys wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="moz-cite-prefix">Is it possible that your WX5
                is in some kind of monophonic mode? Look at the time
                stamps on your MIDI Monitor output:<br>
                <pre wrap="">20:34:33.<b>207</b>        From In        Note On        1        F2        30
20:34:33.<b>208</b>        From In        Note Off        1        E2        0
20:34:33.<b>534</b>        From In        Note On        1        G2        30
20:34:33.<b>535</b>        From In        Note Off        1        F2        0
</pre>
                Your note-offs are always just one tick after the next
                note-on; that is, essentially simultaneous. There's
                certainly no audible overlap.<br>
                <br>
                Joel<br>
                <br>
                On 09/12/2014 07:43 PM, Daniel Chapiro wrote:<br>
              </div>
              <blockquote cite="mid:0E36B0FA-FA03-4223-B2C2-46627EE9E05B@gmail.com" type="cite">
                <pre wrap="">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 (<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.snoize.com/MIDIMonitor/">http://www.snoize.com/MIDIMonitor/</a>). 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-&gt;File-&gt;Open Example-&gt;MIDI-&gt;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
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
              </blockquote>
              <br>
            </div>
            _______________________________________________<br>
            chuck-users mailing list<br>
            <a moz-do-not-send="true" href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
            <a class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
chuck-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users<br></blockquote></div><br></body></html>