Procedural Snare

So, I have something like:

  void createSinewave (short * array, int duration, int startOffset,
 float freq, float amp);
     void createSquarewave (short * array, int duration, int startOffset,
 float freq, float amp);

Other functions β€œfill” the waveform from a certain low frequency to a certain high frequency and take two frequency parameters.

Using only these features, I was able to create many sounds .. a percussion drum, an old school laser fire and many things that sound like steps. I could not synthesize the drum type sound.

Any suggestions on how to create it? What frequencies to mix and in what quantities to mix them? Other types of waveforms to use than sine, square and triangular wave?

Kind of inspiration 64 k performed contests.

+6
language-agnostic audio procedural procedural-music
source share
2 answers

Drums are often synthesized by short bursts of noise, such as white , pink or brown .

Of these, white noise is easiest to generate: just fill your array with random samples, independently selected with equal probability. Brown noise is also quite simple.

+2
source share
+4
source share

All Articles