Ok, little Question on Right-Understanding of Buses

So dear Community,#
and in special to the creaks on Suppercollider.
I have build a Synth to make some complexity Sounds.
And this Synth works by a Audio-Bus.
New I will make this Synth ready for Midi.
So every Midi Noteon wil create a new Copy on this Complex-Synth
And every Midi Noteoff will to the right corresponding Synth a Gate Signal to call it doneaction 2.
( So the Server would kill him Self when he has done his Work: Release ).
But the Problem is the Audio-Bus straight through the Synth.
I think it would be initialized by:
X = Bus.audio(s, 1);

And new the first Question:
Can I remove this Bus by saying only:
X.free(s);
Or need it to do more work.

First X is not a valid variable name – use x.

Second, buses always exist in the server. Bus.audio only reserves a bus number for that usage, and myBus.free only releases the bus number for use by another caller later.

The catch (if I’m understanding you) is that you shouldn’t free the bus until the synth’s envelope is finished.

The safest way is to use the synth’s onFree action.

b = Bus.audio(s, 2);

a = Synth(\default, [out: b]).onFree { b.debug("freeing bus").free };

a.release;

// appears slightly later in the post window
freeing bus: Bus(audio, 4, 2, localhost)

hjh

Ok, I’m silly.
When I have right understanding:

  1. .onFree calls the Function followed when Synth finisched
  2. b.free would free the Bus which Number is the value of b.

But then:

What means this:
a.) must I free the Bus once more
b.) Is the Bus there freed and could be used by other things

A hopefully not to confuse
CreCo

Oh,
Sorry you have give it me all.
I’m glad so a Idiot.
You have said “appears … later in the post window”
So it is already freed .

I’m to silly
But:
Thanks to your help now I can build my Synth for MIDI