Kick drum synthesis

Hi everyone!

I realised a while ago that there’s no “kick/bassdrum” synth in Sonic Pi, and I was wondering what would be the best approach to simulate this kind of percussive sound with existing synths (of course, using samples would be simpler, but I’d like to understand sound at a deeper level).

So I searched for a few examples and theories on the web and came up with this, mostly inspired by this post:

use_synth :sine

live_loop :kick do
  click = play :c3, release: 0.0125, amp: 5
  pop = play :c2, decay: 0.05, decay_level: 0.5, release: 0.25, amp: 2
  body = play :c2, sustain_level: 0.8, release: 0.8, amp: 2
  sleep 1
end

It doesn’t sound too bad, but I’d love to hear about different methods or tips to enhance this one. For example, is there an easy way to control the pitch for the different “layers”? Are there other synths (or FX) that would work better than a sine? And would someone have some kick or other percussion recipes to share? Thanks!

4 Likes

Small update: I’ve experimented a bit with snare drums, here’s something that works well with the above code, a least for the track I’m working on:

live_loop :snare do
  use_synth :cnoise
  click = play :c3, release: 0.02, amp: 1
  use_synth :bnoise
  body = play :c2, sustain_level: 0.8, release: 0.4, amp: 0.7
  sleep 1
end

I’d recommend adding a with_fx :reverb, room: 0.9 for a richer sound.

Here’s a basic kit.

live_loop :kick do
  use_synth :tri
  play :c3, slide: 0.05, release: 0.1
  control note: :c1
  sleep 1
end

live_loop :snare do
  sleep 0.5
  with_fx :rlpf, cutoff: 95, res: 0.55 do
    synth :beep, note: :f3, release: 0.07, slide: 0.07
    control note: :ds3
    synth :noise, release: 0.05, amp: 0.6
  end
  sleep 0.5
end

live_loop :hats do
  use_synth :noise
  nlen = [0.0625, 0.125, 0.25].choose
  with_fx :hpf, cutoff: 105 do
    4.times do
      play 64, release: rrand(0.03, 0.04)
      sleep nlen
    end
  end
end
6 Likes

Trust me on this… Kniknoo knows what he’s talking about. :slight_smile:

Eli…

Impressive, thanks a lot for sharing this. I didn’t know control could be used this way, and I never played a lot with the FXs you’re using. This is great, I see a lot of new possibilities now :slight_smile:

1 Like

I honestly wasn’t 100% sure control would work that way. :smiley:

Yeah, filters are great! A quick rundown:
You have a hpf, lpf, and bpf.
hpf is a high pass filter, it will remove frequencies below the cutoff while keeping frequencies above.
lpf is a low pass filter, the knob twiddler’s bread and butter. It will cut frequencies above the cutoff while allowing ones below.
bpf is a band pass filter. Frequencies above and below the cutoff will be removed and frequencies near the cutoff will be kept.
All of these filters have an “r” version, for instance :rlpf . The R stands for resonant, meaning that the cutoff will have a steeper slope that can be controlled, emphasizing nearby frequencies. At extreme levels, the filter can itself resonate create a sine wave at the cutoff level. Great for carving a flute sound out of noise.
Finally, all of these have an “n” variation, which stands for Normalized. I haven’t actually thought to use these, but should. These add a normalizer to the effect so that cutting frequencies doesn’t make the sound too quiet to hear.

I just recently got a Korg Monolgue, the kick and snare are very similar to how I do it there. I only have a LPF on it, so I do my hihats with resonance and modulation, rather than throwing a HPF over noise.

1 Like

Thanks for the explanations, I knew these different kinds of filters are essential but never quite managed to understand what they actually did despite having used them a bit in various DAW. Now that I see them applied to clear purposes it finally makes sense :slight_smile:

Certainly! To get started, I’d suggest playing around with the tb303 for a while. It’s perfect for easing into a LPF over resonant waveforms. You’ll hear a lot of variance in Squares and Saws, but none with a sine wave. Tutorial A5 will help you out a lot with that. From there, apply what you learn about the 303 filter to an LPF plugin. I should also mention Wobble and IXITechno. Eventually, you’ll realize that you wish you could just sweep back and forth on the cutoff and both of these plugins will help you to achieve that.

