ofxPDSP
ofxPDSP copied to clipboard
pdsp::Switch. simple example needed for testing
I've looked at the documentation but I cannot understand how 'switch' works. There appears to be no method for setting a switch to a particular "position".
pdsp::Switch
takes multiple inputs (patched to the input( int i )
method and outputs just one of the signals.
there is not a method to switch input, which input is selected is decided by the values going to the in_select()
input port, you can also just send float values to it with the >>
operator
ok so its not really a proper switch then, more a weird multiplexer. :( So what is the correct way to switch a signal on and off? guess I could use an Amp with 0.0 and 1.0 maybe?
yes, using an amp and putting 0.0f / 1.0f into in_mod()
is the correct way to switch a signal off, when the in_mod()
of pdsp::Amp
goes to zero all the signal patched into the in_signal()
are not processed