Skip to content

Instantly share code, notes, and snippets.

@Thomascountz
Created June 27, 2022 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thomascountz/147df7074180ad0016f197a1ed62cc8f to your computer and use it in GitHub Desktop.
Save Thomascountz/147df7074180ad0016f197a1ed62cc8f to your computer and use it in GitHub Desktop.
Lo-fi Piece written programmatically with Sonic Pi
# Listen here: https://soundcloud.com/thomas-countz/third-export
use_bpm 68
kicks = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Kicks"
snares = "/Users/thomas.countz/Sync/Lunar/Drum Shots/Snares"
live_loop :click do
sleep 1
end
live_loop :hiss, sync: :click do
sample :vinyl_hiss, amp: 0.3, beat_stretch: 5, rpitch: -8
sleep 5
end
live_loop :organ, sync: :click do
##| stop
with_fx :tremolo, phase: 0.125, wave: 3, mix: 1, depth: 0.65 do
use_synth :sine
play chord(:c3, :m11, invert: 0), sustain: 2, release: 0
sleep 2
play chord(:f3, :m9, invert: 1), sustain: 2, release: 0
sleep 2
play chord(:c3, :m11, invert: 1), sustain: 2, release: 0
sleep 2
play chord(:g3, '7+5', invert: 1), sustain: 2, release: 0
sleep 2
end
end
live_loop :bass, sync: :organ do
##| stop
use_synth :sine
play :c2, amp: 0.2, sustain: 2, release: 0
play :c3, amp: 0.2, sustain: 2, release: 0
sleep 2
play :f1, amp: 0.2, sustain: 2, release: 0
play :f2, amp: 0.2, sustain: 2, release: 0
sleep 2
play :eb2, amp: 0.2, sustain: 2, release: 0
play :eb3, amp: 0.2, sustain: 2, release: 0
sleep 2
play :g1, amp: 0.2, sustain: 1, release: 0
play :g2, amp: 0.2, sustain: 1, release: 0
sleep 1
play :eb2, amp: 0.2, sustain: 1, release: 0
play :eb3, amp: 0.2, sustain: 1, release: 0
sleep 1
end
live_loop :drumkit, sync: :organ do
stop
bass_drum = [[1, 0, 0, 0, 0, 0, 0, 1],[1, 0, 0, 0, 0, 0, 0, 0],[1, 0, 0, 0, 0, 0, 0, 1],[1, 0, 1, 0, 0, 0, 0, 0]].flatten
snare_drum = [[0, 0, 0, 0, 1, 0, 0, 0],[0, 0, 0, 0, 1, 0, 1, 1],[0, 0, 0, 0, 1, 0, 0, 0],[0, 0, 0, 0, 1, 0, 0, 1]].flatten
highhat = [[0, 0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0]].flatten
32.times do |i|
if bass_drum[i] == 1
sample kicks, 2, amp: 1, rpitch: 2
end
if snare_drum[i] == 1
sample snares, 1, amp: 0.5
end
if highhat[i] == 1
sample :drum_cymbal_closed
end
sleep 0.25
end
end
live_loop :motif_a, sync: :organ do
stop
with_fx :ping_pong do
with_fx :octaver do
melody = [:Eb5, :F5, :G5, :Bb5, :G5, :Eb5, :F5, :G5, :D5, :Bb5].ring
melody = scale(:c5, :minor_pentatonic).shuffle
use_synth :sine
play melody.tick, amp: 0.01, release: 0.3
sleep 0.125
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment