Kyma Forum
  Kyma Support
  MIDI Clock Sync Example on the Twiki

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   MIDI Clock Sync Example on the Twiki
mk23
Member
posted 21 February 2012 04:32         Edit/Delete Message   Reply w/Quote
Hi everyone,
I've been trying some experiments with sending MIDI Clock sync from a Kyma sound with a sequencer to my external MIDIBox Sequencer. I started off with the OutputMIDITimingClock sound from the Twiki, but found some things I'm not sure about:

1) When I run the sound from the Twiki, MIDI Clock events start to be sent out from the Capybara, however I can't then stop them! I'm monitoring the MIDI out of the Capybara and even when the sound has been stopped (i.e. Ctrl-K) and DSP says nothing is running, I still get the MIDI Clock being sent. The only way to stop it is to reinitialise the DSP. Is that right?
I'm guessing this code in the Trigger field for the MIDIOutputBytes could be tweaked to only run when a VCS button is clicked:

code:

| time msPerMessage |

time := (EventVariable new initialValue: -1) readEveryMillisecond.
msPerMessage := (60 * 1000 / 24) / !BPM.

(time <~ (time + 1) ge: msPerMessage) true: (time <+ (time - msPerMessage)), 1 false: 0



but I'm not sure how to achieve that. Does anyone have any tips?

2) I have a button in my VCS which stops and starts my sequencers. I'm trying to use this button to also send a MIDI start message so that Kyma and the external sequencers start together. I tried creating a MIDIOutputInBytes, then putting !StartMasterClock button in to the trigger field and 0xFA as the bytes to be sent. So far this hasn't worked, any hints how to get it to work?

3) If I wanted to also send a MIDI Stop message (0xFC) when !StartMasterClock is 0, can I do something clever and just use the same MIDIOutputInBytes I'm using in 2? Could you suggest a way to do that, I can't get the toggling between states to work

Cheers

David

IP: Logged

SSC
Administrator
posted 21 February 2012 15:21         Edit/Delete Message   Reply w/Quote

MIDIclocksync.kym

 
Hi David,

See where you are incrementing time by 1?

(time <~ (time + 1)

What if, instead of incrementing time by 1, you instead increment it by !Gate? In other words:

time <~ (time + !Gate)

That way, when you switch off the !Gate (0), time will stop incrementing and your clock sync will stop generating ticks. (See attached example).

[This message has been edited by SSC (edited 21 February 2012).]

IP: Logged

SSC
Administrator
posted 21 February 2012 15:55         Edit/Delete Message   Reply w/Quote

MIDImasterclock.kym

 
For master clock, you could use something like this in the Bytes field:

{!StartMasterClock of: #(0xFC 0xFA)}

Or, alternatively something like this:

{!StartMasterClock true: 0xFA false: 0xFC}

You could send this whenever !StartMasterClock changes its value, for example, by setting the trigger field to:

!StartMasterClock hasChangedInLast: 0.1 s

IP: Logged

mk23
Member
posted 21 February 2012 16:22         Edit/Delete Message   Reply w/Quote
Hey SSC, Thanks a lot for the suggestions, I'll try them tomorrow when I'm in front of Kyma and report back.

My next question was going to be about precisely this line of code:
(time <~ (time + 1)
What is the <~ operator doing in that context? I'd Google it but the tilde character seems to confuse Google completely!

Cheers

David

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c