Skip to content

Instantly share code, notes, and snippets.

@locofocos
Created April 14, 2021 03:36
Show Gist options
  • Save locofocos/184738d3eed35213ef4daa7e733de0da to your computer and use it in GitHub Desktop.
Save locofocos/184738d3eed35213ef4daa7e733de0da to your computer and use it in GitHub Desktop.
Sonic PI music
use_bpm 120
live_loop :bass do
4.times do
sample :bd_haus, cutoff: 70, amp: 4
sleep 1
end
end
live_loop :drums do
sync :bass
sample :loop_amen_full, beat_stretch: 16, amp: 0.8
sleep 4
end
use_random_seed 10002
live_loop :scale do
sync :bass
live_loop :asdf_inner do
note = choose(scale(:a3, :minor_pentatonic, num_octaves: 2).notes[0..8])
use_synth :beep
play note, amp: 0.7
use_synth :prophet
play note, cutoff: 100
sleep choose([0.5, 0.25])
end
end
live_loop :riff do
sync :bass
use_synth :tb303
root = (ring :a2, :a2, :f2, :f2, :g2, :g2, :e2, :e2).tick
play [root, note(root) + 7], release: 0.5, amp: 1.3, sustain: 4, cutoff: 110
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment