Sick Drummer - a metal drummer bot with snare fills

I was in many metal bands and I drum like this IRL:

rudiments =
  [[1,0,1,1],[0,1,0,0]],
  [[0,1,0,0],[1,0,1,1]],
  [[1,0,1,0],[0,1,0,1]],
  [[0,1,0,1],[1,0,1,0]],
  [[1,1,0,0],[0,0,1,1]],
  [[0,0,1,1],[1,1,0,0]],
  [[0,0,0,0],[1,1,1,1]],
  [[1,1,1,1],[0,0,0,0]],
  [[1,0,0,1],[0,1,1,0]],
  [[0,1,1,0],[1,0,0,1]],
  [[1,1,1,0],[0,0,0,1]],
  [[0,0,0,1],[1,1,1,0]]

kit =
[
  [:drum_snare_hard, 0.33],
  [:drum_roll, 1.75],
  [:drum_heavy_kick, 1]
]

bd_patterns =
  [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
  [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0],
  [1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],
  [1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0],
  [1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
  [1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0]

sn_patterns =
  [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
  [0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0]

cy_patterns =
  [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  [1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],
  [1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0],
  [1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]

len = 0.25

use_bpm 180

with_fx :gverb, room: 50, mix: 0.5 do
  with_fx :compressor, mix: 1, amp: 1 do
    with_fx :eq, high_shelf: 0.25, high: 0, mid: 0.25, low: -1.5, low_shelf: 1  do
      
      live_loop :fill do
        
        rh1 = choose(kit)
        lh1 = choose(kit)
        rh2 = choose(kit)
        lh2 = choose(kit)
        rh3 = choose(kit)
        lh3 = choose(kit)
        rh4 = choose(kit)
        lh4 = choose(kit)
        
        beat = 0
        
        bd = choose(bd_patterns)
        sn = choose(sn_patterns)
        cy = choose(cy_patterns)
        
        7.times do
          count = 0
          16.times do
            #bass drum
            if bd[count] == 1
              sample :drum_heavy_kick, sustain: len
              sample :drum_heavy_kick, sustain: len * 0.0125
            end
            #snare
            if sn[count] == 1
              sample :drum_snare_hard, sustain: len
              sample :drum_snare_hard, sustain: len * 0.0125
            end
            #cynbals
            if cy[count] == 1
              sample :drum_cymbal_open, amp: 0.33, sustain: len
            end
            sleep len
            count += 1
          end
        end
        c = 0
        4.times do
          count = 0
          r1 = choose(rudiments)
          if c === 0 or c === 2 or c === 3
            sample :drum_cymbal_open, amp: 0.33, sustain: len
            sample :drum_heavy_kick, sustain: len
            sample :drum_heavy_kick, sustain: len * 0.0125
          end
          4.times do
            if r1[0][count] === 1
              if count === 1
                if rh1[0] != :drum_heavy_kick
                  sample rh1[0], amp: rh1[1], sustain: len
                end
              end
              if count === 2
                sample rh2[0], amp: rh2[1], sustain: len
              end
              if count === 3
                sample rh3[0], amp: rh3[1], sustain: len
              end
              if count === 4
                sample rh4[0], amp: rh4[1], sustain: len
              end
            end
            if r1[1][count] === 1
              if count === 1
                sample lh1[0], amp: lh1[1], sustain: len
              end
              if count === 2
                sample lh2[0], amp: lh2[1], sustain: len
              end
              if count === 3
                sample lh3[0], amp: lh3[1], sustain: len
              end
              if count === 4
                sample lh4[0], amp: lh4[1], sustain: len
              end
            end
            sleep len
            count += 1
          end
          c += 1
        end
      end
    end
  end
end

4 Likes

Very metal! Love the double kick.

Berserk, dude! The kicks are relentless. :slight_smile: