Last active
February 5, 2016 00:03
-
-
Save aimxhaisse/ca09d418ffc5a5d8836f 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
# s. rannou - mxs.sbrk.org - @aimxhaisse | |
# | |
# Bubbles with Sonic Pi. | |
use_bpm 123 | |
note_base = :A2 | |
note_offset = (ring 0, 0, 5, 7) | |
live_loop :beat do | |
4.times do | |
tick | |
synth :cnoise, release: 1, cutoff: 110, res: 0.5, env_curve: 7, amp: 0.25 if spread(1, 2).look | |
synth :cnoise, release: 0.6, cutoff: 130, env_curve: 7, amp: 0.25 if spread(1, 2).rotate(8).look | |
synth :cnoise, release: 0.1, cutoff: 130, env_curve: 7, amp: 0.25 if spread(1, 2).look | |
sample :bd_tek | |
sample :bd_sone | |
sleep 1 | |
end | |
end | |
live_loop :crackles do | |
sync :beat | |
32.times do | |
tick | |
synth :cnoise, release: 0.1, cutoff: 130, env_curve: 7, amp: 0.25 if spread(3, 12).look | |
sleep 0.125 | |
end | |
end | |
live_loop :chords do | |
sync :beat | |
use_synth :fm | |
use_synth_defaults env_curve: 7, cutoff: line(30, 80, steps: 8).ramp.tick(:bass) | |
tick(:basstick) | |
with_transpose 36 do | |
play note_base - 12, sustain: 4, release: 0, amp: 0.5 | |
play note_base + note_offset.look(:basstick), sustain: 4, release: 0, amp: 1 | |
end | |
sleep 4 | |
end | |
live_loop :synth do | |
use_cue_logging false | |
sync :beat | |
use_synth :fm | |
use_synth_defaults release: 0.125, sustain: 0.125, amp: 0.75 | |
tick(:basstick) | |
with_fx :hpf, cutoff: line(129, 0, steps: 32).ramp.tick(:hpf) do | |
with_transpose 24 do | |
with_fx :ixi_techno, phase: 0.25, mix: 0.5 do | |
4.times do | |
4.times do | |
play chord(note_base + note_offset.look(:basstick), :major, num_octaves: 1).ring.tick | |
sleep 0.25 | |
end | |
end | |
end | |
end | |
end | |
end | |
live_loop :lead do | |
notes = scale(note_base, :major) | |
sync :beat | |
sequences = [ | |
# rank in notes, time, sleep | |
[[4, 0.25, 0.75], | |
[4, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[4, 0.25, 0.75], | |
[4, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[5, 0.25, 0.25], | |
[5, 0.25, 0.50], | |
[5, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[5, 0.25, 0.25], | |
[5, 0.25, 0.50], | |
[5, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[4, 0.25, 0.75], | |
[4, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[4, 0.25, 0.75], | |
[4, 0.25, 0.50], | |
[7, 0.25, 0.75]], | |
[[7, 0.25, 0.50], | |
[7, 0.25, 0.50], | |
[6, 0.25, 0.25], | |
[7, 0.25, 0.75]], | |
[[7, 0.25, 0.50], | |
[7, 0.25, 0.50], | |
[6, 0.25, 0.25], | |
[7, 0.25, 0.75]], | |
] | |
with_fx :level, amp: line(0.3, 1.25, steps: 32).ramp.tick(:level) do | |
with_fx :panslicer, phase: 0.5, mix: 0.5 do | |
with_fx :ixi_techno, mix: 0.25, phase: 0.5 do | |
with_fx :gverb, room: 70 do | |
with_fx :tanh, krunch: 5, mix: 0.99 do | |
sequences.each do |seq| | |
seq.each do |rank, duration, pause| | |
use_synth :tri | |
play notes[rank] + 12, release: duration * 5.0, sustain: duration, cutoff: 120, amp: 1.5 | |
sleep pause * 2 | |
end | |
sample :elec_bong | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
live_loop :bass do | |
sync :beat | |
use_synth :dsaw | |
use_synth_defaults env_curve: 7, cutoff: line(30, 80, steps: 8).ramp.tick(:bass) | |
tick(:basstick) | |
4.times do | |
with_fx :wobble, phase: 0.5, cutoff_min: 60, cutoff_max: 110 do | |
play note_base, sustain: 1, release: 0, amp: 0.4 | |
play note_base + note_offset.look(:basstick), sustain: 1, release: 0, amp: 0.25 | |
end | |
sleep 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment