an open-source digital signal processing and sound synthesis language
about · links · contact
boost - convert linear pan amplitude to 'constant power' pan amplitude


powerpan = boost(linpan)


boost accepts a pan value (0.0-1.0) and returns the amplitude scaling factor necessary to avoid a "hole in the middle" for a panned note. In other words, for static-panned notes, it lets you convert the linear panning law used by most instruments into a constant-power pan with sqrt taper.

Examples of values returned by boost:

   boost(0) => 1
   boost(1) => 1
   boost(0.25) => 1.265
   boost(0.5) => 1.414


A pan value (0.0 - 1.0)


   pan = 0.53
   powcorrection = boost(pan)
   STEREO(0, 0, 3.4, 1.0 * powcorrection, pan)

See Also

ampdb, dbamp, cpsmidi, cpslet, cpsoct, cpspch, midipch, octcps, octlet, octmidi, octpch, pchcps, pchlet, pchmidi, pchoct