this is for holding javascript data
Bruno Ruviaro edited order of execution (cont).tex
almost 10 years ago
Commit id: 83bae79fe8932e07f149cbe22891eaa616581b49
deletions | additions
diff --git a/order of execution (cont).tex b/order of execution (cont).tex
index 736ae52..39f25c1 100644
--- a/order of execution (cont).tex
+++ b/order of execution (cont).tex
...
\begin{figure}[h]
\centerline{
\includegraphics[scale=0.5]{fig-node-tree.png}}
\caption{Synth nodes in the Node Tree window}
\label{fig:node-tree}
\end{figure}
Synth nodes in the Node Tree window run from \emph{top to bottom}. The most recent synths get added to the top by default. In figure \ref{fig:node-tree}, you can see that \texttt{"noise"} is on top, so it's the first to be calculated. Then \texttt{"filter"} comes second, and \texttt{"masterOut"} comes last. This is the right order we want. If you now try running the example again, but evaluating the lines \texttt{m}, \texttt{f}, and \texttt{n} in reverse order, you will hear nothing, because the signals are being calculated in the wrong order.
Evaluating the right lines in the right order is fine, but it might get tricky as your code becomes more complex. In order to make this job easier, SuperCollider allows you to explicitly define where to place synth in the Node Tree. For this we use the \texttt{addAction} argument.