amplitude amp &key :loudest :softest :power [Function]

Returns a numeric value for the amplitude amp. :softest is the value to return when the logical amplitude is 0.0, and defaults to *amplitude-minimum*. :loudestis the value to return when the logical amplitude is 1.0, and defaults to *amplitude-maximum*. If the loudest and softest values are both integer then amplitude returns an integer value. :power is the power curve between the softest and loudest value, and defaults to *amplitude-power*. amplitude returns the value:

softest + (loudest - softest) * amp^power.

Example:

? (loop for a to 1 by .25 collect (amplitude a))
(0.0 0.25 0.5 0.75 1.0)

? (loop for a to 1 by .25 collect (amplitude a :power 2))
(0.0 0.0625 0.25 0.5625 1.0)

? (loop for a in '(p mp f ff)
        collect (amplitude a :softest 0 :loudest 127))
(42 56 84 98)

See Also:

amplitude [Item Type], amplitudes, *amplitude-minimum*, *amplitude-maximum*, *amplitude-power*,


Last Modified: 5-Mar-1998