exotic synth method

master
Leo Coogan 7 months ago
parent 0d8008222e
commit 68b40ca53a
Signed by: lcoogan
GPG Key ID: 54DBD17B0D75ABB0

@ -0,0 +1,32 @@
// Boot the server first
s.boot;
// Define a SynthDef using a damped harmonic oscillator model
(
SynthDef(\dampedResonator, {
|freq = 220, amp = 0.5, decay = 0.5|
var excitation, signal, damping;
// Impulse excitation (can replace with Dust or WhiteNoise)
excitation = Impulse.ar(0); // one-shot impulse at start
// Damping factor converted from decay time (rough approximation)
damping = exp(-2pi / (decay * SampleRate.ir));
// Simple feedback resonator: excitation + feedback loop
signal = Ringz.ar(excitation, freq, decay) * amp;
Out.ar(0, signal ! 2); // stereo output
}).add;
)
// Play a few resonant tones
(
Pbind(
\instrument, \dampedResonator,
\freq, Pseq([220, 330, 440, 550], inf),
\decay, Pseq([1.5, 1.2, 0.8, 0.5], inf),
\amp, 0.3,
\dur, 0.5
).play;
)
Loading…
Cancel
Save