Oscillator / External Grain Bank
granular() plays a bank of external .env grain waveforms as a smooth, phase-tracked oscillator. It is intended for resynthesis-style sounds, wavetable-like scanning, vocal or instrumental grain banks, and evolving sampled-timbre oscillators.
The first argument is oscillator phase. Use X for normal playable pitch, or a scaled form such as 0.5*X or 2*X for octave layers.
The second argument selects the grain position. It is a normalized value from 0.0 to 1.0, where 0.0 selects the first grain and 1.0 selects the last available grain. Realtime movement is smoothed internally, so parameters, envelopes, LFO-style motion, or slow position modulation can scan through the bank without hard grain switching.
X for the played note pitch0..1Envelopes folderIf the third argument is omitted, Syntropy uses the legacy root Envelopes grain bank:
granular(X, 0.35)
If the third argument is present, Syntropy loads grains from Envelopes\folder:
granular(X, 0.35, "violine")
The folder is scanned for .env files and sorted by numeric filename order, for example 0.env, 1.env, 2.env, and so on. The number of grains is the number of valid .env files found in that folder.
0.55*attack(1200)*release(60000)* lp( granular(X,0.10+0.70*param(0),"flaute"), 0.04+0.42*param(1), 0.12 ) [Scan: 0.35; Cutoff: 0.55;]
0.45*param(15)*velolog()*attack(2200+24000*param(0))*release(18000+150000*param(1))* sem( 0.65*granular(X,0.16+0.70*param(2)+0.05*sin(pos()/90000),"violine") +0.18*granular(2*X,0.25+0.55*param(2),"violine"), 0.035+0.50*param(3), 0.08+0.34*param(4) ) [Attack: 0.20; Release: 0.70; Scan: 0.35; Cutoff: 0.50; Reso: 0.22; Gain: 0.75;]
Use slow grain-position movement for realistic resynthesis. Fast random jumps can sound noisy or unstable because the function is scanning between different waveform grains. For portable presets, keep the required .env grain folders installed with the Syntropy runtime.