ampmidid
Musically map MIDI velocity to peak amplitude within a specified dynamic range in decibels.
Plugin opcode in ampmidid.
Syntax
Initialization
iamplitude -- Amplitude.
ivelocity -- MIDI velocity number, ranging from 0 through 127.
idecibels -- Desired dynamic range in decibels.
Performance
kamplitude -- Amplitude.
kvelocity -- MIDI velocity number, ranging from 0 through 127.
Musically map MIDI velocity to peak amplitude within a specified dynamic range in decibels: \(a = (mv + b) ^ 2\), where \(a\) = amplitude, \(v\) = MIDI velocity, \(r = 10 ^ {R / 20}\), \(b = 127 / (126 \sqrt{r}) - 1 / 126\), \(m = (1 - b) / 127\), and \(R\) = specified dynamic range in decibels. See Roger Dannenberg, "The Interpretation of MIDI Velocity", in Georg Essl and Ichiro Fujinaga (Eds.), Proceedings of the 2006 International Computer Music Conference, November 6-11, 2006 (San Francisco: The International Computer Music Association), pp. 193-196.
Examples
Here is an example of the ampmidid opcode. It uses the file ampmidid.csd.
See also
Credits
Author: Michael Gogins
2006