Bruno Ruviaro edited order of execution (cont).tex  almost 10 years ago

Commit id: c194675eb8df8edf36a2456d30a573a3e1dbeeaa

deletions | additions      

       

When you start to have lots of synths---some of them for source sounds, other for effects, or whatever you need---it may be a good idea to organize them into groups. Here's a basic example:  \begin{lstlisting}  // Keep watching everything in the NodeTree  s.plotTree;  // Create some buses  ~reverbBus = Bus.audio(s, 2);  ~masterBus = Bus.audio(s, 2);  // Define groups in proper order  ~sources = Group.new  ~effects = Group.new(~sources, \addAfter);  ~master = Group.new(~effects, \addAfter);  // This is the source sound  {Out.ar(~reverbBus, SinOsc.ar([800, 890])*LFPulse.ar(2)*0.1)}.play(target: ~sources);  // This is some reverb  {Out.ar(~masterBus, FreeVerb.ar(In.ar(~reverbBus, 2), mix: 0.5, room: 0.9))}.play(target: ~effects);  // Some silly master volume control with mouse  {Out.ar(0, In.ar(~masterBus, 2) * MouseY.kr(0, 1))}.play(target: ~master);  \end{lstlisting}  \lstinputlisting[style=SuperCollider-IDE, basicstyle=\scttfamily\footnotesize]{code-groups.scd}  For more information about order of execution, look up the Help files ``Synth,'' ``Order of Execution,'' and ``Group.''