Ndef live coding strategies

Still have a ways to go with SC but recently in the habit of working in Ndef by default. As it’s fast to preview changes to sounds/ ideas fast.

But curious on how others work in SC ?

I can see how playing live would be fun but instantly poses a bunch of questions in terms of approach. For instance I can get understand how I’d make transitions from multiple routines grouped together to another different set of routines. But Pbinds with my current understanding would prob have update individually.

Curious how others mentally structure live coding
sets ups.

Hey, I use this type of naming. You can think of it as a modular synth.

Ndef(\test, { |freq=330,amp=0.1| SinOsc.ar(freq,0,amp) }).play;

Ndef(\test).map(\freq, Ndef(\test_freq, { |freq=0.3,min=110,max=220| SinOsc.kr(freq).range(min,max) }))

// you can do that nesting 3 to 4 levels -- then becomes messy

Ndef(\test)[1] = \filter -> { |in| FreeVerb.ar(in, 0.5, 0.5, 0.5) };

Ndef(\test).clear

/yorgos

yes very cool, Im somewhat similar In that I do not overwrite but copy and paste said Ndef one line below and then edit and re-evaluate. This is more organized. curious if you ever use system that allows you completely switch grouped sets of Ndefs.

maybe too im just over thinking and you could simply do all your plays in separate brackets for bigger grouped changes

(
Pdef(\a1).play;
Pdef(\a2).play;
Pdef(\a3).play;
)

(
Pdef(\b1).play;
Pdef(\b2).play;
Pdef(\b3).play;
)

I guess it just seems kinda clunky, idk

I guess it’s a matter of polyphony for you. I 'd rather go exploring deeper and deeper individual sounds (UGens, Ndefs).

And yes, you can use parentheses to play them all at once.

The approach I talked about is text-hungry, so when starting from a ready-made piece of code it will look bulky. When writing line-by-line feels somewhat OK, at the beginning, but when things pile up it’s not trivial anymore. I can hardly control it when I have three Ndefs with considerable amounts of control Ndefs (10-20 per sound). Eventually it can be like copying a lot, but still the script would be 300-500 lines (using one-liners).

/y

Yea your area of interest def sounds really interesting. True I’m coming at it from a different angle. Perhaps like multiple presets that share the same patch configuration to stick with the modular framework. I guess more I learn the more my approach will change. But yea a bit daunting trying to conceptualize the proper method of organization….