Jeg har fanget mig en myg

# 240120 1353 Jeg har fanget mig en myg
# Saved 240120 1353
# https://in-thread.sonic-pi.net/t/jeg-har-fanget-mig-en-myg/8557
# https://youtu.be/Mqu20Q_YU98

use_debug false
set_volume! 2


use_bpm 100 #100
with_fx :reverb, room: 0.4 do
  with_fx :octaver,mix: 0.2, sub_amp: 2 do
    
    
    / Bass and melody /
    live_loop :a1 do
      tick
      
      stop if look == (52*6*2)/2#-1 #stops :a1 and :a2 after 6 verse of playing
      
      v = 52  # k = 13 below v = 13*4 = 52
      puts '#----- 1 / 6 verse' if look == 0
      puts '##---- 2 / 6 verse' if look == v
      puts '###--- 3 / 6 verse' if look == v*2
      puts '####-- 4 / 6 verse' if look == v*3
      puts '#####- 5 / 6 verse' if look == v*4
      puts '###### 6 / 6 verse' if look == v*5
      
      
      use_synth :prophet
      c = line(60,90,steps: 64).mirror.look
      
      #  n = :c3#+line(0,5,steps: 128).look
      #   n = :c3+3+4
      n = :c3
      q = 0.5
      h = 1
      
      
      pat1 = [0,2,3,2,3,2,0 , 0,2,3,2,0 ,0 ]
      sle1 = [q,q,q,q,q,q,h , q,q,q,q,h ,h ]
      pat2 = [7,5,3,2,3,2,0 , 0,2,3,5,7 ,7 ]
      sle2 = [q,q,q,q,q,q,h , q,q,q,q,h ,h ]
      pat3 = [7,5,3,2,3,2,0 , 0,2,3,2,0 ,0 ]
      sle3 = [q,q,q,q,q,q,h , q,q,q,q,h ,h ]
      
      k = 13
      pat = knit(pat1,k*2, pat2,k, pat3,k).look
      sle = knit(sle1,k*2, sle2,k, sle3,k).look
      
      play n+pat.look, cutoff: c, release: [0.2,0.5,0.9].look
      use_synth :piano
      density [1,1,1,1,4].tick(:a) do
        play n+pat.look+12+12, cutoff: c, release: [0.1,0.2, 0.05].choose, pan: rdist(0.5)
      end
      
      sleep  sle.look
    end
    
    
    / Drums /
    live_loop :a2 do
      tick
      #                   6 verse
      stop if look == 128*6-1 #stops :a1 and :a2 after 6 verse of playing
      
      
      amp = 3 #3
      k = 16
      
      
      
      ### -- (exploration of drums patterns not used ) potential here with fast changes between patterns
      drum1 = knit(0,k,1,k).look
      drum2 = knit(0,k,3,k).look
      drum3 = knit(5,k,4,k).look
      drum4 = knit(1,k,2,k).look
      l = 128  # 128 whole verse
      l = 64
      l = 32  # 128 whole verse
      drum = knit(drum1,l, drum2,l, drum1,l, drum2,l, drum3,l, drum4, l, 5,l).look
      
      l =64
      drum = knit(1,l,2,l, 6,l*2).look
      drum = knit(1,l,6,l, 2,l,6,l).look  #!! nice
      l = 32
      #drum = knit(0,l,1,l, 2,l,6,l).look
      #drum = knit(0,l,2,l, 1,l,6,l).look
      #  -- ###
      
      / auto mix of drums /
      l =64
      #l =32
      # Verse     1        2        3        4        5        6
      #           1   2    3   4    5   6    7   8    9   10   11  12
      #drum = knit(7,l,2,l, 0,l,1,l, 6,l,2,l, 4,l,6,l, 0,l,2,l, 0,l,0,l).look
      puts 'drum = ',drum if spread(1,l).look
      
      / manual change drums here /
      #drum = 1
      
      case drum
      when 0
        sleep 0.25
      when 1
        sample :bd_fat, amp: amp if bools(1,0,0,0,0,0,0,0, 0,0,1,0,0,0,1,0).look
        sample :bd_fat, amp: amp, rpitch: 24 if bools(0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,0).look and one_in(4)
        d = [1,1,1,1,1,1,1,1,4]
        d2 = [1,1,1,1,1,1,1,1,2]
        density d.tick(:a) do
          sample :sn_generic, finish: 0.125/d2.look, rate: 4, amp: amp/2 if spread(1,8).rotate(4).look
          sleep 0.25
        end
      when 2
        sample :bd_fat, amp: amp if bools(1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,1,0, 0,0,1,0, 0,0,1,0).look
        sample :bd_fat, amp: amp, rpitch: 24 if bools(0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0).look
        sample :bd_fat, amp: amp, rpitch: 24, finish: 0.1 if bools(0,0,0,0,0,0,1,0, 0,0,0,0,0,0).look
        sleep 0.25
      when 3 # 4 on the floor
        sample :bd_fat, amp: amp if (spread(1,8)*3+bools(1,0,1,0,0,1,0,1)).look
        sleep 0.25
      when 4 # doubletime with density hihat on offbeat
        sample :bd_fat, amp: amp if bools(1,0,0,0, 0,1,0,1).look
        sample :bd_fat, amp: amp, rpitch: 24 if bools(0,0,0,1, 0,0,0,0).look and one_in(4)
        d = [1,1,1,1,4]
        d2 = [1,1,1,1,2]
        density d.tick(:a) do
          sample :sn_generic, finish: 0.125/d2.look, rate: 4, amp: amp/2 if spread(1,4).rotate(2).look
          sleep 0.25
        end
      when 5 # doubletime on version 2
        sample :bd_fat, amp: amp if bools(1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,1,0, 0,0,1,0, 0,0,1,0).look
        sample :bd_fat, amp: amp, rpitch: 24 if bools(0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0).look
        sample :bd_fat, amp: amp, rpitch: 24, finish: 0.1 if bools(0,0,0,0,0,0,1,0, 0,0,0,0,0,0).look
        sleep 0.125
      when 6 # Rotate  version 2
        r = 2
        sample :bd_fat, amp: amp if bools(1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,1,0, 0,0,1,0, 0,0,1,0).rotate(r).look
        sample :bd_fat, amp: amp, rpitch: 24 if bools(0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0).rotate(r).look
        sample :bd_fat, amp: amp, rpitch: 24, finish: 0.1 if bools(0,0,0,0,0,0,1,0, 0,0,0,0,0,0).rotate(r).look
        sleep 0.25
      when 7 # Basic kick with space
        sample :bd_fat, amp: amp if spread(1,16).look
        sleep 0.25
      end
      
      
    end
  end
end


#---- Mosquito macro
# https://cdn.shopify.com/s/files/1/0019/5952/files/syed-ali-80a3A_BFeic-unsplash.jpg?v=1682004321
# https://today.usc.edu/wp-content/uploads/2023/10/TFM_TheBiteStuff_Feature-1280x720.jpg


1 Like