Firmware improvements: MIDI CCs to toggle everything, write last played SD sample, start/stop loop

I'm trying to get this setup with an M-Audio Axiom controller to use live and needed to add some more MIDI functionality.

First off, that controller doesn't have built-in toggle functionality for CCs (where pushing a button once sends one CC and a second time sends a different one), so I added MIDI_RECORDING_TOGGLE, MIDI_REALTIME_TOGGLE, etc. to facilitate this. Note to Todd: I put them with the relevant existing case statement, wasn't sure if it would be worse to duplicate the logic or to have a convoluted if but I can separate them if that would be better.

Next, I thought it would be cool if playing SD samples on the keyboard to have a single button to load the last sample you played to one of the banks for tweaking. This works great as long as you stop the bank first, but I have the same problem loading a sample to a playing bank from the SD card menu. I tried adding some code to stop it first but it doesn't seem to happen fast enough.

Lastly, sometimes I want to be able to restart looping to ext clock from a controller button. Also stop looping if it is playing, mostly to be used in conjunction with loading last played sample.

I started numbering the CCs in the hundred range to not step on toes, but these could be renumbered. Currently:

MIDI_RECORDING_TOGGLE    102
MIDI_OVERDUB_TOGGLE    103
MIDI_REALTIME_TOGGLE    104
MIDI_LOOP_TOGGLE    105
MIDI_HALF_SPEED_TOGGLE    106
MIDI_PLAY_BACKWARDS_TOGGLE    107
MIDI_RESTART_LOOP    108
MIDI_STOP_LOOP    109
MIDI_WRITE_LAST_SAMPLE    53

The code is up on github: https://github.com/scragz/WTPA2
Here is an AIFF in case anyone wants to try it out without setting up the build environment: http://scragz.com/files/dump/2015-01-30/wtpaAudioBootFile.aiff

Todd: As soon as I can figure out how to get firmwares loading again with my current audio in problems I will test it some more and shoot you some pull requests. Any tips on that would be super cool.
Sign In or Register to comment.