Setting parameters in Ndefs

Is there a way to simultaneously set a parameter in all existing Ndefs? The use case I have in mind is syncing the phases of several LFOs. Thanks!

You can maybe do something like what you want by setting a value (or trigger) on the Group. You can set a value easily enough to a specific Ndef, but you want to set all Ndefsā€¦so you could set the value on the Default Group (which contains all Ndef groups, if they were instantiated in the usual way).

// Create and play a bunch of Ndefs at different times
(
fork {
	[\a, \b, \c].do{ arg proxyName;
		Ndef(proxyName, {
			var freqMult = Env.perc(1, 4).kr(0, \reset.tr(1)) + 1;
			SinOsc.ar(ExpRand(100, 400) * Rand(0.99,1.01!2) * freqMult);
		}).vol_(0.1).play;
		rrand(0.5,2).wait;
	};
};
)
// You can retrigger the envelope for just one:
Ndef([\a, \b, \c].choose).set(\reset, 1);


// Or you can retrigger all by sending a message to the Default Group
s.defaultGroup.set(\reset, 1);

you could also have one main phasor which you can reset and subdivide with (mainPhasor * div).wrap(0, 1); to drive all of your LFO shapes at different rates.

EDIT: if you get the slope of your main phasor and then run Duty at samplerate as a counter and mulitply it by the main phasors slope and divide it by your subdivision, you can also have subdivided ramps which are longer then your original phasor, which is not possible if you use (phasor * div).wrap(0, 1);. The sin function here could be swapped for anything else for other LFO shapes. These will always be 100% synced and you can reset the main phasor. You dont even need several instances of Duty, you can have just one accumulator and multiply it by different slopes and ramp division works perfectly with non integer divisions.

(
var rampToSlope = { |phase|
	var delta = Slope.ar(phase) * SampleDur.ir;
	delta.wrap(-0.5, 0.5);
};

var rampDiv = { |slope, ratio|
	var accum = Duty.ar(SampleDur.ir, 0, Dseries(0, 1));
	(slope / ratio * accum).wrap(0, 1);
};

{
	var measurePhase, measureSlope, reset, phaseA, phaseB, phaseC, lfoA, lfoB, lfoC, lfoD;

	reset = \reset.tr(0);
	measurePhase = (Phasor.ar(reset, 500 * SampleDur.ir) - SampleDur.ir).wrap(0, 1);
	measureSlope = rampToSlope.(measurePhase);
	
	phaseA = rampDiv.(measureSlope, 0.5);
	phaseB = rampDiv.(measureSlope, 2);
	phaseC = rampDiv.(measureSlope, 3);

	lfoA = sin(measurePhase * 2pi);
	lfoB = sin(phaseA * 2pi);
	lfoC = sin(phaseB * 2pi);
	lfoD = sin(phaseC * 2pi);

	[lfoA, lfoB, lfoC, lfoD];
}.plot(0.02);
)