<div dir="ltr">On Thu, Dec 8, 2016 at 3:52 PM, Gonzalo <span dir="ltr">&lt;<a href="mailto:gonzalo@dense13.com" target="_blank">gonzalo@dense13.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I&#39;m using Bruce Murphy&#39;s MIDIsender class (<a href="http://www.rattus.net/%7Epackrat/audio/ChucK/files/midisender.ck" rel="noreferrer" target="_blank">http://www.rattus.net/~packra<wbr>t/audio/ChucK/files/midisender<wbr>.ck</a>) to generate MIDI from my Chuck code. I&#39;m sending this MIDI to various virtual MIDI ports (using OSX&#39;s IAC Driver). Then I have various software instruments in Cubase, each one listening to one of the virtual ports. Works well when I run my Chuck program, but if in Cubase I arm the tracks and try to record the incoming MIDI, all the events get &#39;collapsed&#39; at the same time, specifically the moment I click record. They do get recorded, but all starting at the same time.<br>
<br>
This only happens if I want to record them, if I&#39;m only playing, timing is fine.<br>
<br>
Using MidiMonitor I see that the time for all the MIDI events generated from Chuck is 0, that seems to be the issue. Any thoughts on how I can change that?<br></blockquote><div><br></div><div>MidiMsg is defined as a four byte record<br><br><a href="https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.h#L65">https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.h#L65<br></a><br></div><div>but ChucK only sets three bytes on send<br><br><a href="https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L120">https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L120<br></a><br></div><div><a href="http://midisender.ck">midisender.ck</a> does the same.  Is the unset byte supposed to be the time?  Suppose I should go read the spec.<br></div><div><br>It appears time is written and read from files separately<br><br><a href="https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L823">https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L823<br></a><a href="https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L837">https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L837<br></a></div><div><br></div><div>Not sure that helps,<br></div><div><br></div><div>   michael<br></div></div></div></div>