Sorry, let me see if I can rephrase this better.
I think the ideal would be to have some sort of definition that could be reused in multiple places, instead of having an ~osc1, ~osc2, ~osc3 for each instance. Granted, when working with Nodes, they would still need to be located at certain numbered slots anyway.
Something like this would be the example I was thinking of:
~osc = { |freq = 20, amp = 0.1|
Saw.ar((freq+(LeakDC.ar(\in.ar)*freq)), amp).dup
};
The scaling of the amplitude of the preceding oscillator would determine how much of modulation would occur in the successive oscillator.
Something like this, I would think would work:
~osc.(\freq, 2, \amp, 3000) <>> ~osc <>> ~out;
The issue, for some sort of feedback loop, then becomes how to refer to specific instances of each function. This is possible in NodeProxy, but maybe that’s not part of JITModular?
I also seem to be experiencing some blow-ups with the following, which may be part of my misunderstanding the paradigm here:
s.boot;
p = ProxySpace.new.push;
// a stable output location,
// connected (by .play) to the hardware output
~out = { \in.ar(0!2) }; ~out.play;
// a sawtooth oscillator
~osc = { |freq = 6, amp = 0.1|
Saw.ar(freq, amp*5000).dup.range(0, 1)
};
~osc2 = { |freq = 20, amp = 0.1|
Saw.ar((freq+(LeakDC.ar(\in.ar)*freq)), amp).dup
};
~osc.(\freq, 20, \amp, 3000) <>> ~osc2 <>> ~out;
//then the blowup:
~osc.set(\freq, 1);