Go Down

Topic: MIDI playback/sequencer with finely controlled beat timing? (Read 851 times) previous topic - next topic

jon_s

Jan 11, 2012, 11:57 pm Last Edit: Jan 12, 2012, 12:29 am by jon_s Reason: 1
I've come across a variety of projects which produce MIDI output based on a strict timing grid (e.g. Mike's Glockenspiel, MidiDuino, Cahors, etc.). Could anyone direct me towards some code which allows a finer timing grid, like MIDI ticks? Based on the sophisticated work I've seen using the internal timers to make synthesizers, it seems like sending MIDI signals on a precise schedule shouldn't be too hard, but I'm having trouble bridging that knowledge gap.
Thanks!

johnwasser

The timing in the Arduino is typically done in milliseconds (delay() and millis()).  The code you have seen probably converts whatever time interval they care about into milliseconds.  If you want more precision, just specify milliseconds directly.  If interval values are being stored in a byte, you may want to increase the length of the time values to int or long so you can get more than 0.255-second events.  An unsigned int should allow for events up to 65.535 seconds.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up