If you would want to sent the same signal to output 0, 4, 6, 7 and 9, would you then use an array in Out.ar or create 5 new synths? which is more efficient?
I think the most sensible way to do this is keep the SynthDef simple, with one Out.ar bus argument. Then, make 5 Synths, initializing their bus indices as desired. I don't think either is more "efficient," but keeping the SynthDef simple retains more flexibility. (you can build a complex structure with simple blocks, but you can't build a simple structure with complex blocks).
I have noticed that .pause and .stop have not a very consistent functionality. - When applied on Routines, stop is a permanent action as you said. We cannot send the .resume later to continue the Synth evaluation from the last point. There is no support for .pause on Routines. - On Tasks, .pause and .stop seem exactly the same(in both causes we can then apply .resume to continue ), and neither of them is a destructive method. - On Pbinds, .stop and .pause both allow to continue, like in the case of Tasks. - Only on a Pdef, from my understanding, happens what seems more natural: The message .pause allows .resume later, but .stop is a destructive action.
True, and I can see how this would feel frustrating from certain perspectives. You're describing polymorphism (or something very nearly adjacent to polymorphism), a cornerstone of object-oriented programming - it describes a design feature that allows different objects to respond to the same method in different ways.
Thanks, Eli, for streaming these courses. I've gotten into the habit of using the Pattern class. Is there any scenario in SC where Routine is preferable?
Most things that can be done with Routines can also be done with Patterns, and vice-versa. Whether one is better than the other is a matter of context and preference. Frankly, patterns and routines are closely intertwined. They have a complex relationship, and it's not really a situation that is best summarized as "should I use A or B." Stream is a parent class of Routine, and by playing a Pbind or calling 'asStream' on a Pattern, you're effectively creating another type of Stream. Consider, for example, the Prout class, which is technically a Pattern, but relies on a Routine to determine its output specification. You'll also notice that the help documentation category is titled "Streams-Patterns-Events," which also reflects how Routines, Patterns, and a few other classes are all mingled together under a general "sequencing" umbrella.