Meanwhile, Developing a MIDI, Tap-Tempo, Master-Clock Pedal...

Kind of the other inspiration for the Robo-Drums, I've also been thinking about a MIDI Master Clock that started with the WAY TOO AMBITIOUS idea of a central 2-way, DINsync-MIDI-And-Back Master Clock, that I thought would be cool to add tap-tempo to. (Draws HUGE breath after that mouthful!) I dug out one of my Wio Terminal micros, promptly killed it on a distraction, dug out the other and started developing this concept.

The left and centre buttons will probably have a gang reserved for straight switching of start/stop and pattern-select, as well as for triggering to Wio Term to do MIDI.sendStart/MIDI.sendStop (left) and MIDI.programChange. (Center.) The right button will be the tap-tempo button. The toggle switches will select normally-open/closed modes for the analogue button-out function.

On the tap tempo stuff, I got to thinking about "Kilroy's Blues"•1, a song I wrote back in the mid "noughties," and how it would be cool to "pedal" it along with the drum machine. I can't tap-tempo my Alesis while it's playing because the same pedal does pattern change duty while playing. I also can't tap a tempo during the chorus because it does a triplet on twos thing on the guitar and voice, so it'd need to be MIDI output, to clock the Alesis drum machine, and it'd need to be a classic tap-tempo, that once tapped a few times could hold that tempo if I stop tapping, and let me pick up tapping immediately after the "hard bits." I'm not asking much, am I? Analogue and MIDI start/stop, Analogue and MIDI program change and MIDI tap tempo. (Probably also with an analogue out, too!) Probably also with DINsync out to "tape" and back in from "tape" as the master clock, allowing my Zoom L-12 to clock analogue and MIDI machines, alike. Like my acoustic drum kit! You see where the crazy starts? IKR.

Anyway, the starting point on MIDI Tap Tempo is simple enough. DXInteractive's ArduinoTapTemo library works with the Wio Termy hardware serial port. There's MIDI, easily connected via the Raspberry Pi header on the back. Very small PCB for the opto-isolator and stuff, easy. Assign the buttons as coming in on a few digital ports, piece of cake! The proof-of-concept code works, as this video proves.

Still loads of work to do. Edge detection for button debounce, leading edge triggering and sensing the leading edge of the 24 pulses per quarter note microseconds master clock, derived from dividing 24000 by the beat length, in milliseconds, from the tap tempo stuff. Lock start/stop/continue to a song position pointer and the master clock, more edge detection. Isolate tempo tapping from MIDI calculations, synchronising changes with "the one", another edge to detect. Count-in Mode, where, if stopped, tapping 4 times sets the tempo and tapping 4 more sends a MIDI start signal on 1 - "1, 2, 3, 4, 1, 2, 3, 4, 1=start." It's simple code, but the edge detection stuff is hard to scope and visualise. Wotevs, I'll get there. Meanwhile, enjoy this video of me playing "Kilroy's Blues" with my drum machine as master clock and sound source. It will probably be the track I record a lot of versions of as I test various parts of my tiny robot army... er band.

Comments

  1. Update to this: So, I've discovered the "Cheap Yellow Display," (CYD) thanks to Rui at Random Nerd Tutorials. These, while having fewer available GPIOs than a Wio Terminal, are half the price and RetroGnome, as I'm calling this project, only needs serial in/out, USB MIDI and DIN sync In/Out, which is just about what is free on these boards' GPIOs. The touchscreen of the CYD can handle the entirety of user interface, entirely in code. A bit of learning, including a library interface (LVGL) but I think this project is better served by a cheaper, more widely available board.

    ReplyDelete

Post a Comment

Popular posts from this blog

Removing Ollama From My Mac

Open Source Is Essentially Socialist

ALWAYS read the PDS