MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI-OX >> Scripting Questions >> Receiving Timing Clock messages?
(Message started by: nsfx on Mar 31st, 2010, 12:45am)

Title: Receiving Timing Clock messages?
Post by nsfx on Mar 31st, 2010, 12:45am
Is it possible to receive Timing Clock messages via a MoxScript object? I've tried both the polling and event methods, but I can't get Timing messages to pass on to the script. Note messages and CC messages get to the script just fine. I have midi transport enabled on my DAW outputting to Midi Yoke port 1, and I see these timing codes flying by in the MIDI-OX window on the correct MIDI port, but I can't get them to the script. Is there an option to enabled this or something? or am I missing something else?

Thanks!

Title: Re: Receiving Timing Clock messages?
Post by nsfx on Mar 31st, 2010, 1:04am
Just some extra info... If I connect In From Midi Yoke 1 -> Out To Midi Yoke 1, I see a few messages get to the script, but this creates MIDI feedback (as expected) and kills the script. I tried connecting In From Midi Yoke 1 --> Out To Midi Yoke 2 instead, and receiving input via the In From Midi Yoke 2 port in the script, but nothing appears! Can someone give an example on how to get a DAW time code to a MIDI-OX script using Midi Yoke? Thanks.

Title: Re: Receiving Timing Clock messages?
Post by Jamie OConnell on Apr 2nd, 2010, 5:46pm
MIDI Clocks come in pretty fast: 24 per MIDI beat (quarter note) -- speed is also dependent on tempo.  I think polling might be too slow to capture these with any timing accuracy, but the event method should see them.  What you would see in a script would be (assuming Event method):



dim nClocks

nClocks = 0

' . . .

Sub Sink_MidiInput( ts, port, stat, dat1, dat2)

  ' Count timing clock
  If stat = &hF8 Then
     nClocks = nClocks + 1
  End If

  ' send message back out all open ports
  mox.OutputMidiMsg -1, stat, dat1, dat2
     
End Sub


Title: Re: Receiving Timing Clock messages?
Post by nsfx on Apr 2nd, 2010, 9:03pm
Thanks for the reply Jamie. My problem isn't with the syntax -- I already have MIDI messages coming into the script via the event method. For some reason, *JUST* timing clock messages aren't making it to the script even though I see them in the monitor window. Any idea why that might happen?

Thanks again.

Title: Re: Receiving Timing Clock messages?
Post by nsfx on Apr 4th, 2010, 6:27pm
Alright. I finally figured it out. I don't remember setting these options, but in the "MIDI Filters..." window, System Realtime messages were being filtered out. I unchecked everything in this window and then it worked.



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.