Live streaming with Mads

Hi I’m doing some livestreamed systems maintenance now

1 Like

Live streaming again now :slight_smile:

2 Likes

Great stuff today, Mads! In regards to the issue of using the .lag method on a NodeProxy, it seems that it only works if the controls are declared as arguments, and not with the NamedControl style. For example, this works:

Ndef.clear;
Ndef(\a, {|freq = 200, amp = 0.2| Saw.ar(freq, amp!2)}).lag(\freq, 5, \amp, 2).play;
Ndef(\a).set(\freq, 100, \amp, 0.05);

But this does not:

Ndef.clear;
Ndef(\a, {Saw.ar(\freq.kr(200), \amp.kr(0.2)!2)}).lag(\freq, 5, \amp, 2).play;
Ndef(\a).set(\freq, 100, \amp, 0.05);

I imagine this is because NamedControls already have a lag argument. You could of course do something like this:

Ndef.clear;
Ndef(\a, {Saw.ar(\freq.kr(200, \freqlag.kr(5)), \amp.kr(0.2, \amplag.kr(2))!2)}).play;
Ndef(\a).set(\freq, 100, \amp, 0.05);

But that would still require a reworking of your existing SynthDef library. Perhaps there is another way around it?

Thanks a lot !! That’s a mega problem for me. And strange that there isn’t an issue on this ? Seems like a bug. Anyway thanks a lot for tuning in !

Really enjoyed the stream, Mads!

About the NodeProxy issue, perhaps you would be interested in trying out my environment, Alga. This would however require you to recompile your SynthDefs as AlgaSynthDefs. As an example, your \complex synth (took the code from your repositories) could be used as so:

(
Alga.boot({ 
	AlgaSynthDef(\complex, {| dur, freq=440, modFreq=100, 
		wavefold=0.1, numCells=4, timbreMod=1, amMod=0, fmMod=0 |
		
		var modulator = Squine.ar(
			freq: modFreq,
			clip: \mod_clip.kr(0),
			skew: \mod_skew.kr(0),
			initphase: \mod_phase.kr(1.25)
		);
		
		var fm = modulator.range(
			(1.0 - fmMod) * freq,
			freq
		)
		.lag(Rand(0.001,0.01));
		
		// var sig = SinOsc.ar(freq: fm,  phase: 0.0);
		var sig = Squine.ar(
			freq: fm,
			clip: \main_clip.kr(0),
			skew: \main_skew.kr(0),
			initphase: \mod_phase.kr(1.25)
		);
		
		var gain = wavefold.linexp(0.00000000000001,1.0,1.0,20.0);
		var am;
		
		gain = modulator.range(
			(1.0 - timbreMod) * gain,
			gain
		)
		.lag(Rand(0.001,0.01));
		
		am = modulator.range(
			(1.0 - amMod) * 1,
			1
		).lag(Rand(0.001,0.01));
		
		sig  = am * LockhartWavefolder.ar(input: sig * gain,  numCells: numCells);
	}).add
});
)

//Let's use the \complex AlgaSynthDef we just defined
a = AlgaNode(\complex, interpTime:3, playTime:2).play(chans:2)

//Now we're interpolating from 440 to 220 over 3 seconds
a <<.freq 220

//Another \complex node
b = AlgaNode(\complex, [\freq, 150])

//Let's do some fm on the frequency of a. 
//Note that it still takes 3 seconds to perform the interpolation from 220 to the new fm input
a.from(b, \freq, scale: [10, 300])

//Let's slow down the freq of the modulator over 5 seconds
b.from(10, \freq, time: 5)

I posted an issue including your example :slight_smile:

I am archiving my stream recordings on YouTube, if anyone’s interested.

2 Likes