This file contains hidden or 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
<?php | |
// https://adventofcode.com/2023/day/1/answer | |
$lines = file('data.txt'); | |
$calibrationValues = getCalibrationValues($lines); | |
$sum = array_sum($calibrationValues); | |
/** | |
* @return int[] |
This file contains hidden or 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
live_loop :a do | |
sample :ambi_choir, amp: rrand(0.2, 0.7) | |
sleep 1 | |
end | |
live_loop :b do | |
#sync :a | |
with_fx :echo do | |
play 60 + (ring 0, 12).tick, release: 0.2 | |
play 60 + (ring 7, 9, 5, 4).stretch(8).look, release: 0.2, pan: 0.2 |
This file contains hidden or 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
# adapted from robin newman: | |
# https://in-thread.sonic-pi.net/t/record-vocal-and-playback-with-effects/6202/5 | |
use_bpm 60 | |
use_real_time | |
i = 0 | |
buffers = [] | |
duration = 8 | |
4.times do |
This file contains hidden or 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
live_loop :a do | |
with_fx :slicer, mix: rrand(0.5, 1) do | |
with_fx :vowel, mix: rrand(0.8, 1) do | |
use_synth :blade | |
play scale(60, :major).choose, pan: 0.5, release: rrand(0.25, 2) | |
use_synth (ring :dark_ambience, :fm).choose | |
play 60, pan: -0.5 | |
play 60 + (ring -12, 12).choose, pan: -0.5 | |
end |
This file contains hidden or 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
use_synth :pluck | |
live_loop :a do | |
with_fx :echo, mix: rrand(0, 1) do | |
play 60 - 12, pan: rrand(-1, -0.75) | |
play 60 - 24, pan: rrand(0.75, 1) | |
play 60 - 36, amp: rrand(0, 0.5) if one_in 2 | |
play 60, pan: rrand(-0.5, 0) | |
end | |
with_fx :echo do |
This file contains hidden or 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
live_loop :a do | |
with_fx :reverb do | |
play 60, pan: -1 | |
play (ring 60, 62, 65, 60).stretch(4).tick, pan: 1 | |
end | |
sleep 1 | |
end | |
live_loop :b do | |
#sync :a |
This file contains hidden or 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
live_loop :a do | |
use_synth :fm | |
play 60 - (ring 12, 7, 5).stretch(4).tick | |
sleep 1 | |
end | |
live_loop :b do | |
sync :a | |
with_fx :echo do | |
play 72 + (ring 0, 2, 4).mirror.tick |
This file contains hidden or 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
live_loop :a do | |
play 60 | |
sleep 1 | |
end | |
live_loop :b do | |
sync :a | |
sleep (line 0.4, 0.6, steps: 20).choose | |
play 60 + (ring 4, 5).stretch(4).tick | |
end |
This file contains hidden or 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
live_loop :foo do | |
with_fx [:reverb, :distortion, :echo].choose do | |
live_audio :voice, amp: 3 | |
end | |
sleep 8 | |
end | |
live_loop :a do | |
sample :drum_bass_soft | |
sleep 1 |
This file contains hidden or 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
live_loop :a do | |
use_synth :subpulse | |
play 60 | |
sleep 1 | |
end | |
live_loop :b do | |
# sync :a | |
use_synth :subpulse | |
sleep 0.25 |
NewerOlder