Re: [chuck-users] determining the type of an Object in code
Hmmm, after testing I found that sadly the following will run (without errors) but won't "fly"; =============== SawOsc s => UGen patchpoint => dac; second => now; new LPF @=> patchpoint; second => now; ======================== It seems that asignment to a UGen doesn't affect the Ugen-graph? That sounds like the correct behaviour, as you only change the memory address 'patchpoint' is pointing to. The actual graph will know nothing of this event. I was thinking of a class that achieves what you are aiming for: UGenRepatch - usage would look like: UGenRepatch repatch; repatch.ugen(LPF lpf); repatch.addIn(SawOsc osc); repatch.addOut(dac); To setup the basic graph. After this you could repatch by saying: repatch.ugen(HPF hpf); Internally it would then unchuck the old LPF and place the HPF in the middle. Obviously you could also write functions to remove/replace Ins or Outs from the central UGen. This method adds yet another wrapper around the UGens, but might be worth it for the flexibility it provides. -Tiemen
participants (1)
-
Tiemen Meerman