MIDIbox Report

My electronics/Software/Firmware projects haven't stalled. It's the creative process I'm blessed/cursed with. Sometimes I need slabs of time not thinking about an idea. To that end, I'm back to working on my MIDI sync "babelfish" and have found a few tools that help me to do it using truth tables.

Truth tables are charts which layout the array of input and output states of a logic device. For a device that will be used to pop out large, but relatively simple, high and low logic states to operate analog sync signals, creating a 2 dimensional array of the output logic is a simple and reliable way to make 4 channels switch on and off at 48 pulses per quarter note (PPQN), 24 PPQN, 1 PPQN and one pulse per bar (for controlling the tempo of my SY-1 guitar synth pedal) is relative easy to configure with arrays. Simply increment an "address" count using an interrupt, and access each address in the 2D array. Working on the initial premise that all of my timings will be X/4 (eg 2/4, through 3/4, 4/4 to 5/4, et al), it's possible to make this address count truncate at address 192 for 2/4, 288 for 3/4, 384 for 4/4, and so on. Trouble is, it's a huge table of data. Flash RAM on an Arduino, even a Mega, is pretty limited. This data needs to be kept in PROGMEM.

Just making the table large enough for 4/4 used 4/5 of the flash RAM on an Uno, but storing it in PROGMEM allows for some quite large data, especially as this truth table approach allows the actual project timing to shrink to the size of postage stamp. Using the PGMWrap library, by Chris--A, even makes storing large data blocks as transparent as using flash RAM.

So, now the actual nuts and bolts clocking code comes down to the interrupt timer library, Timer1 (Paul Stoffregen), Paul's FreqMeasure library for slaving to tap tempo, click track or MIDI Beat Clock (24PPQN) and the nonblocking AsyncLCD library (Paulo Raca) for a simple 2004 or 1602 LCD display. Just about everything else is external amplifiers, switches, buttons and knobs. There's more than enough room for all this in PROGMEM, even on an UNO.

Comments

Popular posts from this blog

Removing Ollama From My Mac

ALWAYS read the PDS

Open Source Is Essentially Socialist