Maths2:
Filter:
Maths (extension) | UGens > Generators > Deterministic

Maths2
ExtensionExtension

Function Generator

Description

A pure SC implementation of the MakeNoise Maths EuroRack module. Creates a logarithmic to exponential curve function that can be triggered or can oscillate. The function starts at 0, goes to 1, and returns to 0 on each iteration or loop.

For a more efficient algorithm, use the Faust implementation - Maths, which is completely interoperable and should give mostly identical output. (Right now the EOC and EOR triggers are not exactly the same - Maths outputs single sample triggers. Maths2 correctly outputs PWM oscillators.)

The source code for the Faust implementation of the UGen is provided and can be compiled for SC, PD, Max, or other environments.

The UGen outputs a 3 channel signals:

Channel[0] is the audio rate function.

Channel[1] is a pulse width oscillator at the front edge of the function (Front of Cycle - FOC). The oscillator is 1 while the function is rising and 0 while it is falling or not active.

Channel[2] is the end-of-rise (EOR) pulse width oscillator. It is 1 when the function is falling and 0 when the function is rising or not active.

Audio Rate Only!

Class Methods

.ar

Arguments:

riseDur

Duration of the signal's rise from 0.001 to 10 minutes.

fallDur

Duration of the signal's fall from 0.001 to 10 minutes.

logExp

0 is a logarithmic curve, 1 is an exponential curve. 0.5 is linear.

loop

If 1, the function loops. If 0, the function does not loop. The cycle will start over upon receiving a value of 1.

plugged

0 is normal operation, using internal cycle to create the input. When "plugged" it only reactions to tiggers coming from the trig input.

trig

An input trigger will trigger the function to happen once if loop is set to 0.

Examples

Maths2 outputs 3 signals. The function, FOC and EOR:

Both FOC and EOR are 0 when the function is 0:

MouseX and MouseY control the rise and fall durations of the function. MouseButton triggers the cycle to end. Lifting the MouseButton trigger the cycle to start over:

The same thing but with no looping, just MouseButton triggers:

Changing the shape of the envelope from Log to Exponential has significant influence over the sound:

A Maths can also be used to trigger a Maths. Here we have a complex percussion sound made by using the trigger out of one Maths to trigger a second, nonlooping Maths.

The same idea, but using the EOR.

Rise and Fall can each be up to 600 seconds:

An external Audio or Control rate signal can be used is an input to the Slew inside Maths:

This is a fun way to make different shaped noise curves: