How to create this Billie Jean drum pattern

Hello friends,
I am trying to make drum pattern given here :

How to code this in spi:

use_bpm 117

live_loop :cymbal do
  4.times do
    sample :drum_cymbal_hard;
    sleep 0.5
  end
end



live_loop :kick do
  2.times do
    sample :drum_heavy_kick;
    sleep 2
  end
end

live_loop :snare do
  2.times do
    sleep 1
    sample :sn_dolf;
    sleep 2
  end
end

But it is not giving the intended sound.
Can you please help me.

These are the samples I collected related to drum:

sample :drum_roll
sample :drum_splash_hard
sample :drum_cymbal_open
sample :drum_splash_soft
sample :drum_cymbal_hard
sample :drum_cymbal_soft
sample :drum_tom_lo_hard
sample :drum_tom_mid_hard
sample :drum_tom_hi_hard
sample :drum_bass_hard
sample :drum_tom_lo_soft
sample :drum_snare_hard
sample :drum_tom_mid_soft
sample :drum_tom_hi_soft
sample :drum_bass_soft
sample :drum_snare_soft
sample :drum_cymbal_pedal
sample :drum_cymbal_closed
sample :drum_heavy_kick
sample :drum_cowbell

sample :bd_mehackit
sample :bd_boom
sample :bd_zome
sample :bd_sone
sample :bd_tek
sample :bd_klub
sample :bd_haus
sample :bd_808
sample :bd_gas
sample :bd_pure
sample :bd_zum
sample :bd_ada
sample :bd_fat

sample :sn_zome
sample :sn_generic
sample :sn_dolf
sample :sn_dub

Hi
there would be several solutions, but the simplest is this:


use_bpm 117

live_loop :kksn do
  sample :drum_bass_hard
  sleep 1
  sample :drum_snare_hard
  sleep 1
end

live_loop :hats do
  sample :drum_cymbal_closed
  sleep 0.5
end

Or to use just one loop:


use_bpm 117

hh = [1,1,1,1]
kk = [1,0,0,0]
sn = [0,0,1,0]

live_loop :billie do
  tick
  
  sample :drum_cymbal_closed if hh.look == 1
  sample :drum_bass_hard if kk.look == 1
  sample :drum_snare_hard if sn.look == 1
  
  sleep 0.5
end

And I took the liberty of ‘correcting’ your example:

use_bpm 117

live_loop :cymbal do
  sample :drum_cymbal_closed
  sleep 0.5
end

live_loop :kick do
  sample :drum_heavy_kick
  sleep 2
end

live_loop :snare do
  sleep 1
  sample :sn_dolf
  sleep 1
end

/
or make the snare loop wait one beat as follows:
live_loop :snare, delay: 1 do
  sample :sn_dolf;
  sleep 2
end
/

PD-Pi

3 Likes

Excellent solutions. Thanks for suggesting multiple ways and correcting my try.

2 Likes

You’re very welcome, it’s what the forum’s for, and we all learn by sharing - win win :wink:

1 Like

I wondered how I would code it. Here you go.


# Michael Jackson - Billie Jean (Official Video)
# https://www.youtube.com/watch?v=Zi_XLOBDo_Y

# Michael Jackson's Drummer Jonathan Moffett Performs "Billie Jean"
# https://www.youtube.com/watch?v=gFbZiIjFmz8


set_volume! 2

use_bpm 117
with_fx :reverb, room: 0.4 do
  
  live_loop :a1 do
    tick
    
    drum = knit(1,32,2,32).ramp.look
    case drum
    when 0
    when 1
      puts "Pattern 1" if spread(1,8).look
      sample :bd_fat, amp: 4 if spread(2,8).look
      sample :drum_snare_hard if spread(2,8).rotate(2).look
      sample :drum_cymbal_closed, amp: rrand(0.8,1.2)+0.2
    when 2
      puts "Pattern 2" if spread(1,8).look
      sample :bd_fat, amp: 4 if spread(2,8).look
      sample :drum_snare_hard if spread(2,8).rotate(2).look
      sample :drum_cymbal_closed, amp: rrand(0.8,1.2)
      
      /cymbal 2/
      sample :sn_zome, start: 0.35, finish: 0.5, amp: 2.5, attack: 0.025, release: 0.025
    end
    
    sleep 0.5
  end
  
end
1 Like

Nice.
Can I ask you a question?
Is it possible to code complete background (except the vocals) music of Billie Jean in sonic-pi.
Or at least drums and guitar for the first 20 seconds or so.

1 Like

Ok, I’ll start :wink:
This is just quick and dirty.

use_bpm 117

hh = [1,1,1,1]
kk = [1,0,0,0]
sn = [0,0,1,0]

live_loop :billie do
  tick
  
  sample :hat_zap, attack: 0.1 if hh.look == 1
  sample :drum_bass_hard if kk.look == 1
  sample :drum_snare_hard if sn.look == 1
  
  sleep 0.5
end

use_synth :bass_foundation
use_synth_defaults cutoff: 70, release: 0.2

live_loop :bass do
  play_pattern_timed [:fs2, :cs2, :e2, :fs2, :e2, :cs2, :b1, :cs2], [0.5]
end



use_synth :dsaw
live_loop :billie1, delay: 16 do
  play [:a3, :cs4, :fs4], attack: 0.1, release: 0.4
  sleep 1.5
  
  play [:b3, :ds4, :gs4], attack: 0.1, release: 0.4
  sleep 2.5
  
  play [:cs4, :e4, :a4], attack: 0.1, release: 0.4
  sleep 1.5
  
  play [:b3, :ds4, :gs4], attack: 0.1, release: 0.4
  sleep 2.5
end

use_synth :blade
live_loop :billie2, delay: 16 do
  
  use_synth_defaults amp: 2
  play [:a3, :cs4, :fs4], attack: 0.1, release: 0.4
  sleep 1.5
  
  play [:b3, :ds4, :gs4], attack: 0.1, release: 0.4
  sleep 2.5
  
  play [:cs4, :e4, :a4], attack: 0.1, release: 0.4
  sleep 1.5
  
  play [:b3, :ds4, :gs4], attack: 0.1, release: 0.4
  sleep 2.5
end

PD-Pi

2 Likes