Parallel filters

In the example you see only one declared variable a=saw ,going into first lowpass filter at 400hz
The second filter is a lowpass filter (7000hz) , I mulitplied it with zero ( so it makes o sound ) , it also takes the variable as an input
To my surprise ,the first filter is also not audible
I want to have some basic parallel filtering going on

//
(
{
var a;
a=Saw.ar([100,98])*0.3;
RLPF.ar(a,freq:400)*0.7;
RLPF.ar(a,freq:7000)*0.0;
}.play
)
//

Case solved , putting them on one line with extra parenthesis solved it

//
(
{
	var a;
	a=Saw.ar([100,98])*0.3;
	(RLPF.ar(a,freq:400)*0.7)+(RLPF.ar(a,freq:20)*0.0);
	
}.play
)
//

If I understand things correctly, the “.play” that is used throughout documentation and a first method to make sound as met by newcomers, is a “Function:-play”. The help file states: “Play a Synth from UGens returned by the function.” Now here’s a question: what do these functions return:

{ SinOsc.ar(234) } 
{ SinOsc.ar(300); SinOsc.ar(500); }
{ SinOsc.ar(300) + SinOsc.ar(500); }

Only the last line will return two UGens, while the first two one UGen. If I understand correctly, a function returns the last ‘statement’ or ‘value’:

{ 1; 2; 3; }.value // will return just 3

So your case of:

was returning only the last line which was RLPF.ar(a,freq:7000)*0.0;. An expanded and clearly readable example could also be:

{
	var a,b,c;
	a = Saw.ar([100,98])*0.3;
	b = RLPF.ar(a,freq:400)*0.7;
	c = RLPF.ar(a,freq:7000)*0.0;
	b+c;
}.play
)

the function returns b+c which is a sum of both filtering processes.

Yep I used a third argument for summing a+b
All good