Sync Oscillators in Ndef

I have a rhythmic Ndef with a LFO (LFTri, LFSaw) as reference for the beat. Obviously when I relaunch the Ndef the LFO in the new Ndef isn’t in Phase with the old Ndef.

Has anyone a good strategy to sync this?

Is there a convienent way to sync oscillators from Outside a Ndef, Synthdef etc. to global time, a masterclock or something similar.

cheers, Bernhard

Usually, I’ll do one of two things:

  • Use one Ndef with a universal time, and drive the other oscillators with it. You’ll end up re-creating LFSaw and friends yourself, but those ones at least are relatively easy…
Ndef(\time, {,, 0, inf).poll });
Ndef(\lfsaw, { 
	((\ / \ % 1.0).poll

	\freq, 10.1,
	\time, Ndef(\time).asMap
  • Stick all my “synced” oscillators in a single Ndef, so that they’re all restarted together:
Ndef(\oscs, { 

Ndef(\sound, {
	var freq = 400;
		freq * (1 + \, 1, -0.1, 0.1)) 

Ndef(\sound) <<>.mod Ndef(\oscs).asMap[1]