M4L Midi Inverter

bepislesnack's icon

Hi there,

I was just wondering if anyone knows of a M4L device that would allow me to invert midi information? For example, I've been using the envelope follower to control the speed of an arpeggiator. I would like the relationship between the envelope and the arpeggiator speed to be inverse, so that whenever the envelope ramps up the arpeggiator slows down. Any help would be greatly appreciated.

Thanks!

Source Audio's icon

You could use scale object.

Example :
Input is envelope value, range of envelope is 0 100
Output is speed expressed in ? let's take it float 0. 1.
for simplicity of explanation.
so
scale 0 200 1. 0. ( inverse of 0 200 0. 1.)

if values are the same range simple
!- 100
inverts 0 - 100 to 100 - 0