rtmidi_default_callback:RtMidiCCallback   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm

Implementation

(bind-func rtmidi_default_callback:RtMidiCCallback
  "this is the 'default' callback - you should probably re-define it!"
  (let ((type:i8 0) (chan:i8 0) (a:i8 0) (b:i8 0))
    (lambda (time:double message:i8* message_size:i64 user_data:i8*)
      (set! type (>> (pref message 0) 4))
      (set! chan (& (pref message 0) 15))
      (set! a (pref message 1))
      (set! b (pref message 2))
      (printf "time = %f\ntype = %u\nchan = %u\na = %u\nb = %u\n---------------\n"
              time (i8toi32 type) (i8toi32 chan) (i8toi32 a) (i8toi32 b))
      void)))


Back to Index