shithub: neindaw

ref: 9b646fb0b8f7c6f610110117ea22e0645cc5dc8e
dir: /kick_drum.dsp/

View raw version
// Simple kick drum
declare name "Kick Drum";
declare group "Synthesis";
import("stdfaust.lib");

aFreq = hslider("v:A/[0]Frequency[unit:Hz]", 100, 10, 400, 5);
aA = hslider("v:A/[1]Attack[unit:s]", 0.001, 0.00001, 0.2, 0.001);
aD = hslider("v:A/[2]Delay[unit:s]", 0.01, 0.00001, 1.0, 0.001);
aR = hslider("v:A/[3]Release[unit:s]", 0.001, 0.00001, 1.0, 0.001);
bA = hslider("v:B/[1]Attack[unit:s]", 0.001, 0.00001, 0.2, 0.001);
bR = hslider("v:B/[2]Release[unit:s]", 0.001, 0.00001, 1, 0.001);
bFreq = checkbox("v:B/[3]Enable") * hslider("v:B/[0]Frequency", 200, -400, 400, 5);

process = os.hs_oscsin(aFreq + bFreq*en.ar(bA, bR, 1)) * en.adsr(aA, aD, 0.000001, aR, 1.0);