Great idea! Especially since the 303 is something I’ve been playing with a lot without understanding much about it. Experimenting with a 303 and your recipes should be perfect to build a Sonic Pi acid kit. This reminds me the good old days of Propellerhead’s Rebirth!

2 Likes

Don’t know if this will be of any help… I put a front-end on someone
elses code, and called it The Techno Toolkit… that was a while bak.

I’ve recently written my own ‘Dub Generation’ toolkit, and dubbed one
of Kniknoo’s cool tracks…

I’d be interested in seeing your Acid Toolkit when it’s complete,

Here’s a breakdown on the scriptable commands I created for T.T.T.

Hope it helps.

Eli…

6 Likes

Wow, this is crazy! I really like the panel idea, and this seems packed with a lot of features, thanks a lot for sharing this. It will take me a while to figure everything out since this clearly a bit above my current coding skills, but there’s a lot to learn here.

Hey, I just put the panel on, and wrote some control loops.
Thank Martin, he wrote the original code. Credit where it’s due.

(But yeah, it’s a pretty awesome panel… I’ll take that bow. :slight_smile: )

Eli…

Yay Rebirth! I used to get in trouble in coding class for playing with it. Now it all comes full circle. :smiley: I’m kind of a total geek for some Acid House. Here’s a song I put together today. For ref, this is all hardware, no code. I’m just getting this setup together and have only barely incorporated the Pi yet. I’ll post some SPi controlled tracks as I make them. https://www.facebook.com/kn1kn00/videos/10159590944095360/

Thank you for sharing those Eli!

1 Like

Mmm… dunno why, but I’ve never, ever, been on ‘Face-less’… .nor do
I know anybody who is… same with Twitter, or whatever the current
flavour of Social Mediocre being used…

So, have to skip your track unless its on your Git? goes for a look.

I also have difficulty separating the terms 'House, Acid House, Garage’
and a few other genre names… when it comes to Music, I have 'Like’
and ‘Not Like So Much’… so I dont know if this classes as Acid House…

Oh, and can I introduce people to these chaps, who were ruling a club
in Bristol, England on Saturday night… I left at 4 a.m. when my poor old
legs could not handle any more dancing…

‘45 Vinyl only label based in Berlin - London - Hamburg. Spreading the
good stuff with unique Hip Hop & Funk infused Edits’

Rave on…

Eli…

1 Like

It’s a public post, anyone can see.
Acid House is distinguished by a squelchy bassline, usually a TB303, and often minimalist production. It also typically has low harmonic content or is even completely discordant.
Here’s an example. Though this one is unusually melodic. https://youtu.be/f94QTRztiYA

I really dig your track above!

Hi,

just did a bit of experimenting. Another way to approach a kick could be this:

live_loop :kick do
  s = synth :sine, note: :g2, amp: 1,
    attack: 0.005, attack_level: 5,
    release: 0.25
  control s, note: :c2, note_slide: 0.125,
    amp: 0.5, amp_slide: 0.075
  sleep 1
end

Of course you can add and alter all options but quite fruitful are

  • to set a longer (or even shorter) release
  • a higher attack level (to give it more punch)
  • differnt start and end notes (which changes the sound drastically)
  • and to play with the slide_values
3 Likes

That sounds really good, thanks :slight_smile: I think I’ll have an increasingly harder time going back to classic DAWs given the huge freedom and control Sonic Pi offers.

2 Likes

Which fits in beautifully with a howto I was just reading up
on SoundRadar about making your own hip-hop beats…
and how to improve them.

There’s a section on Hip-Hop Kicks… worth a read.

http://www.musicradar.com/news/tech/sampleradar-316-free-hip-hop-samples-248617

And a pretty good set of tips on making your own House tracks. :slight_smile:

http://www.musicradar.com/news/tech/sampleradar-338-free-house-samples-267013

Enjoy!

Eli…

1 Like

Well, you might be able to combine the best of the two worlds… :wink:

I’ve been meaning to dig this out for this thread for a while now:

Just goes to show, ingenuity can go a long way!

To get an authentic sounding chip triangle wave, you can use the :chipbass synth. Check out the other :chip* synths as well if that’s your thing…

2 Likes