Bela Lugosi drum beat (Bauhaus)

I’m just barely getting into Sonic Pi, and I’m blown away with what I can do fairly easily. Here is a initial crack at the drum beat from Bela Lugosi’s dead by Bauhaus.

I initially tried to do two synced live loops, one with the cymbal and kick, the other with the snap, but I could not get the snap to work right. I could get the snap timed with the kick, but couldn’t get it to alternate from on the downbeat to on the upbeat using sleep timing. I’ll have to have a go at that later. Anyway here’s what I did come up with.

live_loop :Bela do
  
  use_bpm 150
  
  #measure 1: snap on 1, 2.5, 4; measure 2: snap on 1.5, 3
  
  #1
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  with_fx :echo, mix: rand(0.7), phase: rrand(0.1, 0.2) do
    sample :perc_snap, amp: 0.8
  end
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
  #2
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  with_fx :echo, mix: rand(0.7), phase: rrand(0.1, 0.2) do
    sample :perc_snap, amp: 0.8
  end
  sleep 0.5
  
  #3
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
  #4
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  with_fx :echo, mix: rand(0.7), phase: rrand(0.1, 0.2) do
    sample :perc_snap, amp: 0.8
  end
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
  #1
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  with_fx :echo, mix: rand(0.7), phase: rrand(0.1, 0.2) do
    sample :perc_snap, amp: 0.8
  end
  sleep 0.5
  
  #2
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
  #3
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  with_fx :echo, mix: rand(0.7), phase: rrand(0.1, 0.2) do
    sample :perc_snap, amp: 0.8
  end
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
  #4
  sample :drum_cymbal_pedal, amp: 0.15
  sample :drum_heavy_kick, amp: 0.5
  sleep 0.5
  
  #and
  sample :drum_cymbal_pedal, amp: 0.15
  sleep 0.5
  
end

Too bad I don’t have a bass guitar :slight_smile:

Hi.

Consider using the ‘at’ command, for partial beats.

Example:

use_bpm 120
live_loop :beat4 do
  sleep 4
end


define :hat do
  at [0, 2, 3],
  [{:amp=>0.3}, {:amp=> 1}, {:amp=>0.5}] do |p|
    sample :drum_cymbal_pedal, p
  end
end

define :drum do
  at [1, rrand_i(2, 3)],
  [{:amp=>1}] do |p|
    sample [:drum_bass_hard, :drum_bass_soft].choose, p
  end
end



live_loop :do_hat do
  sync :beat4
  hat
  sleep 1
end

live_loop :do_drum do
  sync :beat4
  drum
  sleep 1
end

And for a bass guitar… mmm… so many ways. :slight_smile:

use_bpm 110

live_loop :bassline1 do
  use_synth :prophet
  use_synth_defaults release: rrand(0.05, 0.25), amp: rrand(1.5, 2)
  notes = scale(:d2, :minor)
  play notes.tick, cutoff: rrand(40, 120)
  
  sleep 0.25
end

live_loop :bassline2 do
  use_synth :blade
  use_synth_defaults release: rrand(0.25, 0.5), amp: rrand(1.5, 2)
  
  if rand(1) > 0.65 then
    notes = scale(:d2, :minor) + (ring :r)
  else
    notes = scale(:d1, :minor).shuffle + (ring :r)
  end
  
  play notes.tick, cutoff: rrand(40, 120)
  sleep 0.25
end
use_bpm 90


live_loop :bass do
  if rand(1) > 0.75
    n = (ring :r, :r, :c2, :d3, :r, :f3, :r, :a1, :f2)
  else
    n = (ring :r, :r, :c2, :d3, :r, :f3, :r, :a1, :f2)
    n=n.shuffle
  end
  use_synth :fm
   use_transpose [0,+12].choose
  use_synth_defaults release: 0.125 + rrand(0, 0.2), amp: 0.5, pan: rrand(-0.5, 0.5)
  play n.look, cutoff: rrand(30, 130)
  sleep 0.25
  tick
end

Have fun!

Eli…

Thanks Eli! I was just looking at the song you posted by Nanomancer I think. I pasted that in and gave it a listen. It was amazing! I saw what you are talking about in that code.

Right now I have learned enough of this language to order a beer a meal and find the bathroom, but I might end up at a really dodgy hotel. :beer:

I tried using the “at” command to trigger samples, but after one loop each sample would start playing doubles and triples and playing on counts I didn’t specify. I thin iI needed to understand how to put an upper limit on the command so it would be more like at 2 of 8 counts play x

I did rework the loops to my satisfaction just using sleeps and understanding better how loops trigger in general. Here’s the drums and bass line.

load_sample :drum_heavy_kick
load_sample :drum_cymbal_pedal
load_sample :perc_snap

use_bpm 150

live_loop :kicktick, delay: 4 do
  8.times do
    sample :drum_heavy_kick, amp: 0.8
    sample :drum_cymbal_pedal, amp: 0.5
    sleep 0.5
    sample :drum_cymbal_pedal, amp: 0.5
    sleep 0.5
  end
end

live_loop :rim do
  sync :kicktick
  5.times do
    with_fx :echo, mix: rand(0.9), phase: rrand(0.1, 0.5) do
      sample :perc_snap, amp: 0.5
      sleep 1.5
    end
  end
end


live_loop :bassline, delay: 20 do
  note2 = (ring :Cs3, :Cs3, :G2, :Cs3)
  play :D3, amp:0.8, decay: 3, sustain_level: 0.6, release: 0.4
  sleep 4
  play note2.tick, amp:0.8, decay: 3, sustain_level: 0.6, release: 0.4
  sleep 4
  play :B2, amp:0.8, decay: 6, sustain_level: 0.3, release: 0.4
  sleep 8
end

Thats the great thing about SP… if one method doesn’t suit you,
there’s always another way that will.

My first tunes were all over the place (no kidding!) but
gradually my code tightened up, to the point other people
weren’t scratching their heads in confusion :slight_smile:

It will all fall into place mate. Just keep going.

Eli…