Pages: [1]   Go Down
Author Topic: MIDI playback/sequencer with finely controlled beat timing?  (Read 839 times)
0 Members and 1 Guest are viewing this topic.
San Francisco
Offline Offline
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 11, 2012, 06:29:15 pm by jon_s » Logged

Massachusetts, USA
Offline Offline
Tesla Member
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: