Stars At Elbow And Foot by Vincent Isler in Sonic Pi

# 240122 2341 Stars At Elbow And Foot by Vincent Isler in Sonic Pi
# Saved 240122 2341
# Sonic Pi version https://youtu.be/v0fimqF6PKw
# https://in-thread.sonic-pi.net/t/stars-at-elbow-and-foot-by-vincent-isler-in-sonic-pi/8566

# Original https://www.youtube.com/watch?v=uazicA_jGD8

set_volume! 1

use_bpm 198 #198

with_fx :reverb, room: 0.95 do
  
  live_loop :a1 do
    tick
    
    f = 24*4
    form = knit(1,f,2,f,3,f,4,f,5,f,6,f,7,f, 0,f).look
    #form = 0
    
    case form
    when 0
    when 1
      pt1 = [:c4, :gs3,:g3]
      pb1 = [:f2, :c3]
      pt2 = [:c4, :gs3,:g3]
      pb2 = [:gs2, :c3]
      pt3 = [:as3, :gs3,:g3]
      pb3 = [:ds2, :c3]
      pt4 = [:as3, :gs3,:g3]
      pb4 = [:c2, :as2]
      pt5 = [:f3, :g3,:gs3]
      pb5 = [:c2, :as2]
      
      p = 24
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*3, pt5,p/4).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*3, pb5,p/4).look
      
    when 2
      pt1 = [:c4, :gs3,:g3]
      pb1 = [:f2, :c3]
      pt2 = [:ds4, :gs3,:g3]
      pb2 = [:gs2, :c3]
      pt3 = [:ds4, :as3,:g3]
      pb3 = [:ds2, :c3]
      pt4 = [:ds4, :as3,:g3]
      pb4 = [:c2, :as2]
      pt5 = [:c4, :as3,:gs3]
      pb5 = [:c2, :as2]
      pt6 = [:g3, :gs3,:as3]
      pb6 = [:c2, :as2]
      
      p = 24
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*2, pt5,p/4, pt6,p/4).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*2, pb5,p/4, pb6,p/4).look
      
    when 3
      pt1 = [:c4, :gs3,:g3]
      pb1 = [:f1, :c3, :f2, :c3, :f2, :c3, :f2, :c3]
      pt2 = [:c4, :gs3,:g3]
      pb2 = [:gs1, :c3, :gs2, :c3, :gs2, :c3, :gs2, :c3]
      pt3 = [:as3, :gs3,:g3]
      pb3 = [:ds1, :c3,:ds2, :c3,:ds2, :c3,:ds2, :c3]
      pt4 = [:as3, :gs3,:g3]
      pb4 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      pt5 = [:f3, :g3,:gs3]
      pb5 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      
      p = 24
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*3, pt5,p/4).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*3, pb5,p/4).look
      
    when 4
      pt1 = [:c4, :gs3,:g3]
      pb1 = [:f1, :c3, :f2, :c3, :f2, :c3, :f2, :c3]
      pt2 = [:ds4, :gs3,:g3]
      pb2 = [:gs1, :c3, :gs2, :c3, :gs2, :c3, :gs2, :c3]
      pt3 = [:ds4, :as3,:g3]
      pb3 = [:ds1, :c3,:ds2, :c3,:ds2, :c3,:ds2, :c3]
      pt4 = [:ds4, :as3,:g3]
      pb4 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      #  pt5 = [:c4, :as3,:gs3]
      #pb5 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      #pt6 = [:g3, :gs3,:as3]
      #pb6 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      
      p = 24
      # pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*2, pt5,p/4, pt6,p/4).look
      #  pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*2, pb5,p/4, pb6,p/4).look
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p).look
      
    when 5
      pt1 = [:ds4, :as3,:gs3]
      pb1 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      pt2 = [:f4, :c4,:as3]
      pb2 = [:cs1, :as2, :cs2, :as2, :cs2, :as2, :cs2, :as2]
      pt3 = [:g4, :ds4,:c4]
      pb3 = [:ds1, :as2,:ds2, :as2,:ds2, :as2,:ds2, :as2]
      pt4 = [:gs4, :ds4,:c4]
      pb4 = [:f1, :c3, :f2, :c3, :f2, :c3, :f2, :c3]
      #  pt5 = [:c4, :as3,:gs3]
      #pb5 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      #pt6 = [:g3, :gs3,:as3]
      #pb6 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      
      p = 24
      # pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*2, pt5,p/4, pt6,p/4).look
      #  pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*2, pb5,p/4, pb6,p/4).look
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p).look
      
      
    when 6
      pt1 = [:g4, :ds4,:c4]
      pb1 = [:ds1, :c3, :ds2, :c3, :ds2, :c3, :ds2, :c3]
      pt2 = [:f4, :c4,:as3]
      pb2 = [:cs1, :c3, :cs2, :c3, :cs2, :c3, :cs2, :c3]
      pt3 = [:ds4, :c4,:gs3]
      pb3 = [:c1, :gs2,:c2, :gs2,:c2, :gs2,:c2, :gs2]
      pt4 = [:cs4, :c4,:gs3]
      pb4 = [:cs1, :gs2, :cs2, :gs2, :cs2, :gs2, :cs2, :gs2]
      #  pt5 = [:c4, :as3,:gs3]
      #pb5 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      #pt6 = [:g3, :gs3,:as3]
      #pb6 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      
      p = 24
      # pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*2, pt5,p/4, pt6,p/4).look
      #  pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*2, pb5,p/4, pb6,p/4).look
      pt = knit(pt1,p, pt2,p, pt3,p, pt4,p).look
      pb = knit(pb1,p, pb2,p, pb3,p, pb4,p).look
      
      
    when 7
      pt1 = [:c4, :as3,:gs3, :c4, :as3,:gs3, :c4, :as3,:gs3, :g3, :gs3,:as3]
      pb1 = [:ds1, :c3, :ds2, :c3, :ds2, :c3, :ds2, :c3]
      pt2 = [:c4, :as3,:g3, :ds3, :g3, :gs3]
      pb2 = [:f1, :c3, :f2, :c3, :f2, :c3, :f2, :c3]
      #pt3 = [:ds1, :c3, :ds2, :c3, :ds2, :c3, :ds2, :c3]
      #pb3 = [:f1, :c3, :f2, :c3, :f2, :c3, :f2, :c3]
      #pt4 = [:cs4, :c4,:gs3]
      #pb4 = [:cs1, :gs2, :cs2, :gs2, :cs2, :gs2, :cs2, :gs2]
      #  pt5 = [:c4, :as3,:gs3]
      #pb5 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      #pt6 = [:g3, :gs3,:as3]
      #pb6 = [:c1, :as2, :c2, :as2, :c2, :as2, :c2, :as2]
      
      p = 24
      # pt = knit(pt1,p, pt2,p, pt3,p, pt4,p/4*2, pt5,p/4, pt6,p/4).look
      #  pb = knit(pb1,p, pb2,p, pb3,p, pb4,p/4*2, pb5,p/4, pb6,p/4).look
      pt = knit(pt1,p, pt2,p*2).look
      pb = knit(pb1,p, pb2,p*2).look
    end
    
    use_synth :piano
    use_synth_defaults release: 0.5, sustain: 1.5
    play pt.tick(:a)+12, amp: [2,1.2,1.2].look if spread(3,6).look
    play pb.look+12, amp: [1.65,1.15].look if spread(2,6).look
    
    sleep 0.5
  end
