7/12 with sample bd numbers #sonicpi

# 231201 2316 7 12 part with sample bd numbers YT
# Saved 231201 2316
# Performance https://youtu.be/JrJzipesP7E
# https://in-thread.sonic-pi.net/t/7-12-with-sample-bd-numbers-sonicpi/8416

# Inspiration 1: Today I rediscovered this notation: "sample 'bd', 2"
## From: Davids Music Lab "2023-11-30 Sonic Pi Live" https://www.youtube.com/live/B09JhuBmq-U?feature=shared&t=348

# Inspiration 2: 7/12 is nice
## Live patterns at Pattern Club Live at Hatch Sheffield, 7th June 2023
## https://youtu.be/RXFydyJt5xg?feature=shared&t=989


with_fx :reverb, room: 0.6 do
  
  live_loop :a1 do
    tick
    
    /'bd', 2 legato kickdrum is rpitch -1.5 to tune to note a /
    sample 'bd',[2,1,5].look, rpitch: [-1.5,0,0].look, pan: rdist(0.25) if spread(7,12).look
    / 4 on the floor /
    sample 'bd',1, pan: rdist(0.25), amp: 1.25 if (spread(1,2)*7+spread(2,4).rotate(1)).look
    
    / rythm with density /
    density [1,1,1,1,2,4].choose do
      / snare /
      sample 'sn',[2,1,5].look, pan: rdist(0.75), finish: [0.01,0.02,0.05].choose if spread(5,12).look
      
      / noise hihat with moving cutoff filter /
      with_fx :krush, res: [0,0.2,0.4].choose, mix: [0,0.2,0.5].choose do
        use_synth :noise
        use_synth_defaults cutoff: line(50,110,steps: 64).look, release: [0.01,0.02,0.05].choose, amp: 2
        play :c3 if one_in(2)
      end
      
      sample :elec_tick if spread(7,16).look
      sample :elec_bell, rpitch: 24 if spread(3,16).look and one_in(2)
      sleep 0.25
    end
    
    / short synth notes /
    use_synth :pluck
    #    play scale(:a4, :minor_pentatonic).look if one_in(2)
    play scale(:a4, :minor_pentatonic).stretch(4).look if one_in(2)
    
  end
  
  / long beep synth notes /
  with_fx :ping_pong do
    live_loop :a2 do
      tick
      beep = knit(0,8, 1,8).look
      beep = 1
      case beep
      when 0
      when 1
        play :a5+knit(0,3, -2,1, -5,2, 0,2).look, release: 0.1
      end
      sleep [4,4,1].look
    end
  end
  
end