Author |
Message |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 2073 Location: Berks County, PA
Audio files: 89
|
Posted: Wed Apr 28, 2010 2:36 pm Post subject:
MIDI clock versus tick Subject description: when is each used typically |
 |
|
I want to prep some software I have been writing / performing that is basically a MIDI algorithmic improvisation software instrument, to play nicely with other instruments at Pocono Skies in a few weeks. By nicely I mean in sync.
Should I focus on incorporating MIDI Clock based synchronization, or should I implement Tick based synchronization? What is more common for syncing live performance of multiple instruments?
If I have time I'll probably do both with the option of this instrument being either slave (default) or master for syncing. I want to make sure I hit the most common usage.
Thanks,
Dale _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
Back to top
|
|
 |
kkissinger
Stream Operator

Joined: Mar 28, 2006 Posts: 1427 Location: Kansas City, Mo USA
Audio files: 45
|
Posted: Fri Apr 30, 2010 10:52 am Post subject:
|
 |
|
My recommendation would be a tick that is sent at the smallest note value that the music requires. That is, if the smallest note value is a 16th note, then send a tick every 16th note. Raw MIDI CLOCK is sent as such a small note value (96 ticks per whole note) that is generally isn't useful without dividing it.
The problem with a faster tick is that there is no iron-clad guarantee that the slave synths clock dividers will divide in the same place -- that is, if you send out 32nd note ticks some synths will divide on the beat and others will divide on the "in between" beats and will be 1/32 note off.
Computers don't always make the best MIDI CLOCK sources -- they are subject to timing errors.
If you split your tick output to multiple synths you risk experiencing drop outs as more synths are connected to the tick. Thus, to send a tick to multiple instruments you will likely need to send the tick to a buffer/driver.
Similarly, with MIDI CLOCK, you will need a MIDI SPLITTER to address all the synthesizers.
If your ensemble has both MIDI (digital) synthesizers AND analog synths, then my suggestion is that you send MIDI CLOCK to all the digital synths and a selected analog synth. In turn, the selected analog synth with a MIDI to CV converter can receive the MIDI CLOCK, divide it to useful units, then send the divided MIDI CLOCK (in the form of ticks) to the other analog synths.
The other analog synths, in turn, can divide the ticks however they want to however the result will sound "together". If everyone divides the raw MIDI CLOCK you will not likely get a "tight" result.
Your software will need, in addition to MIDI CLOCK, to send a MIDI START command at the start of each piece so that everyone's sequencers and dividers will start in the same place.
You will need lots of time to experiment -- and would suggest to work methodically. Note that the timing/sequencing of the MIDI START may not be processed uniformly among synthesizers.
By way of example, I'll describe an issue that I encountered with my clock dividers...
My dividers have a reset input and my MIDI to CV converter outputs a reset pulse when it receives a MIDI START command. What happens as a result? Well, the MIDI START resets my clock divider to step '1' and then the next clock pulse advances the divider to step '2'. The problem is, if the clock pulse is meant to be step '1' then the reset messes things up. The solution (or course) would be to transmit the MIDI START instead of the first MIDI CLOCK signal. However, not all MIDI to CV converters, resets, etc... will work the same. In other words, you have to start out with SLOW rates that are human observable. To start everything together is the key to success.
I hope this write up exposes some of the issues with clock sync. It is a fascinating area and I have had lots of fun doing tightly sync'ed loops through the use of MIDI CLOCK. As long as all the synths are "together", then everything will work out. _________________ -- Kevin
http://kevinkissinger.com |
|
Back to top
|
|
 |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 2073 Location: Berks County, PA
Audio files: 89
|
Posted: Fri Apr 30, 2010 1:51 pm Post subject:
|
 |
|
kkissinger wrote: | My recommendation would be a tick that is sent at the smallest note value that the music requires. That is, if the smallest note value is a 16th note, then send a tick every 16th note. Raw MIDI CLOCK is sent as such a small note value (96 ticks per whole note) that is generally isn't useful without dividing it. |
Hi, Kevin, and thanks for all the info and suggestions.
Happily for me I will be adding this to software that I can re-build at Pocono, and in fact won't be able to test in a realistic setting until there are other instruments and more importantly musicians. If I can get it in the ballpark, it should just be a matter of some simple code tweaks, changing some dividers, etc. I have already had to replace the default Java Sequencer with my own sequencer that drives the Java Synthesizer directly, in order to get tighter control of timing when transitioning to new sequences. (The MIDI sequences are generated algorithmically on the fly.) So the current effort is one of getting within a few code tweaks of having something useful.
Quote: |
The problem with a faster tick is that there is no iron-clad guarantee that the slave synths clock dividers will divide in the same place -- that is, if you send out 32nd note ticks some synths will divide on the beat and others will divide on the "in between" beats and will be 1/32 note off.
...
Your software will need, in addition to MIDI CLOCK, to send a MIDI START command at the start of each piece so that everyone's sequencers and dividers will start in the same place.
|
I was under the impression from my favorite MIDI reference that the START would avoid the problem you raise in this last quote, i.e., having the synths divide in the same place. Ignoring latency for the moment, what would be the cause of the difference among synths? Would they not all start counting at the same START boundary? Or is this a matter of apparent bugs in the synths? Quote: |
Computers don't always make the best MIDI CLOCK sources -- they are subject to timing errors.
|
I figure on running as a slave, although I'll write the code to make being a master an option, just in case I need it.
Quote: |
Similarly, with MIDI CLOCK, you will need a MIDI SPLITTER to address all the synthesizers.
|
Can you recommend a MIDI SPLITTER?
Quote: |
You will need lots of time to experiment -- and would suggest to work methodically. Note that the timing/sequencing of the MIDI START may not be processed uniformly among synthesizers.
|
That last sentence answers my question above, I think.
Quote: |
I hope this write up exposes some of the issues with clock sync. It is a fascinating area and I have had lots of fun doing tightly sync'ed loops through the use of MIDI CLOCK. As long as all the synths are "together", then everything will work out. |
Thanks again, this helps. The music generated by this software tends to be very minimalist-rhythmic (although it is possible to get other sound-feels out of it), so getting tight timing sync will be important. As long as I have a good feel for getting my code in roughly the right place at home, it should not turn out to be a technical nightmare on site.
See you soon! Take care, Dale _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
Back to top
|
|
 |
jksuperstar

Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Fri Apr 30, 2010 6:07 pm Post subject:
|
 |
|
Like Kevin, I'd recommend a single Master Clock, the is generated from a hardware device if at all possible. The jitter will be far less. I did an exhaustive study recently involving hardware synths, macs, and PCs. Everything I had ran MIDI, but a conversion to analog/CV is easier than the other way around. And the jitter was most noticable in delas and tight high hat sounds. I ended up using an old Yamaha QY70, which has a midi clock accuracy down to 480ppq, and find all fx, synths, and computers locking to it (via a MOTU MiDI Express) are rock solid. |
|
Back to top
|
|
 |
|