end

# Hydra code
# https://hydra.ojack.xyz/?code=JTJGJTJGczEuaW5pdFNjcmVlbigpJTBBJTIwJTIwJTBBc3JjKHMxKSUwQSUyRiUyRi5waXhlbGF0ZSgxNjAqMiUyQzkwKjIpJTBBLnBpeGVsYXRlKCU1QjE2KjQlMkM5KjQlNUQuZmFzdCgyKSUyQyU1QjIwJTJDNTAwJTVELnNtb290aCgpLmZhc3QoMykpJTBBJTJGJTJGLmx1bWEoMC41KSUwQS5pbnZlcnQoLTIpJTIwJTJGJTJGTk8lMEEubW9kdWxhdGUoc3JjKHMxKSUyQ01hdGguY29zKHRpbWUqMjApKSUwQSUyRiUyRi5yb3RhdGUoMCUyQzAuMSklMEElMkYlMkYua2FsZWlkKDQpJTBBJTJGJTJGLnJvdGF0ZSgwJTJDMC4xKSUwQS5zY2FsZSgxKSUwQSUyRiUyRi5zY2FsZSgyKSUwQSUyRiUyRi5zY3JvbGxZKDAlMkMlNUIwLjAyJTJDLTAuMDEqdGltZSUyRjEwMCUyQzAuMDElNUQpJTBBJTJGJTJGLnNjcm9sbFgoMCUyQyU1Qi0wLjAyKnRpbWUlMkYxMDAwJTJDMC4wMSUyQzAuMDMlNUQpJTBBJTJGJTJGLmNvbG9yYW1hKDElMkMwJTJDMCklMjAlMkYlMkZ0aGluJTIwb3IlMjB0aGljayUwQSUyRiUyRi5jb2xvcmFtYSgwLjQlMkMtMTAlMkMwKSUyMCUyRiUyRk5PJTBBJTJGJTJGLnRocmVzaCgwLjUpJTIwJTJGJTJGYiUyNnclMjBvciUyMGNvbG9yJTBBLm1hc2soc2hhcGUoMiUyQzAuOCkuc2NhbGUoMSUyQzklMkYxNikpJTBBLm91dCgpJTBB

Hydra code

3 Likes

Love it! I looked at your code in detail to see how โ€˜caseโ€™ and โ€˜knitโ€™ work, then tried Hydra and went down a v long rabbit hole :smiley: So happy to find this info - thank you.

1 Like