( ~pausingOrbitJumper = { arg switchEvery = 16; var orbits = [~classicOrbit.value(), ~neoOrbit.value()]; var idx = 0; // idx maintains the current index into the array orbits. var curTriad = orbits[idx].next(); var counter = 1; Routine { curTriad.debug("starting pausingOrbitJumper with"); while {curTriad != nil} { curTriad.yield; counter = counter + 1; if (counter == switchEvery) { idx = (idx + 1) % 2; if (idx == 0) { postln("pausing neoOrbit, switching back to classicOrbit") } { postln("pausing classicOrbit, switching back to neoOrbit") }; counter = 1; }; curTriad = orbits[idx].next; } } }; ) ( Pbind(\scale, Scale.chromatic, \degree, ~pausingOrbitJumper.value(switchEvery: 8), \dur, 0.5, ).play; )