Cats are perfect
# The fibonacci sequence creates beautiful images
# Does it sound good when applied to equal temperment?
# It sounds like a cat with the zoomies in a room with a piano, so...yes?
# notes
fib = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# lengths - truncated because, like a hacker in a heist movie, we don't have enough time
fiblen = [1, 1, 2, 3, 5, 8, 13, 21]
# shift to bring notes into audible range - 1 becomes 22, 3 = 25, etc.
aud = 21
use_bpm 233 # also in the sequence
use_synth :piano
with_fx :gverb, amp: 1, room: 233 do
with_fx :compressor do
live_loop :loop do
len = choose(fiblen) * 0.5 # reduce time so it doesn't go on forever
play choose(fib)+aud, attack:len * 0.1, decay: len * 0.1, sustain: len * 0.5, amp: 0.5
play choose(fib)+aud, attack:len * 0.1, decay: len * 0.1, sustain: len * 0.3, amp: 0.5
play choose(fib)+aud, attack:len * 0.2, decay: len * 0.2, sustain: len * 0.2, amp: 0.5
play choose(fib)+aud, attack:len * 0.3, decay: len * 0.3, sustain: len * 0.1, amp: 0.5
play choose(fib)+aud, attack:len * 0.5, decay: len * 0.5, sustain: len * 0.1, amp: 0.5
sleep len
end
end
end