Skip to content

Instantly share code, notes, and snippets.

@whitetigle
Created June 1, 2017 09:02
Show Gist options
  • Select an option

  • Save whitetigle/352f58e5cc251f75bce504819995e50d to your computer and use it in GitHub Desktop.

Select an option

Save whitetigle/352f58e5cc251f75bce504819995e50d to your computer and use it in GitHub Desktop.
wip Super mario sonic pi
use_bpm 120
rythm = 0.25
synth = [ :piano, :beep, :chiplead, :dsaw ]
fx = [ :bitcrusher, :bitcrusher , :krush, :krush]
live_loop :theme do
s = synth[0]
f = fx [0]
with_fx f do
with_synth s do
play_pattern_timed([:e5,:e5,nil,:e5,nil,:c5,:e5,nil,
:g5,nil,nil,nil,nil,nil,nil,nil], [rythm] )
end
end
s = synth[1]
fx = fx [1]
with_fx f do
with_synth s do
2.times do
play_pattern_timed([:c5,nil,nil,:g4,nil,nil,:e4,nil,
nil,:a4,nil,:b4,nil,:Bb4,:a4,nil], [rythm])
play_pattern_timed([:g4,:e5,:g5], [1/3.0]) # minim triplets
play_pattern_timed([:a5,nil,:f5,:g5,
nil,:e5,nil,:c5,
:d5,:b4,nil,nil], [rythm])
end
end
end
s = synth[2]
fx = fx [2]
with_fx f do
with_synth s do
2.times do
play_pattern_timed([nil,nil,:g5,:fs5,:f5,:ds5,nil,:e5,
nil,:gs4,:a4,:c5,nil,:a4,:c5,:d5,
nil,nil,:g5,:fs5,:f5,:ds5,nil,:e5,
nil,:c6,nil,:c6,:c6,nil,nil,nil,
nil,nil,:g5,:fs5,:f5,:ds5,nil,:e5,
nil,:gs4,:a4,:c5,nil,:a4,:c5,:d5,
nil,nil,:ds5,nil,nil,:d5,nil,nil,
:c5,nil,nil,nil,nil,nil,nil,nil], [rythm])
end
end
end
s = synth[3]
fx = fx [3]
with_fx f do
with_synth s do
play_pattern_timed([:c5,:c5,nil,:c5,nil,:c5,:d5,nil,
:e5,:c5,nil,:a4,:g4,nil,nil,nil,
:c5,:c5,nil,:c5,nil,:c5,:d5,:e5,
nil,nil,nil,nil,nil,nil,nil,nil,
:c5,:c5,nil,:c5,nil,:c5,:d5,nil,
:e5,:c5,nil,:a4,:g4,nil,nil,nil], [rythm])
end
end
end
kick = [:drum_heavy_kick,:drum_cymbal_closed].ring
live_loop :drums, delay: 4.0 do
sample kick.tick, attack: rythm / 2, amp: 2.0
sleep rythm * 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment