Using dice to randomize

‘’’
#DiceMeHome - DriveMeHome

use_bpm 60

#Elechaus1

live_loop :Elec_haus1 do
with_fx :reverb do
4.times do
t = [0.125, 0.25, 0.375].choose
#t = 0.125
sample [:elec_hollow_kick, :elec_soft_kick].choose, rate: t*dice, release: t, cutoff: rrand(60, 130), amp: rrand(0.4,0.7)

  sleep t
  
end

end
sleep dice/6
end

sleep 12

#Elechaus2

live_loop :Elec_haus2 do
with_fx :reverb do
4.times do
#sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.7,2.4)
#sleep [0.125, 0.25].choose
sleep 0.125
end
end
sleep dice/6
end

sleep 12.5

#Elechaus3

live_loop :Elec_haus3 do
with_fx :reverb do
6.times do
t = [0.125, 0.25].choose
#t = 0.25
#sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
sample :elec_soft_kick, release: t, amp: rrand(0.9,1.8), rate: rrand(0.3,2.8)
#sleep [0.125, 0.25].choose
sleep t
end
end
sleep 0.5
end

sleep 4

#Elechaus4

live_loop :Elec_haus4 do
with_fx :ixi_techno do
8.times do
#sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.9,1.4)
#sleep [0.125, 0.25].choose
sleep 0.125
end
end
sleep 2
end

sleep 24

#Beathaus1

live_loop :Beathaus1 do
with_fx :ixi_techno do
sample [:bd_klub, :bd_tek].choose, rate: rrand(0.6,1.4), cutoff: rrand(90, 120), amp: rrand(0.6,1.8), release: 0.4
sleep 0.5
end
end

#Pedal1

live_loop :Pedal1 do
with_fx :reverb do
sample :drum_cymbal_pedal, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
#sleep dice/dice
end
end

sleep 12

#NervousPedal1

live_loop :NervousPedal1 do
with_fx :reverb do
sample [:drum_bass_hard, :drum_bass_soft, :drum_tom_lo_soft].choose, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
end
end
’’’

#DiceMeHome added some loops found overhere in this category - DriveMeHome

use_bpm 60

#Kickstarter

live_loop :Kickstarter do
  s = synth :fm, note: :g2, amp: 0.1,
    attack: 0.005, attack_level: 5,
    release: rrand(0.15,0.35)
  control s, note: :c2, note_slide: 0.125,
    amp: rrand(0.7,1.4), amp_slide: 0.075
  sleep 0.5
end

sleep 8

#Chordtick

live_loop :Chordtick do
  with_fx [:compressor, :reverb].choose, mix: rrand(0.4,0.7) do
    use_synth [:hollow, :dark_ambience].choose
    n = (chord :c2, :minor).tick
    8.times do
      play n, amp: rrand(0.2, 2.6)
      sleep [0.5, 1, 2].choose
    end
    play n
    sleep 0.5
    play (chord :c2, :minor).tick, amp: rrand(0.4, 1.8)
    sleep 0.5
  end
end

sleep 16

#Elechaus1

live_loop :Elec_haus1 do
  with_fx [:compressor, :reverb].choose do
    d = dice
    (2*d).times do
      t = [0.125, 0.25, 0.375, 0.5].choose
      #t = 0.125
      sample [:elec_hollow_kick, :elec_soft_kick].choose, rate: t*dice, release: t, cutoff: rrand(60, 130), amp: rrand(0.4,0.7)
sleep t
end
  end
  d = dice
  sleep d/2
end

sleep 24

#Elechaus2

live_loop :Elec_haus2 do
  with_fx :reverb do
    4.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.7,2.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep dice
end

sleep 12

#Elechaus3

live_loop :Elec_haus3 do
  with_fx [:compressor, :reverb].choose do
    4.times do
      t = [0.125, 0.25].choose
      #t = 0.25
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: t, amp: rrand(0.9,1.8), rate: rrand(0.3,2.8)
      #sleep [0.125, 0.25].choose
      sleep t
    end
  end
  sleep 0.5
end

sleep 4

#Elechaus4

live_loop :Elec_haus4 do
  with_fx :ixi_techno do
    8.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.9,1.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep 2
end

sleep 24

#Beathaus1

live_loop :Beathaus1 do
  with_fx :ixi_techno do
    sample [:bd_klub, :bd_tek].choose, rate: rrand(0.6,1.4), cutoff: rrand(90, 120), amp: rrand(0.6,1.8), release: 0.4
    sleep 0.5
  end
