Using the slicer to pump the kick, aka side chain compression, ducking, etc,

in popular music these days, you’ll often hear something that’s referred to as “side chain compression”. specifically, on the kick. the other parts of the mix are ducked out to make room for a big boomy bass drum. there’s probably a way to code this into an actual compressor but I’ve been using a slicer with an inverted saw wave to get the same kind of effect.

check out this example:

use_bpm 88

with_fx :reverb, mix: 0.32 do
  
  live_loop :kick do
    sample :bd_haus
    sleep 1
  end
  
  live_loop :punch do
    sleep 1
    sample :sn_dolf, amp: 0.5, beat_stretch: 0.8
    sleep 1
  end
  
  with_fx :slicer, phase: 1, wave: 0, invert_wave: 1, smooth: 0.3 do |s|
    live_loop :block do
      sleep 0.50
      sample :drum_cymbal_soft, amp: 0.5, beat_stretch: 1.5
    end
    
    live_loop :base do
      use_synth :square
      play :e1, release: 0.8, cutoff: 50, attack: 0.5, amp: 2
      sleep 1
    end
    
    
    live_loop :base2 do
      use_synth :square
      play :e3, release: 0.8, cutoff: 130, attack: 0.6, amp: rand(0.5)
      sleep 1
    end
    
    la = :e2
    live_loop :noiz do
      use_synth :blade
      n = play la, release: 0.12, cutoff: 130, attack: 0.12, amp: 0.9, note_slide: 0.06
      cur = (chord :e2, :m7, num_octaves: 4).pick
      control n, note: cur
      sleep 0.25
      la = cur
    end
    
    with_fx :echo, phase: 0.5, decay: 8, mix: 0.7, phase_slide: 6 do |e|
      with_fx :bitcrusher, distort: 0.4, mix: 1, sample_rate: 4000, bits: 8, cutoff: 130 do
        live_loop :noiz2 do
          use_synth :tb303
          n = play (chord :e2, :m7, num_octaves: 4).pick, release: 16, cutoff: 130, attack: 16, amp: 0.4, note_slide: 8
          sleep 8
          control n, note: (chord :e2, :m7, num_octaves: 4).pick
          sleep 8
          sleep 16
        end
        live_loop :harpz do
          sleep 1
          use_synth :pluck
          play :e2, amp: 0.7
          in_thread do
            6.times do
              sleep rand(0.2)
              play (chord :e2, :maj, num_octaves: 4).pick, amp: 0.6
            end
          end
          control e, phase: rrand(0.25,1)
          sleep 7
        end
      end
    end
  end
end

anyone else doing anything similar? got any better methods? one limitation here is that you have to tie the phase into the rhythm of the kick. it’s simple here, being 4/4 beat, but more complicated rhythms require controlling the phase on the fly, which can desync in a strange way if timed incorrectly.

4 Likes

hi, yeaa, very nice beat ! i would play it at 140bpm :slight_smile: but it gots the groove !
to answer you, i never done it this way, but i will and i will tell you if i found soumething… i never play 4 kick in a row :wink:
thx anyway, bye
uriel

1 Like

As you have probably noticed, there is currently no perfect built-in solution. There might be a few other techniques worth experimenting with here:

1 Like

Thank you Ethan, I didn’t see that thread! I figured there must be some people trying it already.

Here’s another example with a not 4/4 rhythm for Uriel

use_bpm 80

with_fx :compressor do
  rhyx = 1.75
  rhy = (ring 1.75, 0.75, 1.5, 1.5, 0.75, 1.75)
  live_loop :kick do
    rhyx = rhy.tick
    sample :bd_boom, beat_stretch: rhyx
    sleep rhyx
  end
  live_loop :punch do
    sleep 1
    sample :sn_dub, amp: 0.3
    sleep 1
  end
  with_fx :slicer, wave: 0, invert_wave: 1  do |s|
    live_loop :slice_ctrl do
      rhyx = rhy.tick
      control s, phase: rhyx
      sleep rhyx
    end
    live_loop :chop do
      sample  :elec_cymbal, amp: 0.4, beat_stretch: 0.3
      sleep 0.25
    end
    live_loop :noiz do
      sleep 0.5
      sample :bd_boom, amp: 0.3, beat_stretch: rhyx / (ring 4, 2, 8).tick
    end
    
  end
