Switch class public functions
Additional functions inherited from
Filter.
- Switch(int switchSample);
- switchSample is the sample at which time the inputs[1] will
replace inputs[0] in the output() function.
- ~Switch();
- Does nothing.
- void action(void);
- ticks the currently selected input. Other input is left dormant.
- int getDurationSamples(void);
- Returns the duration that the inputs[0] will be selected
in output().
- sampleType output(int index);
- Returns inputs[0] if periodCounter is less than period, otherwise
inputs[1] will be returned.
- void setDurationSamples(int switchSample);
- Set the sample length that inputs[0] will be active before
inputs[1] will be used.
- void tick(long newTickNumber);
- Overrides the Filter tick() function. Will only tick the active
input, (either 0 or 1).
- void trigger(void);
- Resets the periodCounter. inputs[0] will be read until
periodCounter >= period.