-
-
Save kn1kn1/8944657e1cc62b2947e54044da465ec3 to your computer and use it in GitHub Desktop.
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
# Welcome to Sonic Pi v3.1 | |
load "~/github/petal/petal.rb" | |
set_volume! 1.0 | |
cps 1; d1; use_bpm get_bpm; live_loop :l0 do use_bpm get_bpm; sync :d0; end | |
live_loop :l5, sync: :l0 do | |
##| hush | |
##| stop | |
##| sleep 8 | |
with_fx :pitch_shift, window_size: 0.01, pitch: 2 do | |
with_fx :distortion do | |
d1 "uxay(5,16)", slow: 2, rate: 1, amp: 0.5, n: "irand 64", pan: "rand -0.5 0.5" | |
d2 "e(5,16,1)", slow: 2, rate: 1, amp: 0.5, n: "irand 64", pan: "rand -0.5 0.5" | |
d3 "glitch2(#{[7, 9, 11].choose},16,2)", slow: 2, rate: 1, amp: 0.5, n: "irand 64", pan: "rand -0.5 0.5" | |
d4 ":bd_haus(3,16)", slow: 2, amp: 0.5 | |
d5 :bd_haus, slow: 4, amp: 1.0 | |
end | |
end | |
sleep 7 | |
end | |
bpm = 40 | |
live_loop :beepsynth do | |
use_bpm bpm | |
use_real_time | |
note, velocity = sync "/midi/iacdriver_port1/0/2/note_on" | |
sleep [0.25, 0.5, 0.75, 1, 1.25].choose | |
rnote = chord(note, :M).choose | |
rel = rrand(1.5, 3) | |
synth :beep, note: rnote, | |
amp: velocity * 0.8/127.0, pan: rrand(-0.2, 0.2), | |
attack: 0.25, release: rel | |
end | |
live_loop :fmsynth do | |
use_bpm bpm | |
use_real_time | |
note, velocity = sync "/midi/iacdriver_port1/0/3/note_on" | |
synth :fm, note: chord(note, [:m11, :m9, :major, :major7].choose), | |
attack: [1, 0.75, 1.25, 1.5, 2].choose, cutoff: 80, | |
amp: velocity * 0.8/127.0, pan: rrand(-0.2,0.2) | |
end | |
live_loop :sawsynth do | |
use_bpm bpm | |
use_real_time | |
note, velocity = sync "/midi/iacdriver_port1/0/4/note_on" | |
use_random_seed 1111 | |
sleep [0.25, 0.5, 0.75, 1, 1.25].choose | |
rnote = chord(note, :M).choose | |
rel = rrand(2, 4) | |
with_fx :echo do | |
with_fx :flanger do | |
synth :saw, note: rnote, | |
amp: velocity * 0.1/127.0, pan: rrand(-0.2, 0.2), | |
attack: 0.25, release: rel | |
end | |
end | |
end |
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
........................................................................ | |
.....rC4.............2R4.V0............................................. | |
.....323Q.#.EBE.#.....2Y2E5............................................. | |
....0VEEE.#.BEB.#....D4vJJ5.#..MIDI.to.SP...#........................... | |
.......JJ.#.EEE.#.....:12E3.#..beep.synth...#........................... | |
.....1VEE.#.EBB.#....................................................... | |
........J...a........2R4.V1............................................. | |
......2VE...0.........2Y2E5............................................. | |
.....................D.vJJ5.#..MIDI.to.SP...#........................... | |
......................:22E4.#..fm.synth.....#........................... | |
........................................................................ | |
.....................0R1.V2............................................. | |
......................0Y0E5............................................. | |
.....................D8vJJ5.#..MIDI.to.SP...#........................... | |
.......................30E4.#..saw.synth....#........................... | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ | |
........................................................................ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment