lorisampwarp
lorisampwarp Compress, expand or invert partial amplitudes based on a central amplitude and a warp coefficient.
Syntax
lorisampwarp isrcidx, istoreidx, kCentralAmp, kWarpCoeff [, kdbScale ]
Description
If kWarpCoeff is 1, amplitudes stay the same. As kWarpCoeff approaches 0, all amplitudes move proportionally towards kCentralAmp. At 0, all amplitudes are equal to kCentralAmp. As kWarpCoeff approaches -1, amplitudes are effectively inverted around kCentralAmp. kWarpCoeff may be any float but amplitudes over 1.0 will be clipped.
The equation for this calculation is: kCentralAmp + kWarpCoeff*(partialAmp - kCentralAmp).
Initialization
isrcidx is an integer label that identifies the stored set of SDIF partials that are used. Use lorisread to import partials from an SDIF file, store them in memory and assign a label.
itgtidx is an integer label where the partial data created by this opcode will be stored. This label may be subsequently used with any other loris opcode for further transformation or resynthesis with lorisplay. if itgtidx and isrcidx are identical then isrcidx is overwritten.
Performance
kCentralAmp is the amplitude central to all compression/expension/inversion.
kWarpCoeff is a float that describes the degree of amplitude warping.
kdbScale is a value in dB which scales the amplitudes of partials after warping. A value of 0 gives no change, -3 multiplies partials by 0.707, +6 multiplies partials by 2.00. This is primarily intended to help mitigate clipping.
Credits
The Loris unit generators were written by Kelly Fitz (loris@cerlsoundgroup.org). It is patterned after a prototype implementation of the lorisplay unit generator written by Corbin Champion, and based on the method of Bandwidth-Enhanced Additive Synthesis and on the sound morphing algorithms implemented in the Loris library for sound modeling and manipulation. The opcodes were further adapted as a plugin for Csound 5 by Michael Gogins. Ben Hackbarth (hackbarth@ucsd.edu) wrote the Extended Loris Opcodes.