Live coding busy "Ants"

Ants


# 220621 23.17 Inspiration - Making Music with CODE
# Created by linktr.ee/relaxnow
# My performance https://youtu.be/jE-NWJJNWnI
# Titled: "Practise session in Sonic Pi with Hydra Ants"

# Inspiration: Making Music with CODE?! (With DJ_Dave and Sam Aaron) https://youtu.be/vuSZQnkOB_Y
# ctrl+v =>  ##|



use_bpm 130

live_loop :time, delay: 0.01 do
  sleep 1
end

define :pattern do |pattern|e
  return pattern.ring.tick =="x"
end

a_kick = 4
a_hats = 4
a_elec_tick =4

live_loop :kick, sync: :time do
  a=a_kick
  #sample :bd_haus, cutoff: 80, amp: a if pattern"x--x---"
  sample :bd_haus, cutoff: 90, amp: a if pattern"x-----x---x--x--"
  sleep 0.25
end

live_loop :hats, sync: :time do
  a=a_hats
  use_synth :noise
  #sample :bd_haus, cutoff: 80, amp: a if pattern"x--x---"
  play :c3, cutoff: 90, amp: a, release: ring(0.01,0.1,0.01).choose if pattern"x-x-x- x-x-xxxx--"
  sleep 0.25
end

live_loop :ticke, sync: :time do
  a=a_elec_tick
  #sample :elec_tick, cutoff: 110, amp: a if pattern"x-x-x---"
  #sample :elec_tick, cutoff: 110, amp: a, rate: 1 if pattern"x-x-xxx-"
  
  sample :elec_tick, cutoff: 110, amp: a, rate: 2 if pattern"x-x-xxx-"
  play :c4, cutoff: 90, amp: a, release: ring(0.01,0.1,0.01).choose if pattern"x-x-x- x-x-xxxx--"
  sleep 0.25
end


live_loop :mel1, sync: :time do
  #stop
  use_synth :saw
  #play [:c3, :c2, :f4, :ds5], cutoff: range(70,110,steps: 1).reflect.tick(:r), release: 0.2, amp: 4 if spread(3,5).tick(:asdassd)
  play [:c2, :c3, :c4, :g4, :ds5].pick(4).tick, cutoff: range(70,110,steps: 1).reflect.tick(:r), release: 0.2, amp: 4 #if spread(4,7).rotate(2).tick(:asdassd)
  sleep 0.25
end

Link to Hydra code in Chrome

1 Like