Practice session Sonic Pi with piano saw and hydra visuals

Practice session Sonic Pi with piano saw and hydra visuals

Hydra code


# 220626 0146 Practice session Sonic Pi with piano saw and hydra visuals
# My performance https://youtu.be/j_zJTFHnOa4
# Created by https://linktr.ee/relaxnow

use_bpm 88

live_loop :time, delay: 0.01 do
  sleep 1
end


with_fx :reverb, room: 0.90 do
  
  live_loop :asfa, sync: :time do
    a = 4
    a = rrand_i(1,2)
    
    use_synth :piano
    
    16.times do
      a = rrand_i(1,2)
      play :c5, amp: a
      sleep 0.25
    end
    16.times do
      a = rrand_i(1,2)
      play [:c5, :d5], amp: a
      sleep 0.25
    end
    16.times do
      a = rrand_i(1,2)
      play [:c5, :d5, :g5], amp: a
      sleep 0.25
    end
    16.times do
      a = rrand_i(1,2)
      play [:c5, :d5, :f5], amp: a
      sleep 0.25
    end
    16.times do
      a = rrand_i(1,2)
      play [:c5, :d5, :ds5], amp: a
      sleep 0.25
    end
    16.times do
      a = rrand_i(1,2)
      play [:c5, :d5], amp: a
      sleep 0.25
    end
    
  end
  
  live_loop :bas1, sync: :time do
    use_synth :piano
    
    # :f2 :g2  :bb1 :c2
    notes = :f2
    
    in_thread do
      
      play notes, attack: 4, release: 2, decay: 2, amp: 3, cutoff: 90, pan: 0.25
      sleep 8
    end
    use_synth :piano
    play notes+0.1, attack: 4, release: 2, decay: 2, amp: 3, cutoff: 110, pan: 0.25
    sleep 8
  end
  
  
  
  
end # end reverb

live_loop :sampleasdasd, sync: :time do
  sample :elec_plip, amp: 4
  #sample :bd_haus, cutoff: 80, amp: 4
  sleep 2
  sample  :elec_bong, amp: 4
  sleep 1
  sample  :elec_flip, amp: 4
  sleep 0.5
  sample  :elec_blup, amp: 4 if one_in(2)
  #sample :bd_haus, cutoff: 80, amp: 2
  sleep 0.25
  sample :bd_haus, cutoff: 80, amp: 2
  sleep 0.25
end

live_loop :kick, sync: :time do
  stop
  sample :bd_haus, cutoff: 80, amp: 4
  sleep 1
end


with_fx :ping_pong do
  live_loop :pingsample, sync: :time do
    sample :elec_plip, rpitch: 24, amp: 4
    sleep 6
  end
  
  live_loop :hat, sync: :time do
    stop
    use_synth :saw
    play :c6, release: 0.2, amp: ring(1,0,0,0,0).tick, amp: 1, pitch: 0, pan: ring(1,-1).tick if one_in(4)
    sleep 0.25
  end
end  # end :ping_pong

# Hydra code for visuals
# https://hydra.ojack.xyz/?code=czAuaW5pdEltYWdlKCUyMmh0dHBzJTNBJTJGJTJGdXBsb2FkLndpa2ltZWRpYS5vcmclMkZ3aWtpcGVkaWElMkZjb21tb25zJTJGZSUyRmUzJTJGTWFnbmlmaWNlbnRfQ01FX0VydXB0c19vbl90aGVfU3VuXy1fQXVndXN0XzMxLmpwZyUyMiklMEElMkYlMkZzMS5pbml0U2NyZWVuKCklMEElMEFBJTNEKCklM0QlM0VhLmZmdCU1QjAlNUQlMkYzJTJCMC4wMSUwQUIlM0QoKSUzRCUzRWEuZmZ0JTVCMSU1RCUyRjIwMDAwMCUwQUMlM0QoKSUzRCUzRWEuZmZ0JTVCMCU1RCUyRjEwMCUwQSUwQWEuc2hvdygpJTBBJTBBc3JjKG8wKSUwQS5ibGVuZChvMyUyQzAuMiklMEEuYmxlbmQoczAlMkMwLjUpJTBBLnNjYWxlKDEuMDIpJTBBLnNjcm9sbFgoMCUyQ0IpJTBBLnN1YihzaGFwZSgzJTJDQSUyQzAuNSkuc2NhbGUoMSUyQzklMkYxNikucm90YXRlKDAlMkMwLjEpJTBBLmRpZmYodm9yb25vaSgxMCUyQzElMkMwLjEpJTJDMC4yKSklMEEub3V0KG8wKSUwQSUwQXNyYyhzMCkuYmxlbmQob3NjKDIlMkMwLjElMkMyKSUyQzAuMSklMEEuZGlmZihzaGFwZSgyJTJDQSUyQzAuMDEpLnNjYWxlKDElMkM5JTJGMTYpLnJvdGF0ZSgwJTJDMC4xKSklMEEubW9kdWxhdGUobm9pc2UoMiUyQzAuMSUyQzQwKSklMEEuc2NhbGUoMS4yKSUwQSUyMCUyMC5vdXQobzEpJTBBJTBBc3JjKHMwKS5kaWZmKG5vaXNlKDIlMkMwLjIlMkMyKSklMEEuc2F0dXJhdGUoMiklMjAlMjAlMkYlMkYlMjB2ZWQlMjBnKCklMEEuYigpJTIwJTIwJTJGJTJGJTIwcigpJTIwJTIwZygpJTIwYigpJTBBJTIwJTIwLm91dChvMiklMEElMEFzcmMoczApLmRpZmYobzAlMkMwLjIpJTBBJTIwJTIwLmJsZW5kKHZvcm9ub2koMiUyQzAuMiUyQzIpKSUwQSUyMCUyMC5tb2R1bGF0ZShvMiUyQzAuOSkubXVsdChub2lzZSgyMCUyQzIpJTJDMTApJTBBJTIwJTIwLmJsZW5kKHMwJTJDMC4yKSUwQSUyMCUyMC5vdXQobzMpJTBBJTBBcmVuZGVyKCklMEE%3D


that’s pretty great, i’m new here so i’d love to learn how to do this

1 Like

Overview

Workflow:

  • Create music in Sonic Pi.
  • Create visuals in Hydra in Chrome.
    (Tip: Use an image with s0.initImage(“”) as source, so you get nice colors from beginning.)

Record performance:

  • Open Atom where you can have a plugin for Sonic Pi and Hydra in a split view so it looks nice.
  • Record with OBS in highest quality settings.
  • Import to Camtasia studio to normalize soundlevel.
  • Export with highest possible settings and upload to YouTube

Let me know if there’s something I should explain more in depth.