stryd_one Posted June 2, 2003 Report Share Posted June 2, 2003 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! Quote Link to comment Share on other sites More sharing options...
DriftZ Posted June 2, 2003 Report Share Posted June 2, 2003 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 ) Quote Link to comment Share on other sites More sharing options...
TK. Posted June 2, 2003 Report Share Posted June 2, 2003 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 uSThe 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. Quote Link to comment Share on other sites More sharing options...
DriftZ Posted June 3, 2003 Report Share Posted June 3, 2003 Whoopsss :-[Oh well, now I know it 8)greetz,DriftZ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.