The Extended Loris Opcodes

Home | Download | Opcodes | Examples/Sounds | Contact Me


lorisfrqwarp

lorisfrqwarp — Compress, expand or invert frequencies based on a central frequency and a warp coefficient.

Syntax

lorisfrqwarp  isrcidx, istoreidx, kCentralFrq, kWarpCoeff [, iIsHarmonic ]

Description

If kWarpCoeff is 1, frequencies stay the same. As kWarpCoeff approaches 0, all frequencies move proportionally towards kCentralFrq. At 0, all freqiencies equal kCentralFrq. As kWarpCoeff approaches -1, frequencies are effectively inverted around kCentralFrq. kWarpCoeff may be any float but frequencies over sr/2 will be filtered out; negative frequencies will be 180° off in phase.

The equation for this calculation is: kCentralFrq + kWarpCoeff*(partialFrequency - kCentralFrq).

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.

If iIsHarmonic is 0 then frequency warping will be accomplished by multiplying/dividing by frequency rations. If iIsHarmonic is 1 then frequency warping is done by adding/subtracting Hertz. The default is 0.

Performance

kCentralFrq is the frequency central to all compression/expension/inversion.

kWarpCoeff is a float that describes the degree of frequency warping.

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.