env_file()

env_file(stretch, "file.env")

Category

Envelope / Control

Description

Reads an envelope from the Envelopes folder by file name. The first argument is a time stretch factor and the second argument is a quoted .env filename, for example "nice_melody.env". Factory presets often use env_file() for melody contours, stepped filter motion, pitch drift, or custom timbre curves.

Arguments

Typical Values

Stretch around 0.5 to 4.0 is typical. 1.0 plays the envelope at normal speed; values below 1.0 play it faster, and values above 1.0 play it slower. The second value should be a quoted file name. The parser resolves it to the internal numeric envelope index when the formula is loaded. Like other timing-related controls, the stretch is interpreted in Syntropy's 44.1 kHz reference domain and rescaled internally for the current host sample rate.

Example

env_file(1, "nice_melody.env")*saw(X)

Notes

Use env_file() when you want one reusable external envelope file shared by many presets. External .env files can be created and edited graphically in the Envelope Editor opened from the Envelopes button in the Edit view toolbar. If a formula uses several external envelope readers, Syntropy assigns the internal reader instances automatically. If you later save a preset with embedded envelopes instead of links, Syntropy can convert these references to built-in env() calls.