end

sleep 4

#Pedal1

live_loop :Pedal1 do
  with_fx :reverb do
    sample :drum_cymbal_pedal, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
    #sleep dice/dice
  end
end

sleep 12

#NervousPedal1

live_loop :NervousPedal1 do
  with_fx :reverb do
    sample [:drum_bass_hard, :drum_bass_soft, :drum_tom_lo_soft].choose, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
  end
end

Some of this code doesn’t run. What are you trying to do with it?

#DiceMeHome added some loops found overhere in this category - DriveMeHome

use_bpm 60

#Kickstarter

live_loop :Kickstarter do
  s = synth :fm, note: :g2, amp: 0.1,
    attack: 0.005, attack_level: 5,
    release: rrand(0.15,0.35)
  control s, note: :c2, note_slide: 0.125,
    amp: rrand(0.7,1.4), amp_slide: 0.075
  sleep 0.5
end

sleep 8

#Chordtick

live_loop :Chordtick do
  with_fx [:compressor, :reverb].choose, mix: rrand(0.4,0.7) do
    use_synth [:hollow, :dark_ambience].choose
    n = (chord :c2, :minor).tick
    8.times do
      play n, amp: rrand(0.2, 2.6)
      sleep [0.5, 1, 2].choose
    end
    play n
    sleep 0.5
    play (chord :c2, :minor).tick, amp: rrand(0.4, 1.8)
    sleep 0.5
  end
end

sleep 16

#Elechaus1

live_loop :Elec_haus1 do
  with_fx [:compressor, :reverb].choose do
    d = dice
    (2).times do
      t = [0.125, 0.25, 0.375, 0.5].choose
      #t = 0.125
      sample [:elec_hollow_kick, :elec_soft_kick].choose, rate: dice, release: t, cutoff: rrand(60, 130), amp: rrand(0.4,0.7)
      
      Copy Code
      sleep t
      
    end
  end
  d = dice
  sleep d/2
end

sleep 24

#Elechaus2

live_loop :Elec_haus2 do
  with_fx :reverb do
    4.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.7,2.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep dice
end

sleep 12

#Elechaus3

live_loop :Elec_haus3 do
  with_fx [:compressor, :reverb].choose do
    4.times do
      t = [0.125, 0.25].choose
      #t = 0.25
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: t, amp: rrand(0.9,1.8), rate: rrand(0.3,2.8)
      #sleep [0.125, 0.25].choose
      sleep t
    end
  end
  sleep 0.5
end

sleep 4

#Elechaus4

live_loop :Elec_haus4 do
  with_fx :ixi_techno do
    8.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.9,1.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep 2
end

sleep 24

#Beathaus1

live_loop :Beathaus1 do
  with_fx :ixi_techno do
    sample [:bd_klub, :bd_tek].choose, rate: rrand(0.6,1.4), cutoff: rrand(90, 120), amp: rrand(0.6,1.8), release: 0.4
    sleep 0.5
  end
end

sleep 4

#Pedal1

live_loop :Pedal1 do
  with_fx :reverb do
    sample :drum_cymbal_pedal, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
    #sleep dice/dice
  end
end

sleep 12

#NervousPedal1

