s.boot;

(
SynthDef(\dsaf_horn1, { |rate=0.1|
var freq = LFPulse.kr(rate, 0.99, 0.4).lagud(0.4 / rate, 0.6 / rate) * \varfreq.kr(800) + \basefreq.kr(300) * [1,1.05];
// var freq = [ 300, 500, 800, 1100 ];
var son = LFPulse.ar(freq, 0.99, 0.2).lagud(0.4 / freq, 0.6 / freq) * 2 - 1;

// This filtering is a simple approximation of the plastic horn acoustics:
son = BPF.ar(son.clip2(0.2), 1500, 1/4) * 4;

// delay and reverb, to simulate the environment in which we hear the siren
son = son + DelayC.ar(son, 0.1, 0.1, 0.3);
son = son + FreeVerb.ar(son);
son = son * EnvGen.kr( Env.linen(0.01,1,0.01), timeScale: \dur.kr(1), doneAction: 2 );
// Out.ar(0, Pan2.ar(son * \amp.kr(1)));
Out.ar(0, son * \amp.kr(1));
}).add;
);

Sign in to participate in the conversation
post.lurk.org

Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.