Sonic Pi Daily - Ep 120[pt1]: "Robot Rock" Daft Punk
Channel: Tig3rbabu
Date: 2023-02-20

#sonicpi #electronicmusic #algorave #codeart #coding #programming #popmusic #generativeart #CreativeCoding #MusicComposition #CodeMusic #SonicPiSong #daftpunk #robotrock #breakaway 

-- THE CODE --

use_bpm 110

live_loop :bass do
  with_fx :distortion, distort: 0.999, mix: 1, amp: 0.5 do
    with_fx :flanger, mix: 1 do
      tick
      synth :fm, note: 62-24, sustain: 0.5, release: 0, depth: 2
      synth :dsaw, note: 62-24, sustain: 0.5, release: 0
      synth :dsaw, note: chord(62-0,'5'), sustain: 0.5, release: 0
      sleep ring(5,1.5,1.5,8).look*0.5
    end
  end
end

mel1 = ring(66,62.2,62.3,59.2,60)
mel2 = ring(66,62.2,60,53.2,50.1,48)
tm1 = [1,1,1,1,4]
tm2 = [1,1,1,2,1,2]

live_loop :meldoy do
  sleep 1
  tick(:i)
  mel = [mel1,mel2].ring.look(:i)
  tm = [tm1,tm2].ring.look(:i)
  with_fx :flanger, mix: 1 do
    with_fx :wobble, phase: 4, mix: 1 do
      dp = synth :dtri, note: mel[0]+0, note_slide: 0.1, sustain: (tm.sum*0.25)+1, release: 0, depth: 20
      dpp = synth :dtri, note: mel[0]+12, note_slide: 0.1, sustain: (tm.sum*0.25)+1, release: 0, depth: 20
      tick_reset(:ii)
      tm.length.times do
        tick(:ii)
        control dp, note: mel.look(:ii)+0
        control dpp, note: mel.look(:ii)+12
        synth :prophet, note: mel.look(:ii)+12, depth: 20, release: 0.5
        sleep tm.ring.look(:ii)*0.25
      end
    end
  end
  sleep 1
end

-- THE END --