live_loop :NervousPedal1 do
  with_fx :reverb do
    sample [:drum_bass_hard, :drum_bass_soft, :drum_tom_lo_soft].choose, amp: rrand(0.1, 0.7), rate: rrand(0.9,1.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
  end
end
#DiceMeHome added some loops found overhere in this category - DriveMeHome

use_bpm 60

#Kickstarter

live_loop :Kickstarter do
  s = synth :fm, note: :g2, amp: 0.1,
    attack: 0.005, attack_level: 5,
    release: rrand(0.15,0.35)
  control s, note: :c2, note_slide: 0.125,
    amp: rrand(0.9,2.4), amp_slide: 0.075
  sleep 0.5
end

sleep 12

live_loop :Elec_hausZZ do
  with_fx :reverb do
    4.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(1.6,3.8), rate: rrand(0.8,3.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep 0.5
end


sleep 12


#Chordtick

live_loop :Chordtick do
  with_fx [:compressor, :reverb].choose, mix: rrand(0.4,0.7) do
    use_synth [:hollow, :dark_ambience].choose
    n = (chord :c2, :minor).tick
    8.times do
      play n, amp: rrand(0.4, 2.6)
      sleep [0.5, 1, 2].choose
    end
    play n
    sleep 0.5
    play (chord :c2, :minor).tick, amp: rrand(0.6, 1.8)
    sleep 0.5
  end
end

sleep 12

#Elechaus1

live_loop :Elec_haus1 do
  with_fx [:compressor, :reverb].choose do
    d = dice
    (2*d).times do
      t = [0.125, 0.25, 0.375, 0.5].choose
      #t = 0.125
      sample [:elec_hollow_kick, :elec_soft_kick].choose, rate: t*dice, release: t, cutoff: rrand(60, 130), amp: rrand(0.4,0.7)
      
      sleep t
      
    end
  end
  d = dice
  sleep d/2
end

sleep 12

#Elechaus2

live_loop :Elec_haus2 do
  with_fx :reverb do
    8.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.7,2.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep dice
end

sleep 12

#Elechaus3

live_loop :Elec_haus3 do
  with_fx [:compressor, :reverb].choose do
    4.times do
      t = [0.125, 0.25].choose
      #t = 0.25
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: t, amp: rrand(0.9,1.8), rate: rrand(0.8,2.8)
      #sleep [0.125, 0.25].choose
      sleep t
    end
  end
  sleep 0.5
end

sleep 12

#Elechaus4

live_loop :Elec_haus4 do
  with_fx :ixi_techno do
    4.times do
      #sample [:elec_bong, :elec_hollow_kick].choose, rate: rrand(0.4,0.8), release: 0.125, cutoff: rrand(90, 120), amp: rrand(0.8,1.6)
      sample :elec_soft_kick, release: 0.125, amp: rrand(0.9,2.2), rate: rrand(0.9,3.4)
      #sleep [0.125, 0.25].choose
      sleep 0.125
    end
  end
  sleep 4
end

sleep 12

#Beathaus1

live_loop :Beathaus1 do
  with_fx :ixi_techno do
    sample [:bd_klub, :bd_tek].choose, rate: rrand(0.6,1.4), cutoff: rrand(90, 120), amp: rrand(0.6,1.8), release: 0.4
    sleep 0.5
  end
end

sleep 12

#Pedal1

live_loop :Pedal1 do
  with_fx :reverb do
    sample :drum_cymbal_pedal, amp: rrand(0.9, 2.7), rate: rrand(0.8,2.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
    #sleep dice/dice
  end
end

sleep 12

#NervousPedal1

live_loop :NervousPedal1 do
  with_fx [:compressor, :reverb].choose do
    sample [:drum_bass_hard, :drum_bass_soft, :drum_tom_lo_soft].choose, amp: rrand(0.8, 1.1), rate: rrand(0.9,1.8)
    sleep [0.25, 0.125, 0.125, 0.5, 0.125, 0.25, 0.125, 0.125, 1, 2].choose
    #sleep 0.5
  end
end

#sleep 60

#Pentatah1

live_loop :Pentatah1, auto_cue: false do
  with_fx :reverb, room: 1, reps: 2 do
    use_synth [:hollow, :mod_fm, :tb303, :fm, :dsaw, :zawa].choose
    use_random_seed 2828+rrand_i(1,999)
    n = dice*2
    #n=[4, 8, 12].choose
    ns = (scale :e2, :minor_pentatonic, num_octaves: 3)
    5.times do
      #play ns.choose, detune: 12, release: 0.125, amp: rrand(0.01,0.5), amp: rand + 0.05, cutoff: rrand(70, 130)
      sleep 0.125
    end
    sleep n
  end
end

#sleep 4

#Pentatah2

live_loop :Pentatah2, auto_cue: false do
  with_fx :reverb, room: 0.7, reps: 2 do
    use_synth [:fm, :dsaw, :zawa].choose
    use_random_seed 8282+rrand_i(1,999)
    n = dice*2
    #n=[4, 8, 12].choose
    ns = (scale :e2, :minor_pentatonic, num_octaves: 2)
    3.times do
      #play ns.choose, detune: 12, release: 0.125, amp: rrand(0.8,1.5), amp: rand + 0.5, cutoff: rrand(70, 130)
      sleep [0.25, 0.125].choose
    end
    sleep 2
  end
end

Loaded different code…more pleasant for the ear…

1 Like

So, when pasting code into these boxes, paste your code, highlight it, and then click the “</>” button above. It’ll do the nice formatting like in my post. :slight_smile:

Also, dude, nice sound!

1 Like