Pure Data conversion

Scaling, units

PD (Pure Data) is scaled in physical units represented in floating point numbers: Hertz (Hz) for frequency, milliseconds for time. Axoloti parameters have a fixed point number representation that is closer to the implemented algorithms. Axoloti parameters have a range of 0.0u to 64.0u or -64.0u to 64.0u. For math this represents the 0.0 to 1.0 or -1.0 to 1.0 range. That means 64.0u multiplied with 64.0u equals 64.0u. For trigonometric functions, -64.0u corresponds to -180 degrees, 64u to 180 degrees. For pitch frequency, 0.0u corresponds to 329.6Hz which is the standard tuning of the middle "E" note on a music keyboard. One unit increment is the next key higher on the keyboard (semitones). 12.0u up is a doubling of frequency (octave interval in music). 12.0u down is half the frequency.

Control rate versus messages

PD uses messages (events) to trigger the execution of methods of objects. Messages can be a single number, a symbol, or a list of numbers and symbols. The PD message architecture needs dynamic memory allocation which conflicts with running on architectures with limited memory. The messages also need to be parsed, preventing inter-object compiler optimization. Axoloti does not have such messages, to avoid spending computation time on message parsing. The "bang" message to trigger parameter-less methods of objects in PD is often replaced with a "trig" (trigger) input in Axoloti. A "trig" input is activated on the transition from false to true. Axoloti does not have "hot" or "cold" inlets. Execution in Axoloti is not message-driven. Execution order is as described in the chapter "Execution order". This means there is no equivalent of these PD objects:

Wire types

PD has thick black cables for audio rate (s-rate) signals. Axoloti uses red cables and connectors for this purpose. PD implicitly adds multiple audio signals connected to a single input. In Axoloti you have to use an explicit + object, or a mixer.

PD has thin black cables for messages. Messages do not exist in Axoloti. Axoloti has control-rate signals instead.

Object arguments

Axoloti does not have object arguments.

Object conversions (PD to Axoloti)

Idiom conversion

Equivalent patches from the book "Designing Sound" are in the directory patches/idioms.

Constrained counting

Use the counter object.

Accumulator

will add accumulator object

Rounding

Use the round object. Or force conversion of a fractional into an integer with the toInt object.

Scaling

The mix1, mix2, mix3... objects can be used to scale and add one or more inputs.

Looping with until

Mostly used to initialize tables. In Axoloti, tables can be initialized with C-code. For an example of this, see patches/tests/table.

Message complement

For reciprocal, you can use log->+64->inv->exp. Accurate to about 8 bits of precision.

Weighted Random Selection

Delay cascade

Use the delayedpulse object for generating delayed triggers.

Last Float and Averages

Float Low Pass

Use the "smooth" object.