O.k I think I’ve got it

These are two examples of serial effects routing

The first piece of code is simply using output numbers

Synthdef saw goes into filter then in delay ,delay goes to output

you can varry the crossfade

Order of execution

Execution of busses is not necessary ( in this example )

First execute synthdef layla and ~comber=synth

The execute filter synthdef and ~filtah=Synth

This will bring the filter on top of the group , so first filtering then delay

You can alter the filter frequency by executing ~filtah.set second line , or set xfade in the

first ~comber.set line to +1 to let the filtered signal through but unnafected by delay

Lastly execute saw +pbind

```
~filterbus=Bus.audio(s,2)///bus 4
~filterbus
~delaybus=Bus.audio(s,2)//bus 6
~delaybus
~testbus=Bus.audio(s,2)//bus 8
~testbus
(
SynthDef(\filter,//takes saw input and filters it the sends it to ~delaybus
{
|in,out,vol=0.5,cutoff=800,reso=0.5,xfade=(-1)|
var sig,processed;
sig=In.ar(in,2);
processed=RHPF.ar(sig,freq:cutoff,rq:reso);
processed=XFade2.ar(processed,sig,pan:xfade);
Out.ar(out,processed)
}).add
)
//...
(
SynthDef(\layla,///takes input from the filtered signal and sends it to bus 0
{|mdt=0.250,dt=0.10,dect=0.1,modspeed=0.5,modamt=0.01,hpf=100,in,xfadecontrol=0,out|
var sig ,modulator,processed;
sig=In.ar(in,2);
modulator=SinOsc.ar(modspeed)*modamt;
processed=CombC.ar(sig,mdt,dt+modulator,dect);
processed=HPF.ar(processed,hpf);
processed=XFade2.ar(processed,sig,xfadecontrol);
Out.ar(out,processed)
}).add)
///......
~comber=Synth(\layla,[\in,12,\out,0,\dt,0.222,\dect,2,])///delay
~comber.set(\mdt,0.5,\dt,0.25 ,\dect,4,\modspeed,0.001,\modamt,0.001,\hpf,40,\xfadecontrol,-1)//crossfade between -1 totally wet delay or 1 no delay
~comber.set(\in,12,\out,0)
~comber.set(\in,~delaybus,\out,0)
~comber.set(\in,~testbus,\out,0)
~comber.set(\in,18,\out,0)
~comber.set(\in,20,\out,0)
~comber.free
~comber.set(\mdt,0.5,\dt,0.25 ,\dect,4,\modspeed,0.001,\modamt,0.001,\hpf,40,\xfadecontrol,-1)//crossfade between -1 totally wet delay or 1 no delay
///////
~filtah=Synth(\filter,[\cutoff,2000,\reso,0.1,\in,10,\out,12,\xfade,-1])//crossfade between a filter saw =(-1) or a dry saw =1
~filtah.set(\cutoff,3500,\reso,0.3,\xfade,-1,\out,0,\xfade,-1,\in,10,\out,12)
~filtah.set(\cutoff,15000,\reso,0.3,\xfade,-1,\out,~testbus,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,14,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,16,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,18,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,20,\xfade,-1)
~filtah.free
/////Unfiltered saw goes to filterbus
(///execute last !
Pdef(\seq,
Pbind(\instrument,
\saw,
\dur,Pseq([1/4,1/4,1/2],inf),
\freq,Pseq([48,50,53,57],inf),
\dec,Pseq([0.120,0.050,0.200,0.050,0.725,0.125,0.01,0.02,0.02,0.02,0.02,0.5],inf),
\out,10,
)
)
)
//
t=TempoClock(96/60).permanent_(true)
Pdef(\seq).play(t)
Pdef(\seq).stop
//////////////
/////
(
SynthDef(\saw,
{ |out,freq=60,vol=0.5,att=0.001,dec=0.0250|
var sig,env;
sig=SawDPW.ar(freq.midicps)*vol;
env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
sig=sig*env!2;
Out.ar(out,sig);
}).add
)
////
```

The second piece of code is identical but using busses , so executing busses first , rest is thesame

```
~filterbus=Bus.audio(s,2)///bus 4
~filterbus
~delaybus=Bus.audio(s,2)//bus 6
~delaybus
~testbus=Bus.audio(s,2)//bus 8
~testbus
(
SynthDef(\filter,//takes saw input and filters it the sends it to ~delaybus
{
|in,out,vol=0.5,cutoff=800,reso=0.5,xfade=(-1)|
var sig,processed;
sig=In.ar(in,2);
processed=RHPF.ar(sig,freq:cutoff,rq:reso);
processed=XFade2.ar(processed,sig,pan:xfade);
Out.ar(out,processed)
}).add
)
//...
(
SynthDef(\layla,///takes input from the filtered signal and sends it to bus 0
{|mdt=0.250,dt=0.10,dect=0.1,modspeed=0.5,modamt=0.01,hpf=100,in,xfadecontrol=0,out|
var sig ,modulator,processed;
sig=In.ar(in,2);
modulator=SinOsc.ar(modspeed)*modamt;
processed=CombC.ar(sig,mdt,dt+modulator,dect);
processed=HPF.ar(processed,hpf);
processed=XFade2.ar(processed,sig,xfadecontrol);
Out.ar(out,processed)
}).add)
///......
~comber=Synth(\layla,[\in,~delaybus,\out,0,\dt,0.222,\dect,2,])///delay
~comber.set(\in,12,\out,0)
~comber.set(\in,~delaybus,\out,0)
~comber.set(\in,~testbus,\out,0)
~comber.set(\in,18,\out,0)
~comber.set(\in,20,\out,0)
~comber.free
~comber.set(\mdt,0.5,\dt,0.325 ,\dect,4,\modspeed,0.001,\modamt,0.001,\hpf,40,\xfadecontrol,-1)//crossfade between -1 totally wet delay or 1 no delay
///////
~filtah=Synth(\filter,[\cutoff,2000,\reso,0.1,\in,~filterbus,\out,~delaybus,\xfade,-1])//crossfade between a filter saw =(-1) or a dry saw =1
~filtah.set(\cutoff,3500,\reso,0.3,\xfade,-1,\out,0,\xfade,-1,\in,~filterbus,\out,~delaybus)//change frequency
~filtah.set(\cutoff,15000,\reso,0.3,\xfade,-1,\out,~testbus,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,14,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,16,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,18,\xfade,-1)
~filtah.set(\cutoff,1200,\reso,0.3,\xfade,-1,\out,20,\xfade,-1)
~filtah.free
/////Unfiltered saw goes to filterbus
(///execute last !
Pdef(\seq,
Pbind(\instrument,
\saw,
\dur,Pseq([1/4,1/4,1/2],inf),
\freq,Pseq([48,50,53,57],inf),
\dec,Pseq([0.120,0.050,0.200,0.050,0.725,0.125,0.01,0.02,0.02,0.02,0.02,0.5],inf),
\out,~filterbus,
)
)
)
//
t=TempoClock(96/60).permanent_(true)
Pdef(\seq).play(t)
Pdef(\seq).stop
//////////////
/////
(
SynthDef(\saw,
{ |out,freq=60,vol=0.5,att=0.001,dec=0.0250|
var sig,env;
sig=SawDPW.ar(freq.midicps)*vol;
env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
sig=sig*env!2;
Out.ar(out,sig);
}).add
)
////
```