Thanks Michael,

This might be a bit over my head, but I'll look into it. Never checked Chuck's source code before, at the very least it'll be fun. :)

Gonzalo


On 08/12/16 23:28, Michael Heuer wrote:
On Thu, Dec 8, 2016 at 3:52 PM, Gonzalo <gonz...@dense13.com
<mailto:gonz...@dense13.com>> wrote:

    Hi,

    I'm using Bruce Murphy's MIDIsender class
    (http://www.rattus.net/~packrat/audio/ChucK/files/midisender.ck
    <http://www.rattus.net/%7Epackrat/audio/ChucK/files/midisender.ck>)
    to generate MIDI from my Chuck code. I'm sending this MIDI to
    various virtual MIDI ports (using OSX'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 'collapsed' at the same time, specifically the moment I
    click record. They do get recorded, but all starting at the same time.

    This only happens if I want to record them, if I'm only playing,
    timing is fine.

    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?


MidiMsg is defined as a four byte record

https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.h#L65

but ChucK only sets three bytes on send

https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L120

midisender.ck <http://midisender.ck> does the same.  Is the unset byte
supposed to be the time?  Suppose I should go read the spec.

It appears time is written and read from files separately

https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L823
https://github.com/ccrma/chuck/blob/master/src/midiio_rtmidi.cpp#L837

Not sure that helps,

   michael


_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


--
http://dense13.com
http://www.whole-play.com
https://www.30daygroove.com
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Reply via email to