envosc()

envosc(index, presetEnvelope)

Category

Oscillator / Embedded Wavetable Envelope

Description

envosc() reads an envelope stored inside the current preset and plays it as a one-cycle oscillator waveform. It is intended for custom wavetable-style oscillators drawn or imported in the Envelope Editor.

The first argument is oscillator phase. Use X for normal playable pitch, including keyboard tracking and pitch-wheel behavior.

Arguments

Practical Tuning

If the oscillator wavetable, meaning the embedded envelope used as one cycle, has a length of 1024 samples, use:

envosc(X, 0)

This is the recommended form for Syntropy wavetable-style presets built from 1024-sample envelope oscillators.

Example

0.7*attack(200)*release(8000)*envosc(X, 0)
0.45*envosc(X, 0) + 0.18*envosc(2*X, 1)

Notes

For curiosity, the older conceptual analog is envloop(constant/tone(), envelopeNumber). In practice, use envosc() for oscillator use, because it follows the oscillator phase directly and is better suited for playable pitch, pitch-wheel movement, and MPE-style pitch expression.