Phasor Controller (Sawtooth signal)
Description
A phasor controller is a sawtooth signal generator.
Syntax and Default Values
The phasor controller can be created using the following Modalys for Max or mlys.lua syntax:
In Modalys for Max, this object is named mlys.phasor:
[mlys.phasor @name MyPhasor @frequency 220 @phase 0.1]
• The period is 0 (updated every sample).
• The maximal dimension is 64.
• frequency and phase be changed dynamically viaMySine@freq {value} {time}
andMySine@phase {value} {time}
messsages.
• If there are inlets, you can connect 1 or 2 controllers of the same dimension that will be used for frequency or phase.
modalys.create_controller{kind="phasor",
freqs=ctlfreqs,
phases=ctlphases}
Parameters
The phasor controller takes 2 arguments:
- frequency (called 'freqs' in Lua as it can be multidimensional.)
- phase (called 'phases' in Lua as it can be multidimensional.)
Discussion
A phasor controller is a sawtooth signal generator that is typically used in combination with other controllers. It can also be created in Lua from within mlys.lua. A mlys.phasor has 2 parameters: 'frequency' and 'phase'. 'phase' is the phase shift, a value between 0 and 1, and can be used when combining several phasors. 'frequency' and 'phase' can be changed dynamically using the regular parameter mlys mechanism.
Why do we need this? Because when dealing with cyclical functions, the time parameter (in seconds) that we would be tempted to use loses precision over time (in decimal places). This leads to a noisy, imprecise result.
★