MIDI clock to expression pedal

Searching for a way to have MIDI Translator take incoming MIDI clock and scale a cc# value smoothly though all 128 values. I feel like the answer is obvious but I just cannot figure it out. 24 clock “segments” per quarter note, but that means I would need to skip every 5.333 cc# values, double that if I wanted to make it happen in the space of an 1/8 note, double again at 16ths and it becomes ever more stepped and less smooth as I go. I have thought about using a timer and setting to microseconds but then depending on tempo I have the very real possibility of gaps at the end of each cycle. Plus at faster tempos and say a 16th note subdivision I would also likely get overlaps and incomplete cycles. Not sure I am making sense. Thoughts? Ideas? What am I missing?

Hi and welcome to the community!

Bome MIDI Translator timers have millisecond precision and not microsecond, so getting very granular could be an issue. In addition, global variables are 32 bit signed integers so working with floating point can be a bit tricky. We can approximate a CC sweep but as you say it may not be completely precise.

Since as you say, you would need to move the value every 5.3 ticks (128/24), you would need to move every 5 ticks and make up for the difference at the end or do some more complex math (like a pattern of 5,5,6 for count with a count of 5 for the last tick) if you want a full pedal sweep. The higher the BPM or the shorter the note duration, the harder it will be to get the timing precision you are looking for. Of course sweeping the full range within a single quarter note (or less) may or may not give you the effect you want as that is a pretty fast sweep even for an expression pedal.

In a nutshell,

  • With MT Pro, we can only control precision at the millisecond level.
  • With MT Pro, we would need to use integer arithmetic to approximate floating point values.
  • For 7 bit CC values, we have to work in the range of 0-127 while midi timing is always 24 ticks per quarter note. We can count ticks and set up logic to periodically compensate which will result in an approximation.

I hope this helps!

Steve Caldwell
Bome Customer Care

Also available for paid consulting services: bome@sniz.biz