tone()

tone()

Category

Envelope / Control

Description

tone() returns the current note tuning multiplier used by the synth engine. In code it is the per-note ratio from the tuning table, not a plain 0..1 frequency value. For example, A4 (MIDI note 69) is 1.0, one octave higher is about 2.0, one octave lower is about 0.5, and other notes follow the selected temperament.

That means tone() is basically a note multiplication factor. It is useful in older explicit formulas where you build pitch yourself from the running sample position. In modern Syntropy formulas you usually do not need it, because X already carries the played note pitch.

Arguments

No arguments.

Typical Values

The old explicit phase form is:

pos()*2*pi()*440/44100 * tone()

This is the same idea as using the macro X and then multiplying by tone():

X*tone()

Why? Because in Syntropy the X macro expands to approximately:

pos()*2*pi()*440/44100

So X*tone() means:

pos()*2*pi()*440/44100 * tone()

At A4, tone() is 1.0. At A5 it is about 2.0. At A3 it is about 0.5. So tone() scales that base A4 phase to the currently played note.

Example

sin(X)                 // recommended modern form
sin(X*tone())          // older explicit tuning style
sin(pos()*2*pi()*440/44100 * tone())

Notes

Do not think of tone() as a plain normalized frequency value. It is a pitch ratio relative to A4. For most oscillator formulas prefer saw(X), sin(X), or pwm(X,0.4), because X already includes the played MIDI note pitch. Use tone() mainly when you intentionally build the phase yourself from pos() or when adapting older formulas.