Nested SC expressions evaluate inside-out; proper indentation makes nesting depth visually explicit
When SC expressions are nested — one inside another as an argument — evaluation proceeds inside-out: the innermost expression computes first and its result becomes an argument to the outer expression. Good indentation makes nesting depth visually explicit and is essential for readability in complex synth graphs. SC’s IDE auto-indents with Edit → Auto-indent. A practical discipline: if you need more than 3–4 levels of nesting, extract inner expressions into named variables for clarity.
Examples
// Deeply nested:
round(sort(dup({exprand(1.0, 1000.0)}, 100)), 0.01);
// With variables (readable):
a = {exprand(1.0, 1000.0)};
b = dup(a, 100);
c = sort(b);
round(c, 0.01);
Assessment
For CombN.ar(SinOsc.ar(midicps(LFNoise1.ar(3, 24, LFSaw.ar([5,5.123],0,3,80))),0,0.4),1,0.3,2), list all UGens from innermost to outermost and identify what each provides to the next layer.