Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sonic-pi [2018/02/24 14:56] – julien | sonic-pi [2020/01/31 16:13] (current) – julien | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Code & composition made with Sonic-Pi ====== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | |||
+ | ===== Automation code ===== | ||
+ | |||
+ | strange reaction, burst crushed sounds, silence | ||
+ | |||
+ | < | ||
+ | # noise machine | ||
+ | |||
+ | live_loop :grush do | ||
+ | use_synth :dsaw | ||
+ | with_fx :ring_mod, freq: 30 do | ||
+ | play rrand(100, 130),amp:5 | ||
+ | with_fx : | ||
+ | play rrand(10, 34),amp:5 | ||
+ | with_fx :gverb, room: 0.6, damp: 0.5 do | ||
+ | play rrand(0.5, 1),amp:5 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | sleep rrand(4, 8) | ||
+ | | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ===== noise generators ===== | ||
+ | |||
+ | < | ||
+ | live_loop: | ||
+ | use_synth :bnoise | ||
+ | with_fx :rlpf, cutoff: 30, cutoff_slide: | ||
+ | with_fx : | ||
+ | with_fx :flanger, delay: 35, feedback: 0.9, amp: 10 do | ||
+ | play_pattern [40], attack: 2, decay: 5, sustain: 3, release: 1 | ||
+ | | ||
+ | sleep 1 | ||
+ | | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | live_loop: | ||
+ | use_synth :bnoise | ||
+ | with_fx :rlpf, cutoff: 50, cutoff_slide: | ||
+ | with_fx : | ||
+ | with_fx :flanger, delay: 35, feedback: 0.9, amp: 5 do | ||
+ | play_pattern [40], attack: 2, decay: 5, sustain: 3, release: 1 | ||
+ | | ||
+ | sleep 1 | ||
+ | | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ===== liveCode ===== | ||
+ | |||
+ | code from scratch | ||
+ | |||
+ | < | ||
+ | #live coding from scratch (13maiLiveCodingNight) | ||
+ | live_loop :suf do | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | live_loop :muf do | ||
+ | sample : | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :ffur do | ||
+ | with_fx : | ||
+ | use_synth :hollow | ||
+ | play rrand(60, 70), amp: 0, pitch: 20 | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | live_loop :tako do | ||
+ | #sync :foo | ||
+ | with_fx :krush, cutoff: rrand(90, 130), res: 0.7 do | ||
+ | sample : | ||
+ | sleep 0.25 | ||
+ | end | ||
+ | end | ||
+ | in_thread do | ||
+ | live_loop :fat do | ||
+ | with_fx : | ||
+ | sample :bd_fat, lpf: rrand(120, 131), window_size: | ||
+ | sleep 0.5 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== composition ===== | ||
+ | |||
+ | composition with multiple frequencies generator | ||
+ | |||
+ | < | ||
+ | #multiSinus aorBorl | ||
+ | |||
+ | live_loop :sin1 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(145, 150), sustain: 30, attack: 1, amp: 0 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin2 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(170, 175), sustain: 30, attack: 1, amp: 0 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin3 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(180, 185), sustain: 30, attack: 1, amp: 0, pan: -0.5 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin4 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(25, 35), sustain: 30, attack: 1, amp: 0, pan: 0.5 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin5 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(15, 25), sustain: 30, attack: 1, amp: 0, pan: -1 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin6 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(130, 140), sustain: 30, attack: 1, amp: 0, pan: 1 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin7 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(140, 145), sustain: 30, attack: 1, amp: 0, pan: -0.3 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin8 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(145, 150), sustain: 30, attack: 1, amp: 0, pan: 0.4 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin9 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(155, 160), sustain: 30, attack: 1, amp: 0, pan: -0.3 | ||
+ | sleep 5 | ||
+ | end | ||
+ | live_loop :sin10 do | ||
+ | use_synth :sine | ||
+ | play note: rrand(160, 165), sustain: 30, attack: 1, amp: 0, pan: 0.4 | ||
+ | sleep 5 | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | Drone& | ||
+ | |||
+ | < | ||
+ | # dronyMove | ||
+ | in_thread do | ||
+ | live_loop :freq do | ||
+ | use_synth :sine | ||
+ | play 60, sustain: 30, attack: 1, amp: 1 | ||
+ | sleep 10 | ||
+ | play 65, sustain: 30, attack: 1, amp: 1 | ||
+ | sleep 10 | ||
+ | play 67, sustain: 30, attack: 1, amp: 1 | ||
+ | sleep 10 | ||
+ | play 75, sustain: 30, attack: 1, amp: 1 | ||
+ | sleep 10 | ||
+ | end | ||
+ | end | ||
+ | in_thread do | ||
+ | live_loop :fat do | ||
+ | sample :bd_fat, lpf: rrand(1, 131), window_size: | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | in_thread do | ||
+ | live_loop :bassy do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | in_thread do | ||
+ | live_loop :snr do | ||
+ | with_fx :echo, mix: 0.3, phase: 0.25 do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | in_thread do | ||
+ | live_loop :guit do | ||
+ | with_fx :echo, mix: 0.3, phase: 0.25 do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== algoTek ===== | ||
+ | |||
+ | minimal ElectroNoise | ||
+ | |||
+ | < | ||
+ | # live v0.1 | ||
+ | use_bpm 100 | ||
+ | |||
+ | |||
+ | live_loop :foo do | ||
+ | with_fx :flanger, delay: 100, feedback: 1.9, phase: 10.5 do | ||
+ | use_synth :dpulse | ||
+ | play rrand(10, 30), release: 0.5, amp: 0 | ||
+ | sleep 1 | ||
+ | | ||
+ | end | ||
+ | end | ||
+ | live_loop :tako do | ||
+ | #sync :foo | ||
+ | with_fx :krush, cutoff: rrand(20, 100), res: 0.7 do | ||
+ | sample : | ||
+ | sleep 0.25 | ||
+ | end | ||
+ | end | ||
+ | live_loop :boum do | ||
+ | #sync :foo | ||
+ | sample : | ||
+ | sleep 10 | ||
+ | end | ||
+ | live_loop :tako do | ||
+ | #sync :foo | ||
+ | with_fx :echo do | ||
+ | sample : | ||
+ | sleep 4 | ||
+ | end | ||
+ | end | ||
+ | live_loop :test do | ||
+ | use_synth :cnoise | ||
+ | play 40, sustain: rrand(0.1 , 50), cutoff: 50, res: 0.9, amp: 2 | ||
+ | sleep 1 | ||
+ | end | ||
+ | |||
+ | live_loop :sci_fi do | ||
+ | sync :foo | ||
+ | p = play (chord :eb1, : | ||
+ | control p, divisor: rrand(0.001, | ||
+ | sleep 1 | ||
+ | end | ||
+ | |||
+ | live_loop :stret do | ||
+ | with_fx :gverb, room: 200, damp: 0.8 do | ||
+ | sample : | ||
+ | sleep 10 | ||
+ | end | ||
+ | end | ||
+ | |||
+ | live_loop :rough do | ||
+ | sync :foo | ||
+ | with_fx :bitcrusher do | ||
+ | sample : | ||
+ | sleep 10 | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | indusTekNoise | ||
+ | |||
+ | < | ||
+ | #dirty tek live code | ||
+ | live_loop :foo do | ||
+ | with_fx :flanger, delay: 100, feedback: 2, phase: 4.5, depth: 5, max_delay: 500 do | ||
+ | use_synth :beep | ||
+ | play rrand(50, 60), release: 0.5, amp: 5 | ||
+ | sleep 0.5 | ||
+ | end | ||
+ | end | ||
+ | live_loop :bar do | ||
+ | sync :foo | ||
+ | sample : | ||
+ | sleep 20 | ||
+ | end | ||
+ | live_loop :tak do | ||
+ | sync :foo | ||
+ | sample : | ||
+ | sleep rrand(2, 10) | ||
+ | end | ||
+ | live_loop :tak2 do | ||
+ | sync :foo | ||
+ | with_fx :echo, decay: rrand(0.1, 2) do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | live_loop :bass do | ||
+ | with_fx : | ||
+ | sync :foo | ||
+ | sample : | ||
+ | sleep 0.2 | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | #drum machine & live code | ||
+ | |||
+ | #akaBasse | ||
+ | live_loop :foo do | ||
+ | with_fx :flanger, delay: 200, feedback: 2.9, phase: 4.5, mix: 1 do | ||
+ | use_synth :chipbass | ||
+ | play rrand(15, 35), release: 0.5, amp: 1 | ||
+ | sleep 0.4 | ||
+ | end | ||
+ | end | ||
+ | #akaCharly | ||
+ | live_loop :tako do | ||
+ | sync :foo | ||
+ | with_fx :echo do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | #LeSnare | ||
+ | live_loop :sna do | ||
+ | sync :foo | ||
+ | with_fx :echo do | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep rrand(0.4, 0.5) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | #ZeKik | ||
+ | live_loop :bou do | ||
+ | sync :foo | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep 0.5 | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | live_loop :bing do | ||
+ | sync :foo | ||
+ | with_fx :ring_mod, freq: rrand(40, 50) do | ||
+ | use_synth :dull_bell | ||
+ | play rrand(90, 110), sustain: 10, amp: 0 | ||
+ | sleep 4 | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | DeconstrucAlt-Tek | ||
+ | |||
+ | < | ||
+ | #another livetek coding stuff | ||
+ | in_thread do | ||
+ | live_loop :bass_drum do | ||
+ | sample :bd_boom, sustain: 1, amp: 0.7 | ||
+ | sleep rrand(0.01, 1) | ||
+ | in_thread do | ||
+ | with_fx :echo, phase: 0.5, amp: 0.3 do | ||
+ | with_fx : | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep rrand(1, 1) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | use_synth :saw | ||
+ | live_loop :bassy do | ||
+ | p = play (chord :Cb1, : | ||
+ | control p, divisor: rrand(0.001, | ||
+ | sleep [0.5, 1, 2].choose | ||
+ | sleep 0.4 | ||
+ | end | ||
+ | end | ||
+ | live_loop :chime do | ||
+ | sample : | ||
+ | with_fx :flanger, delay: 15, feedback: 0.8, amp: 1 do | ||
+ | sleep rrand(10.1, 10.3) | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | code to algoTek with Others | ||
+ | < | ||
+ | #Total Open Algorave all together! | ||
+ | |||
+ | live_loop :fool do | ||
+ | with_fx :flanger, delay: 100, feedback: 0.9, phase: 3 do | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | #LeSnare | ||
+ | live_loop :sna do | ||
+ | sync :foo | ||
+ | with_fx : | ||
+ | with_fx :echo, phase: 0.7 do | ||
+ | sample : | ||
+ | sleep rrand(1.1, 2.3) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | live_loop :daaak do | ||
+ | sample : | ||
+ | sleep 0.5 | ||
+ | end | ||
+ | live_loop :chimy do | ||
+ | sample : | ||
+ | sleep 0.25 | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | #dirty tek live code v2 (240218) | ||
+ | live_loop :foo do | ||
+ | with_fx :flanger, delay: 30, feedback: 1, phase: 1.5, depth: 5, max_delay: 1000 do | ||
+ | use_synth :beep | ||
+ | play rrand(80, 150), release: 0.5, amp: 0 | ||
+ | sleep 0.5 | ||
+ | end | ||
+ | end | ||
+ | live_loop :bar do | ||
+ | sync :foo | ||
+ | with_fx :flanger, delay: 120, feedback: 1, max_delay: 1000 do | ||
+ | sample : | ||
+ | sleep rrand(0.2, 10.4) | ||
+ | end | ||
+ | end | ||
+ | live_loop :tak do | ||
+ | sync :foo | ||
+ | with_fx :slicer, wave: 1, pulse_width: | ||
+ | with_fx : | ||
+ | sample : | ||
+ | sleep rrand(0.05, 0.06) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | live_loop :tak2 do | ||
+ | sync :foo | ||
+ | with_fx :echo, decay: rrand(0.1, 10) do | ||
+ | sample : | ||
+ | sleep 2 | ||
+ | end | ||
+ | end | ||
+ | live_loop :bass do | ||
+ | with_fx : | ||
+ | sync :foo | ||
+ | sample : | ||
+ | sleep 1.2 | ||
+ | end | ||
+ | end | ||
+ | |||
+ | # | ||
+ | live_loop :bing do | ||
+ | sync :foo | ||
+ | with_fx :ring_mod, freq: rrand(40, 50) do | ||
+ | use_synth :dull_bell | ||
+ | play rrand(80, 110), sustain: 10, amp: 0 | ||
+ | sleep 10 | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ===== Useful to play with others ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | # ensemble live ALL | ||
+ | #méchant Saw! | ||
+ | live_loop :synt do | ||
+ | loop do | ||
+ | use_synth :dsaw | ||
+ | with_fx :lpf, cutoff: 50 do | ||
+ | play rrand(5, 35), sustain: 10, amp: 0 | ||
+ | sleep 1.5 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | # | ||
+ | live_loop :pian do | ||
+ | loop do | ||
+ | sample : | ||
+ | sleep 1 | ||
+ | end | ||
+ | end | ||
+ | #chime reverse | ||
+ | live_loop :synth1 do | ||
+ | with_fx :gverb, damp: 0.9, room: 200, spread: 1 do | ||
+ | with_fx :lpf, cuttoff: rrand(0.5, 30), amp: 10 do | ||
+ | sample : | ||
+ | sleep 10 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | # | ||
+ | live_loop :bing do | ||
+ | with_fx :ring_mod, freq: rrand(30, 40) do | ||
+ | use_synth :dull_bell | ||
+ | play rrand(120, 180), sustain: 10, amp: 0 | ||
+ | sleep 4 | ||
+ | end | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== BigBOUM Dance Floor punchy tek ===== | ||
+ | |||
+ | < | ||
+ | #BIGbOUM punchy tek | ||
+ | |||
+ | use_debug false | ||
+ | |||
+ | live_loop :time do | ||
+ | synth :tb303, release: 8, note: :e1, cutoff: (range 90, 60, -10).tick | ||
+ | sleep 8 | ||
+ | end | ||
+ | |||
+ | live_loop :machine do | ||
+ | sample : | ||
+ | sleep 8 | ||
+ | end | ||
+ | |||
+ | live_loop :vortex, auto_cue: false do | ||
+ | use_synth [:pulse, : | ||
+ | with_fx : | ||
+ | sleep 0.125 / 2 | ||
+ | play scale(:e1, : | ||
+ | sleep 0.225 / 2.7 | ||
+ | end | ||
+ | end | ||
+ | |||
+ | live_loop :moon_bass, auto_cue: false do | ||
+ | with_fx :echo, phase: 1, amp: 1 do | ||
+ | with_fx : | ||
+ | with_fx : | ||
+ | sample :bd_haus, amp: 2 | ||
+ | sleep rrand(0.5, 0.5) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ===== Post-indu deconstructor raw ===== | ||
+ | |||
+ | < | ||
+ | # CodeMess | ||
+ | live_loop: | ||
+ | sample : | ||
+ | with_fx :reverb, mix: 0.9, room: 0.9, damp: 1, amp: 10 do | ||
+ | with_fx : | ||
+ | with_fx : | ||
+ | | ||
+ | sleep rrand(0.35, 10) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | | ||
+ | live_loop: | ||
+ | use_synth :prophet | ||
+ | with_fx : | ||
+ | | ||
+ | sleep 4 | ||
+ | play scale(:e1, : | ||
+ | sleep rrand(1, 15) | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||