Okay here’s something quick I threw together to show you some different techniques you could use to vary up the song structure. Sorry if the code became a bit convoluted. There’s probably some mistakes and redundant pieces of code in here but it should give you an idea of some things you might try out.
Here’s the audio so you can get a quick idea of what I did. It glitches out a bit on account of my computer being too slow to handle Sonic Pi. The slow down effect at the end of the song was just an after effect I did, not part of the code.
I added a “conductor” loop to tell the song how to progress. Used “spread” in some loops to offset the beat a bit. Added a “ring” to one of the sleep commands to help bring in some variation. Put in a few LFO controlled effects. I also tried a few other things I don’t normally do. Wasn’t quite sure if they worked as intended but didn’t want to get in to troubleshooting them until I do a legitimate remix of the song.
#Yaxche Interstellar // 2019 by PETAYAN
yaxIn = “C:/Users/…” #your own path to sample folder hereInterstellar/"
#find the name of the folder where you keep the samples
use_bpm 103
set_volume! 1
######## Volumen-control ##############
vPeach = 1
vDrumsBits = 2
vDrums = 2
vBass = 2
vBassSlice = 1
vBongos = 1
vGuiero = 0.5
vShaker = 1
vDubDelay = 0.25
vDubDelay2 = 0.8
#######################################
######## Speed-control ################
speed0 = 1
speed1 = 1
speed2 = 1
#######################################
######## Modifiers ####################
mod0 = 0
#######################################
######## L F O-control ################
lfo0 = (line 131, 100, inclusive: true, steps: 32*speed1).mirror
lfo1 = (line 0.6+mod0, 0.88, inclusive: true, steps: 8*speed2).mirror
lfo2 = (line 85, 68, inclusive: true, steps: 32*speed1).mirror
lfo3 = (line 80, 122, inclusive: true, steps: 8).mirror
#######################################
live_loop :Conductor do
sleep 7
cue :A
sleep 9
cue :B
speed0 = 4
sleep 2
speed0 = 1
cue :C
sleep 6+24
speed1 = 0.25
speed2 = 0.5
mod0 = 0.1
cue :M
vBongos = 0
sleep 2
vBongos = 1
sleep 1
vDrumsBits = 0
vBongos = 0
sleep 1
vDrumsBits = 2
sleep 1
vBongos = 1
sleep 3
speed1 = 4
speed2 = 1
cue :E
sleep 8
mod0 = 0
speed1 = 2
vBass = 0
sleep 4
speed1 = 0.125
vDrumsBits = 0
vBass = 2
sleep 1
vDrumsBits = 2
sleep 3
vPeach = 0
sleep 2
vPeach = 1
sleep 1
sleep 32
vBass = 0
vPeach = 1
vDrumsBits = 0
vGuiero = 0
sleep 4
vShaker = 0
sleep 1
vBongos = 0
sleep 3
vDrums = 0
vBassSlice = 0
sleep 2
vDubDelay = 0.25
vDubDelay2 = 0.8
sleep 4
vDubDelay = 0
vDubDelay2 = 0
vPeach = 0
vDrumsBits = 0
vDrums = 0
vBass = 0
vBassSlice = 0
vBongos = 0
vGuiero = 0
vShaker = 0
vDubDelay = 0
vDubDelay2 = 0
sleep 1000
end
live_loop :Peach do
puts tick
with_fx :reverb, mix: 0.25 do
with_fx :flanger, mix: 0.25 do
with_fx :rhpf, centre: lfo0.look, res: lfo1.look do
peachS = sample yaxIn, "chiptune101", beat_stretch: 32, amp: vPeach, pan: -0.5
sleep 32
kill peachS
end
end
end
end
live_loop :BeatBits, sync: ([:A, :Peach]) do
puts tick
bbS = sample yaxIn, "drums", onset: choose([3,7,9]), beat_stretch: rrand(16, 32), cutoff: rrand(70, 120), release: 0.25, amp: choose([0, vDrumsBits]), pan: -0.2 if (spread 7, 8).look
sleep 0.25*speed0
kill bbS
end
live_loop :Beat, sync: ([:Peach]) do
with_fx :bpf, centre: lfo0.look, res: lfo1.look do
beatS = sample yaxIn, "drums", beat_stretch: 32, amp: vDrums
sleep 32
kill beatS
end
end
live_loop :Bass, sync: :Peach do
bassS = sample yaxIn, "Bass", beat_stretch: 32, amp: vBass, cutoff: 90
sleep 32
kill bassS
end
live_loop :BassSlice, sync: ([:B, :Peach]) do
puts tick
with_fx :echo, mix: 0.25, phase: 0.77, decay: 6 do
bassSliceS = sample yaxIn, "Bass", onset: pick, beat_stretch: 4, amp: vBassSlice, cutoff: 70 if (spread 7, 8).look
sleep (ring 0.5, 0.5, 0.25, 0.5).look
kill bassSliceS
end
end
live_loop :Bongos, sync: ([:Peach]) do
with_fx :ixi_techno do
bongoS = sample yaxIn, "Bongos", beat_stretch: 32, amp: vBongos, pan: 0.5
sleep 32
kill bongoS
end
end
live_loop :Guiero, sync: ([:C, :Peach]) do
with_fx :wobble, mix: 0.3 do
guiS = sample yaxIn, "Guiero", onset: pick, amp: choose([0, vGuiero]), pan: 0.35 if (spread 5, 8).look
sleep 0.25
kill guiS
end
end
live_loop :Shaker, sync: :E do
puts tick
with_fx :rhpf, centre: lfo3.look, res: lfo1.look do
sample yaxIn, "Shaker", beat_stretch: 32, amp: vShaker, pan: -0.35
sleep 32
end
end
live_loop :DubDelay, sync: :Peach do
with_fx :echo, mix: 0.75, phase: 0.3, decay: 16 do
with_fx :bitcrusher, mix: 0.45, bits: 10, cutoff: rrand(70, 110) do
sample yaxIn, "DubDelay", onset: pick, beat_stretch: 32, amp: vDubDelay, pan: -0.2
sleep 4
end
end
end
live_loop :DubDelay2, sync: :M do
with_fx :echo, mix: 1, phase: 0.75*speed2, decay: 16 do
sample yaxIn, "DubDelay", beat_stretch: 32, amp: vDubDelay2, pan: 0.2
sleep 64 #Original was 32
end
end