_       _       
  (_) ___ | |_ ____
  | |/ _ \| __|_  /
  | | (_) | |_ / / 
 _/ |\___/ \__/___|
|__/               

Drum Synth notes

Octave code:

x = [0 1];
x = [x x]; # 10 times to increase length of x to 2048
y = repelem(x, 4);
Fs = 8000;
t = [1:Fs]/Fs;
env = exp(-t/0.2);
b = rand(1,8000)>0.5;
sound (y(1:8000).*env)
sound(b(1:4000).*env(1:2:8000))
sound([b(1:4000).*env(1:2:8000) zeros(1,4000)] + repelem(b(1:4000),2).*env(1:1:8000))