lorisampenvelope
lorisampenvelope Create a variable length breakpoint-style frequency envelope which scales amplitudes.
Syntax
lorisampenvelope isrcidx, istoreidx, kcurve, kfrq1, kdb1 ... kfrqN, kdbN
Description
If a partial frequency from a Loris analysis is equal to breakpoint kfrqN, it's amplitude will be scaled by kdbN dB. If a frequency falls between two breakpoints, kfrqN and kfrqN+1 then it's amplitude will be scaled by a value between kdbN and kdbN+1 dB interpolated according to kcurve. Breakpoint frequencies (kfrq1, kfrq2, ...) must be ordered from lowest to highest.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
kfrqN is the frequency value which defines the location of the Nth breakpoint scalar.
kdbN is a value in decibles which is applied to amplitudes at frequency kfrqN. A value of 0 yields no change; 6 doubles the amplitude, -6 halves it.
kcurve is the slope of the interpolation between neighboring breakpoints. 1 yields a linear interpolation; 2 is an exponential interpolation and 0.5 is a logarithmic. In general kcurve gets steeper above 1 and more rounded below 1. kcurve must be great than 0.
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.