Try the attached patch on for size.
d.
Carlos Pita wrote:
Hi!
I'm writing a subpatch as part of a synthesizer
which includes a number of signal sources
(each one an instance of the mentioned
subpatch) which are combined together.
Each source can be of a different shape:
sinusoidal, sawtooth, triangle, noise,
etc. The subpatch includes a generator
for each kind but only one of them is
selected at a given time. I'm not sure
if it is possible to deactivate the non
selected ones. I mean not to 0-multiply
their output but a control facility to
temporarily stop them so that they don't
do any dsp at all (obviously for performance
improvement).
Thank you in advance.
Regards,
Carlos.
--
derek holzer :::
http://www.umatic.nl
---Oblique Strategy # 75:
"Ghost echoes"
#N canvas 65 164 620 284 10;
#X obj -49 239 outlet~;
#N canvas 0 0 368 396 sawtooth 0;
#X obj 226 19 inlet switch;
#X obj 226 47 switch~;
#X obj 57 120 sig~;
#X text 132 134 INLETS;
#X text 133 151 1 pitch (Hz);
#X obj 57 19 inlet pitch;
#X obj 57 295 outlet~;
#X obj 57 142 phasor~;
#X text 133 170 2 on/off switch (0 1);
#X connect 0 0 1 0;
#X connect 2 0 7 0;
#X connect 5 0 2 0;
#X connect 7 0 6 0;
#X restore 11 204 pd sawtooth;
#N canvas 0 0 521 192 switcheroo 0;
#X obj 23 17 inlet;
#N canvas 0 0 331 302 selector 0;
#X obj 78 15 inlet;
#X obj 49 145 outlet;
#X obj 119 145 outlet;
#X obj 194 145 outlet;
#X obj 78 42 select 0;
#X msg 129 75 0;
#X msg 172 75 1;
#X msg 49 75 1;
#X msg 91 75 0;
#X connect 0 0 4 0;
#X connect 4 0 7 0;
#X connect 4 0 8 0;
#X connect 4 1 5 0;
#X connect 4 1 6 0;
#X connect 4 1 3 0;
#X connect 5 0 1 0;
#X connect 6 0 2 0;
#X connect 7 0 1 0;
#X connect 8 0 2 0;
#X restore 23 49 pd selector;
#X obj 23 123 outlet;
#N canvas 0 0 331 302 selector 0;
#X obj 78 15 inlet;
#X obj 49 145 outlet;
#X obj 119 145 outlet;
#X obj 194 145 outlet;
#X msg 129 75 0;
#X msg 172 75 1;
#X msg 49 75 1;
#X msg 91 75 0;
#X obj 78 42 select 1;
#X connect 0 0 8 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 7 0 2 0;
#X connect 8 0 6 0;
#X connect 8 0 7 0;
#X connect 8 1 4 0;
#X connect 8 1 5 0;
#X connect 8 1 3 0;
#X restore 123 49 pd selector;
#X obj 123 123 outlet;
#N canvas 0 0 331 302 selector 0;
#X obj 78 15 inlet;
#X obj 49 145 outlet;
#X obj 119 145 outlet;
#X obj 194 145 outlet;
#X msg 129 75 0;
#X msg 172 75 1;
#X msg 49 75 1;
#X msg 91 75 0;
#X obj 78 42 select 2;
#X connect 0 0 8 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 7 0 2 0;
#X connect 8 0 6 0;
#X connect 8 0 7 0;
#X connect 8 1 4 0;
#X connect 8 1 5 0;
#X connect 8 1 3 0;
#X restore 223 49 pd selector;
#X obj 223 123 outlet;
#N canvas 0 0 331 302 selector 0;
#X obj 78 15 inlet;
#X obj 49 145 outlet;
#X obj 119 145 outlet;
#X obj 194 145 outlet;
#X msg 129 75 0;
#X msg 172 75 1;
#X msg 49 75 1;
#X msg 91 75 0;
#X obj 78 42 select 3;
#X connect 0 0 8 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 7 0 2 0;
#X connect 8 0 6 0;
#X connect 8 0 7 0;
#X connect 8 1 4 0;
#X connect 8 1 5 0;
#X connect 8 1 3 0;
#X restore 323 49 pd selector;
#X obj 323 123 outlet;
#N canvas 0 0 331 302 selector 0;
#X obj 78 15 inlet;
#X obj 49 145 outlet;
#X obj 119 145 outlet;
#X obj 194 145 outlet;
#X msg 129 75 0;
#X msg 172 75 1;
#X msg 49 75 1;
#X msg 91 75 0;
#X obj 78 42 select 4;
#X connect 0 0 8 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 7 0 2 0;
#X connect 8 0 6 0;
#X connect 8 0 7 0;
#X connect 8 1 4 0;
#X connect 8 1 5 0;
#X connect 8 1 3 0;
#X restore 423 49 pd selector;
#X obj 423 123 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 4 0;
#X connect 1 1 6 0;
#X connect 1 1 8 0;
#X connect 1 1 10 0;
#X connect 1 2 3 0;
#X connect 3 0 4 0;
#X connect 3 1 2 0;
#X connect 3 1 6 0;
#X connect 3 1 8 0;
#X connect 3 1 10 0;
#X connect 3 2 5 0;
#X connect 5 0 6 0;
#X connect 5 1 4 0;
#X connect 5 1 2 0;
#X connect 5 1 8 0;
#X connect 5 1 10 0;
#X connect 5 2 7 0;
#X connect 7 0 8 0;
#X connect 7 1 10 0;
#X connect 7 1 6 0;
#X connect 7 1 4 0;
#X connect 7 1 2 0;
#X connect 7 2 9 0;
#X connect 9 0 10 0;
#X connect 9 1 8 0;
#X connect 9 1 6 0;
#X connect 9 1 4 0;
#X connect 9 1 2 0;
#X restore 36 30 pd switcheroo;
#N canvas 0 0 286 346 sine 0;
#X obj 49 96 osc~;
#X obj 48 301 outlet~;
#X obj 146 18 inlet switch;
#X obj 146 46 switch~;
#X text 114 82 INLETS;
#X text 115 99 1 pitch (Hz);
#X obj 49 19 inlet pitch;
#X text 115 119 2 on/off switch (0 1);
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 6 0 0 0;
#X restore -48 204 pd sine;
#X obj 36 8 inlet switch;
#X obj -48 8 inlet pitch;
#X text 105 85 INLETS;
#X text 106 102 1 pitch (Hz);
#X text 268 215 derek@umatic.nl;
#X text 104 62 sine , sawtooth waves...add more of your own;
#X text 106 120 5 waveform selector (0 , 1 , ...) add more for more
waveforms;
#X connect 1 0 0 0;
#X connect 2 0 3 1;
#X connect 2 1 1 1;
#X connect 3 0 0 0;
#X connect 4 0 2 0;
#X connect 5 0 3 0;
#X connect 5 0 1 0;