Last active
April 13, 2024 13:57
-
-
Save Frithir/bd991af68fb285a2bc048c914ffba667 to your computer and use it in GitHub Desktop.
Psy trance - Sonic pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_volume! 1 | |
use_bpm 100 | |
with_fx :reverb, room: 0.4 do | |
live_loop :a1 do | |
tick | |
/ kick / | |
sample :bd_tek, amp: 4 if spread(1,4).look | |
# sample :bd_tek, amp: 4, pan: rdist(0.25) if spread(11,32).look | |
/ bass release pattern / | |
r = 1 | |
case r | |
when 1 | |
rel = [0.25].choose | |
when 2 | |
rel = [0.15,0.2,0.4].choose | |
when 3 | |
rel = [0.15,0.25,0.25,0.25,0.5].choose | |
end | |
/ bass / | |
use_synth :saw | |
use_synth_defaults release: rel, cutoff: [60,80,100,120].look | |
n = :fs1 | |
bass = 1 | |
case bass | |
when 0 | |
when 1 | |
play n, amp: 4 | |
play n+0.25, amp: 4, pan: rdist(0.25) | |
play n+0.25+12, amp: 2, pan: rdist(0.5) | |
end | |
/ top layer of notes / # just playing around | |
mel_or_noise = [1,2].choose | |
mel_or_noise = 1 | |
case mel_or_noise | |
when 1 | |
use_synth :square | |
use_synth :beep | |
use_synth :tri | |
use_synth [:tri, :square, :beep].choose | |
use_synth_defaults release: rel-0.1 | |
when 2 | |
use_synth :noise | |
use_synth [:noise,:gnoise].choose | |
use_synth_defaults release: rrand(0.001,0.1) | |
end | |
n2 = n+[24,24,24,24,36].look | |
n2 = n+24 | |
#n2 = n+36 | |
with_fx :ping_pong,phase: 0.75 do | |
play n2+12+12, amp: 3 if (spread(1,16)).look | |
play n2+12, amp: 2 if (spread(7,16)).look | |
end | |
# play scale(n2,:minor_pentatonic).pick, amp: 2, pan: rdist(0.25) if spread(3,5).look | |
# play scale(n2+12,:minor_pentatonic).pick, amp: 2, pan: rdist(0.75) if spread(5,7).look | |
sleep 0.25 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment