Jump to content

MB SEQ Event timings


stryd_one
 Share

Recommended Posts

Hi all,

I'm doing some planning work for the sequencer I've spoken of building, and I'm trying to find out how the MB64SEQ (and eventually the MIOSSEQ) is triggered to send events, both when using internal timing, and when synced to MIDI Clock...

Is is a real world clock (eg counted in seconds etc), or a musical clock like midi clock, or maybe something with the PIC's clock speed, or a bit of both, maybe none of the above ;)

As much info as you have, would be a great help.

Thanks!

Link to comment
Share on other sites

In short:

The 20MHZ crystal is the 'clock'

(20million pulses per second)

The software program is continuously 'looping' &  1 instruction is executed every 4 clockpulses (makes 5 MIPS = 5 million instructions per second)

It requires x microseconds for 1 complete software loop, much faster then BPM & the MIDI baudrate. The time 'gaps' are filled with x length 'do nothing' instruction loops before sending out some MIDI message (i.e. MIDI clock msg) which are of much lower speed.

Hope this is the answer on your question ( & a bit correct :D )

Link to comment
Share on other sites

Hi DriftZ,

no, this isn't it exactly. The MB64SEQ doesn't start a NOP loop to insert delays between the MIDI events, but it uses a timer which interrupts the main program every x uS. The x value is derived from the BPM setting, for example, with 120 BPM 480 steps will be triggered per minute (if the clock divider of the appr. track has been set to 1:1), makes 8 steps per second or 125 mS delay between every step. A microsecond timer will be preloaded with this value, it starts the sequencer handler periodically. The sequencer handler switches to the next step and pushes the new MIDI events into a FIFO buffer (it doesn't send the MIDI events directly to ensure best performance)

If the MB64seq is running in slave mode, the timer will be switched off and the step sequencer will be triggered by incoming MIDI clock events instead. This has also be realized as a interrupt service routine, therefore the latency in this mode is below 10 uS

The main program is never idle, a lot of tasks are called when nothing else is to do, tasks which prints out messages on the display, samples the 64 pot values, drives the DIN/DOUT register chains, handles with the MIDI FIFO buffers, etc.

Best Regards, Thorsten.

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...