end
4 Likes

thx mate… i would say i have spent all night on this base code, adding my personal samples to it, fx and sequences… i now understand the “pump the kick” much better ! thx
i will post my code here today, as an update, to whom may want to use it and update it again… and again :wink:

have a great sunday
uriel

1 Like

Posting another sketch here because I just can’t stop myself from making beats this way.

honestly it sounds better than side chaining to me somehow? like it’s just so clean and precise.

I’ve discovered you can get more control of the slice by using the default pulse width wave, inverted and smoothed. I’ve also hacked in a way to lock the phase to a boolean ring rhythm, so the kick pattern can come from a spread

use_random_seed 3141565742575

use_bpm rand(150)+100

rhy = (spread rrand_i(5,13), 32)
root = rand_i(12)+24
root2 = rand_i(12)+24

live_loop :kick do
  if rhy.tick then
    sample :bd_ada, start: 0.01, amp: 1.5
  end
  sleep 1
end

with_fx :reverb, mix: 0.3, room: 0.6 do
  
  live_loop :punch do
    sleep 2
    sample :sn_generic, beat_stretch: 0.65, amp: 0.4
    sleep 2
  end
  with_fx :slicer, phase: 4, phase_offset: 0.5, invert_wave: 1, pulse_width: 0.01, smooth_up: 0.3 do
    with_fx :slicer, invert_wave: 1, pulse_width: 0.02, smooth_down: 0.1, smooth_up: 4 do |s|
      live_loop :s_ctrl do
        l = 1
        if
          rhy.tick then
          while (not rhy.tick) do
              l = l + 1
            end
            control s, phase: l
            rhy.tick(step:-1)
          end
          sleep l
        end
        
        live_loop :slap do
          sleep 2
          2.times do
            sleep 0.5
            if rand() > 0.5 then
              sample :sn_generic, beat_stretch: 0.6, amp: 0.15
            end
            sleep 0.5
          end
        end
        live_loop :slapp do
          sleep 14
          4.times do
            sample :sn_generic, beat_stretch: 0.63, amp: 0.2
            sleep 0.5
          end
        end
        
        live_loop :chop do
          sample :drum_cymbal_closed, amp: 0.4
          sleep 1
        end
        
        live_loop :base do
          2.times do
            use_synth :tb303
            pb = play root, res: 0.4, cutoff: 65, attack: 4, release: 4, amp: 0.9, note_slide: 0.5, cutoff_slide: 0.4
            in_thread do
              sleep 2
              control pb, note: root+12, cutoff: 90
              5.times do
                sleep 0.5
                if rand() > 0.7 then
                  control pb, note: (chord root, :m7, num_octaves: 2).pick, cutoff: rand(110)
                end
              end
              control pb, note: root, cutoff: 10
            end
            sleep 8
          end
          r = root
          root = root2
          root2 = r
          cue "d"
        end
        
        with_fx :reverb, mix: 0.9, room: 0.6 do
          live_loop :clouds do
            use_synth :blade
            pc = play (chord root2+24, :maj, num_octaves: 5), amp: 0.7, attack: 4, sustain: 8, release: 4, note_slide: 2
            control pc, note: (chord root+24, :maj, num_octaves: 5)
            sync "d"
          end
          
          live_loop :rain do
            use_synth :pretty_bell
            if rand() > 0.7 then
              in_thread do
                3.times do
                  play (chord root+24, :maj, num_octaves: 3).pick, release: 0.5, amp: rand(0.4)
                  sleep 0.25
                end
              end
            end
            sleep 0.5
          end
        end
      end
    end
  end
3 Likes

great.
just great!
so impressive.
i’m jealous :smiley:

Hey there… Not here to critique on the code, too new for that… Just wanted to say that the first track is excellent!
I’m really impressed!

very nice !

by the way, do you know the on parameter ?

  if rhy.tick then
    sample :bd_ada, start: 0.01, amp: 1.5
  end

is egal to

sample :bd_ada, start: 0.01, amp: 1.5, on: rhy.tick

6u

2 Likes

Ooooh much cleaner thank you