Hi!
I apologize in advance if the question turns out to be silly, I’m quite new to SC and there’s a lot of things I still don’t understand properly…
Anyway, that’s my problem.
Let’s say I have a SynthDef named “hello”, generating a simple sine with random freq and random pan with a fixed envelope of 1 second and a doneAction: 2.
So, every time I recall “hello” with .play method I hear a random freq sine, randomly panned.
Perfect.
Now, what I need to do is to take “hello” and somehow put it in another SynthDef, named, for instance, “control_hello”.
I want “control_hello” to take two arguments: env_time and density.
In this way, every time I recall “control_hello” I can pass an env_time for all the “hello” instances generated, and (most important) specify how many "hello"s I need in terms of density over time.
The final line of code should be something like:
Synth.new(\control_hello, [\env_time, 3, \density, 100]);
In other words, I need a SynthDef to trigger another SynthDef (even better if I can fit all inside a single SynthDef, but not strictly necessary).
I have already tried the Mix.fill method, but that seems to need a fixed number of channels already declared (not a variable).
Any idea or examples to hack?
I hope I was clear, and sorry if there’s no code to start with, everything is still in my head since I don’t know how to formalize it.
Thank you so much!
Best,
Ardan.