SuperCollider - Question about Bus and execution order

Just started learning SuperCollider, I have a question about Bus.

2 lines executed in the following order produce a FM sound :

({, + (,1) * 1000),0,0.1))}.scope; // Carrier
{,,0,1))}.scope;) // Modulator

But with an opposite execution order, it only produces a Sine tone, as if no modulator presents. In scope, there is signal in Bus 5.

({,,0,1))}.scope; // Modulator
{, + (,1) * 1000),0,0.1))}.scope;) // Carrier

What’s the reason behind this behaviour? Thanks.


Maybe bus is not allocated in second code snippet, so out cannot connect to anything?

the bus is fine, it’s about execution order of the synths. the modulator has to execute before the carrier.

each Group has processing order including default root Group of default Server.

by default, { }.play and { }.scope add to the head of the processing queue. so first snippet works (car is created, then mod added to execute first)

this also works, explicitly setting order by reference:

~mod = {,,0,1))}.play; // Modulator
~car = {, + (,1) * 1000),0,0.1))}.play(target:~mod, addAction:\addAfter); // Carrier

and i think using InFeedback in carrier would work regardless of order, so more flexible, but adds 1 blocksize latency.

for more details and examples see Synth helpfile


Thank you for the help!

Here are the 2 related tutorials I found :