Jump to content

Would something like this be possible?


characterstudios
 Share

Recommended Posts

Hi,

I'm new to this forum, and would like to know if it would be

possible to make a device like the Sync² with the MB/MIOS platform.

You can see the Sync² here: http://home.netspeed.com.au/aistorm/sync2.html

I would like to build an eight or sixteen multi-channel device that does exactly

the same: stop the midi-clock based sync from a master when de-activated,

and then when you re-activate, restart sync out with the next bar. Obviously in a

multi-channel setup, with independent control over each channel's status.

I have many devices that can slave to midi-clock in my studio, and a device like

this could really give a great feel of live-performance to a night's twiddling  :D

Would it (in principle) be possible to build such a device with MB/MIOS, is the

timing of the platform stable enough to do this properly in a multichannel

configuration?

I have decent soldering experience, and am not  afraid to get busy with a bit

of coding either, so if anybody here would like to pick up this idea (just because

this could become an extremely cool device, not only for my own place), I'd like

to discuss the subject.

Regards,

The Why Project

Link to comment
Share on other sites

Hi,

it shouldn't be a big problem to realize this, the timings are pretty stable. Of course, this depends on the CPU load, but so long the application is doing nothing else than receiving MIDI clock, determine the BPM and sending/generating a MIDI clock to slaves, you can expect a latency of less than 100 uS and a jitter of less than 20 uS! Even if the CPU is doing some additional stuff, the latency should always be less than 1 mS (thats for example the jitter of MIDIbox SEQ).

For comparison: todays USB interfaces for PCs have mostly a latency of > 10 mS, and a jitter of +/- 5 mS! Especially the jitter does hurt if you are planning to sync external devices, therefore I prefer to use my MIDIbox SEQ as a MIDI clock master.

You could use the "clockbox" application as basis for your project, it's easy to build:

http://www.midibox.org/forum/index.php?topic=5691.0

and since it's written in C, it's also easy to enhance by additional features. E.g., in order to get the same functionality like the Sync2 device, a BPM detector has to be added - and a good timing interpolation routine, which compensates the jitter effects of your PC application.

Best Regards, Thorsten.

Link to comment
Share on other sites

Thorsten,

Thank you for your quick and complete reply.

My idea is actually to drive my studio's clocked devices from another

hardware module (my XBase09 or G2 for instance).

ClockBox seems to take care of most of the output requirements, and

even though i plan the device to be driven by a tighter clock than my

PC-USB interfaces (Midex-8), your idea of interpolation on the bpm detector

is good too.

What about implementing this through counters only? By just counting the

number of pulses, given the fact that a performance starts on step 0 with a

song-start command, by just using a simple looping counter, you could extract

the position in the (any) bar... and use that to define when you would re-start

sending out midi-clock...

This way you don't depend on an interpolated BPM detection routine, which I

feel might introduce more error than the method above?

BTW. If only the clock that came from Cubase/Midex-8 would be tight, I would

have written a midi-plugin to do this a long time ago :D

Anway, that's just some thougts that just came in to my mind...

Regards,

The Why Project

Link to comment
Share on other sites

What about implementing this through counters only? By just counting the

number of pulses, given the fact that a performance starts on step 0 with a

song-start command, by just using a simple looping counter, you could extract

the position in the (any) bar... and use that to define when you would re-start

sending out midi-clock...

The disadvantage is, that such a method doesn't allow to change the master clock dynamically from the host application, you always have to readjust it, and thats not flexible enough.

This way you don't depend on an interpolated BPM detection routine, which I

feel might introduce more error than the method above?

A combination of the BPM detection routine used in the MIDImon + the clock pin output routine used in MBSEQ and MBCV would bring very accurate results.

Unfortunately so many people are requesting new features from me, that I'm propably not able to combine the two codes this year - anybody else? It isn't so difficult, and it could also be made in C instead of assembly. Finding out how it can be realized was the main effort, and I've added a lot of comments to the code in order to make the functionality clear.

Best Regards, Thorsten.

Link to comment
Share on other sites

The disadvantage is, that such a method doesn't allow to change the master clock dynamically from the host application, you always have to readjust it, and thats not flexible enough.

Can you elaborate on what you mean with dynamically adjusting the masterclock

from the host?

A combination of the BPM detection routine used in the MIDImon + the clock pin output routine used in MBSEQ and MBCV would bring very accurate results.

Unfortunately so many people are requesting new features from me, that I'm propably not able to combine the two codes this year - anybody else? It isn't so difficult, and it could also be made in C instead of assembly. Finding out how it can be realized was the main effort, and I've added a lot of comments to the code in order to make the functionality clear.

I'm just trying to work out the best concept to do this... but if I can be convinced

that this is the best thing to do, I'd be willing to throw a hand at it... I have no problem

coding something in C.

Regards,

The Why Project

Link to comment
Share on other sites

Can you elaborate on what you mean with dynamically adjusting the masterclock

from the host?

Based on your description I think that you though about an internal BPM timer, which is synchronized to the MIDI clock. The general problem is, that it will get out of sync once you are changing the song speed at the host.

A simple solution would look like this: configure the Timer() function, so that it is called each 500 uS (thats enough accuracy when you think about the latency of your MIDI interface..).

Within the timer just increment a counter A

Add also some code to the MPROC_NotifyReceivedByte function. Check for 0xf8 (MIDI clock), once received, copy the current counter A value into a new variable V and reset counter A.

Now you know the number of Timer() ticks between two MIDI clocks.

Add some new code to the Timer() function: a second counter B, which is decremented until it reaches zero, and preloaded with V each time it reached zero - if this happens, send a MIDI clock

And thats all ;-)

Problem: if the MIDI clock jitters, the content of preload value V will jitter, too. But this can be compensated by calculating the average value of the last determined V's

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 5 months later...

Hi acidman,

Welcome to the board. Yeh the sync2 is a bit pricey... So far I haven't heard of anyone making an app like this, but if you have some C programming skills, TK has provided a full explanation of how you could do it. His explanation will make more sense once you've become more familiar with the MIDIBox :)

Link to comment
Share on other sites

  • 4 months later...

Hi I'm new here  and I have searched a long time for a box like the SYNC2 !!!! But with more output ( Midi BEAT Clock OUT, DIN SYNC out and CLOCK out jack).

But I have no knowledge in programming ........

DId someone build a box like this today?

It would be very cool if someone could give me more infos!

Thanks

ALex

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...