A sketch for a performance with Sonic Pi and Hydra

A sketch for a performance with Sonic Pi and Hydra
Kind regards
Relaxnow


# 220317 A sketch for a performance with Sonic Pi and Hydra
# Backup 220317 17:20
# https://youtu.be/ZwUuFsCchCE

use_bpm 110

live_loop :met do
  sleep 1
end



live_loop :mel1, sync: :met do
  #stop
  use_synth :saw
  note = (knit :a1,8, :f2,3, :g2,4, :a2,3)  #a1 f2 g1 g2
  play note.tick(:b), amp: 1.4,release: 0.35, cutoff: 95, pan: -0.5 if spread(3,5).tick
  sleep 0.25
  play note, release: 0.15, cutoff: 90, pan: -0.5 if spread(1,5).tick
  sleep 0.25
  play note, release: 0.15, cutoff: 110, pan: -0.5 if spread(4,5).tick
  sleep 0.25
end
live_loop :mel2, sync: :mel1 do
  #stop
  use_synth :tri
  play :f2, release: 0.15, cutoff: 90, pitch: 24, pan: 0.5 if spread(3,5).tick
  sleep 0.25
  play :g3, release: 0.15, cutoff: 90, pitch: 12, pan: 0.5 if spread(1,5).tick
  sleep 0.25
  play :a2, release: 0.15, cutoff: 110, pitch: 12, pan: 0.5 if spread(4,5).tick
  sleep 0.25
end
live_loop :mel3, sync: :met do
  #stop
  use_synth :dtri
  play knit(:f2,5, :g2, 7, :f2,2, :d2,5).tick , release: 0.15,
    cutoff: 80, pitch: 24+12, pan: 0 if spread(3,5).tick
  sleep 0.25
  play :g3, release: 0.15, cutoff: 90, pitch: 12+12, pan: 0.5 if spread(1,5).tick
  sleep 0.25
  play :a2, release: ring(0.15,0.1,0.35).choose,
    cutoff: ring(60,70,80,90,100,110,100,90,80,70).tick(:a),
    pitch: 12+12, pan: ring(-0.5,-0.25,0.25,0.5).choose if spread(4,5).tick
  sleep 0.25
end

live_loop :extra_fynky_mel4, sync: :met do  #extra top syncopated funky top mel note
  #stop
  my_form = (knit false,16+32, true,16).tick(:c)
  
  use_synth :saw
  note = [:a4]
  # play note.tick(:b), amp: 1.4,release: 0.35, cutoff: 95, pan: -0.5 if spread(3,5).tick
  play note, amp: 1.4,release: 0.05, cutoff: 95, pan: -0.5, on: my_form if spread(3,5).tick
  sleep 0.25
  play note, release: 0.15, cutoff: 90, pan: -0.5, on: my_form if spread(1,5).tick
  sleep 0.25
  play note, release: 0.15, cutoff: 110, pan: -0.5, on: my_form if spread(4,5).tick
  sleep 0.25
end


#Drums
live_loop :kick1, sync: :met do
  my_form = (knit true,16, false,32).tick(:c)
  sample :bd_haus, cutoff: 80, amp: 2, on: my_form
  sleep 1
end
live_loop :randomsnare, sync: :met do
  stop
  sample  :sn_generic, cutoff: 100, amp: 0.8, rate: 2,
    finish: rrand(0.1,0.8) if spread(3,21).tick and one_in(4)
  #sample :bd_haus, cutoff: 80, amp: 2 if spread(ring(1,3,5).look,11).tick #and one_in(2)
  sleep 0.25
end
live_loop :snare, sync: :met do
  sleep 2
  sample  :sn_generic, cutoff: range(90,120, step: 2.5).reflect.tick(:d), amp: rrand(0.5,0.9), rate: rrand(1.1,1.8),
    finish: rrand(0.1,0.8) #if spread(3,21).tick #and one_in(1)
  #sample :bd_haus, cutoff: 80, amp: 2 if spread(ring(1,3,5).look,11).tick #and one_in(2)
end


# Oneshots
use_synth :growl  #:prophet / :growl  :bnoise :gnoise
# a4 d4
#play :d4, attack: 8, release: 8, cutoff: range(90,130, step: 10).reflect.tick(:d), amp: 1


with_fx :reverb, room: 0.8 do
  
  live_loop :onshotsloop do
    #stop
    
    use_synth :growl  #:prophet / :growl  :bnoise :gnoise
    use_synth :prophet#:prophet / :growl  :bnoise :gnoise
    use_synth :cnoise#:prophet / :growl  :bnoise :gnoise
    use_synth :pulse#:prophet / :growl  :bnoise :gnoise
    
    sleep 4
    12.times do
      use_synth ring(:prophet, :growl, :pulse).choose
      #play ring(:d5, :a5).choose, attack: 0, release: 0.15, cutoff: range(60,130, step: 5).reflect.tick(:d), amp: 1, pan: rrand(-1,1)
      play ring(:d6, :a6).choose, attack: 0, release: 0.15, cutoff: range(60,130, step: 5).reflect.tick(:d), amp: 1, pan: rrand(-1,1)
      #sleep 2
      #play :g5, attack: 4, release: 4, cutoff:
      sleep 0.25
    end
    sleep 0
  end
end

Link to Hydra visuals

3 Likes