| User-Defined Opcode Database |
|---|
Flips an incoming floating point value at k-rate.
Download UDO FileThis opcode is mostly intended for use with MIDI and OSC controllers but it can likely be used for other things as well.
kval flip kin, kmax
kmax -- Maximum value to flip.
kin -- Input floating point variable.
kval -- Resulting flipped output.
For example, if your kmax was 0, and your MIDI controller is sending values in range 0 - 127, putting it through flip would return values in range -0.000000 to -127.000000.
opcode flip, k, kk kin, kmax xin kout = (kmax - kin) xout kout endop
instr 1 kval ctrl7 1, 1, 0, 127 kdisp flip kval, 127 printk2 kdisp endin
David Akbari - 2005
| Previous | Home | Next |
| findPowerOfTwo | Fofilter |