Skip to content

Commit

Permalink
dirt-synths: add delay send parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
telephon committed Mar 6, 2018
1 parent ec83b12 commit fcdb2ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/DirtOrbit.sc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DirtOrbit {

initDefaultGlobalEffects {
this.globalEffects = [
GlobalDirtEffect(\dirt_delay, [\delaytime, \delayfeedback, \delayAmp, \lock, \cps]),
GlobalDirtEffect(\dirt_delay, [\delaytime, \delayfeedback, \delaySend, \delayAmp, \lock, \cps]),
GlobalDirtEffect(\dirt_reverb, [\size, \room, \dry]),
GlobalDirtEffect(\dirt_leslie, [\leslie, \lrate, \lsize]),
GlobalDirtEffect(\dirt_rms, [\dirtOut, \rmsReplyRate, \rmsPeakLag]),
Expand Down
11 changes: 8 additions & 3 deletions synths/core-synths-global.scd
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,22 @@ CORE SYNTHDEFS FOR DIRT
Each must have at least: dryBus, effectBus, gate
dryBus and effectBus have \ir as rates (they shouldn't change at runtime)
*/




if(\SwitchDelay.asClass.notNil) {

SynthDef("dirt_delay" ++ numChannels, { |dryBus, effectBus, gate = 1, delaytime, delayfeedback, delayAmp = 1, lock = 0, cps = 1|
SynthDef("dirt_delay" ++ numChannels, { |dryBus, effectBus, gate = 1, delaytime, delayfeedback, delaySend = 1, delayAmp = 1, lock = 0, cps = 1|
var signal;
var input = In.ar(dryBus, numChannels);
var maxDelayTime = 4;

input = input * delaySend.lag(LFNoise1.kr(1).range(0.01, 0.02)); // regulate input

delayfeedback = delayfeedback.max(0);
delaytime = delaytime * if(lock, reciprocal(cps), 1);
delaytime = delaytime.clip(0, maxDelayTime); // just to be sure
Expand Down Expand Up @@ -120,7 +124,7 @@ CORE SYNTHDEFS FOR DIRT


// thanks to Jost Muxfeld and James McCartney
// note that "size" is not room size, just a depth metaphor
// note that "size" is not room size, just the feed level into the room

SynthDef("dirt_reverb" ++ numChannels, { |dryBus, effectBus, gate = 1, room = 0, size = 0.1, dry = 0|
var in, snd, loop, depth;
Expand Down Expand Up @@ -165,7 +169,8 @@ CORE SYNTHDEFS FOR DIRT
var in, distance, throb, sound1, sound2, bal1, bal2, snd;

in = In.ar(dryBus, numChannels);
ReplaceOut.ar(dryBus, in*(1-leslie));
ReplaceOut.ar(dryBus, in * (1 - leslie));

if(numChannels > 2) { in = in.clump(2).sum };
distance = SinOsc.ar(Lag.kr(lrate,10), 0).range(0, lsize);
throb = SinOsc.ar(Lag.kr(lrate*0.8, 20), 0).range(0,lsize*1.3);
Expand Down
1 change: 1 addition & 0 deletions used-parameters.scd
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ vowel
delaytime
delayfeedback
delayAmp
delaySend
lock
cps
size
Expand Down

0 comments on commit fcdb2ab

Please sign in to comment.