home/ atoms/ sc-nesting

Nesting passes the result of inner expressions as arguments to outer ones; indentation makes levels readable

SC evaluates nested expressions from innermost to outermost. The result of each inner call becomes an argument to the next outer call. This applies to both UGen graphs and data transformations. Proper indentation — one level per nesting depth — makes multi-level nesting legible. White space (newlines, tabs, spaces) is freely allowed between code tokens. The pattern sort(dup({exprand(1,1000)},100)) first generates 100 random numbers, then sorts them.

Examples

round(sort(dup({exprand(1.0,1000.0)},100)),0.01); // innermost: exprand → dup → sort → round

Assessment

Given CombN.ar(SinOsc.ar(midicps(LFNoise1.ar(3,24,80))),1,0.3,2) — what is the first argument to SinOsc.ar?

“innermost nested message and move out to each successive layer. Here is an example aligned to show how the innermost message is nested inside the outer messages.”
corpus · a-gentle-introduction-to-supercollider-ruviaro-archive-org-c · chunk 8