ampmidicurve Real-time MIDI:Converters ampmidicurve ampmidicurve Maps an input MIDI velocity number to an output gain factor with a maximum value of 1, modifying the output gain by a dynamic range and a shaping exponent. Description Plugin opcode in ampmidid. Maps an input MIDI velocity number to an output gain factor with a maximum value of 1, modifying the output gain by a dynamic range and a shaping exponent. The minimum output gain is 1 minus the dynamic range. A shaping exponent of 1 gives a linear response; increasing the exponent produces an increasingly depressed knee in the gain response curve. Syntax igain ampmidicurve ivelocity, idynamicrange, iexponent kgain ampmidicurve kvelocity, kdynamicrange, kexponent Initialization imidivelocity -- MIDI velocity number, ranging from 0 through 127. idynamicrange -- Intended dynamic range of gain, from 0 through 1. iexponent -- Exponent applied to shape the gain response curve, 1 or greater. Performance kmidivelocity -- MIDI velocity number, ranging from 0 through 127. kdynamicrange -- Intended dynamic range of gain, from 0 through 1. kexponent -- Exponent applied to shape the gain response curve, 1 or greater. Maps an input MIDI velocity number to an output gain factor with a maximum value of 1, modifying the output gain by a dynamic range and a shaping exponent. The minimum output gain is 1 minus the dynamic range. A shaping exponent of 1 gives a linear response; increasing the exponent produces an increasingly depressed knee in the gain response curve, according to the equation: y = d * (x/127)^h + 1 - d, where y = the gain, x = the input MIDI velocity (from 0 through 127), d = the dynamic range (from p through 1), and h = the shaping exponent (1 or greater). This opcode was suggested by Mauro Giubileo. Examples Here is an example of the ampmidicurve opcode. It uses the file ampmidicurve.csd. Example of the ampmidicurve opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Midi Converters Credits Author: &namemichael; 2019