FiBoNasty Sequence

https://www.mathsisfun.com/numbers/fibonacci-sequence.html

# FiBoNaSty

# Using a part of the Fibonacci sequence and the Golden Ratio 1.618034

# Happy resonating...with FiBo sleepcycles

# Stuff used and combined from http://in-thread.sonic-pi.net/

# https://www.mathsisfun.com/numbers/fibonacci-sequence.html

fibo = 1.618034

fibodiv = 1/fibo

fibobpm = 55/fibodiv

use_bpm fibobpm



kickBasePitch = fibodiv

live_loop :beat do
  sleep fibo
end

live_loop :BURP1, sync: :beat do
  
  samplz = [:drum_tom_lo_soft, :perc_snap, :perc_snap2, :drum_cymbal_pedal].choose
  with_fx :rlpf do
    with_fx :distortion, mix: fibodiv do
      8.times do
        sample samplz, rate: kickBasePitch + range(-0.01, 0.01, 0.0001).mirror.tick, cutoff: fibobpm-dice, start: 0.05, finish: 0.55, release: 0.2, amp: 0.5
        sleep fibo
      end
      sleep fibo
      with_fx :reverb, room: fibodiv do
        sample [:ambi_piano, :ambi_choir, :ambi_lunar_land].choose, amp: rrand(fibodiv,fibo)
        with_fx :distortion do
          5.times do
            3.times do
              sample samplz, hpf: fibobpm+dice, rate: 0.25 + range(0, 0.16, 0.01).mirror.tick, cutoff: fibobpm-dice, start: 0.15, finish: 0.48, release: fibodiv, amp: rrand(fibodiv,fibo)
              sleep fibo
            end
            2.times do
              sample samplz, hpf: fibobpm-dice, rate: 0.25 + [0.1, 0.16, 0.2, 0.26].choose, cutoff: fibobpm-dice, start: 0.05, finish: 0.48, release: fibodiv, amp: rrand(fibodiv,fibo)
              sleep fibo
            end
          end
          sleep fibo
        end
      end
    end
  end
end

sleep 21

beep_notes = (ring 8,13,21,34,55)

live_loop :BiepsA, sync: :beat do
  s= [:cnoise, :gnoise, :noise].choose
  5.times do
    sleep fibo
    with_fx :bitcrusher do
      with_synth s do
        play beep_notes.tick, amp: rrand(0.01,fibodiv),
          decay: rrand(0.01,fibodiv), release: rrand(0.01,fibo)
      end
    end
    sleep fibo
  end
  sleep fibo
end


live_loop :fibobass, sync: :beat do
  use_octave -fibodiv
  t = Time.now.to_i + rrand_i(-fibobpm, fibobpm)
  #t = rrand_i(-fibobpm-dice,fibobpm+dice)
  use_random_seed t
  puts "Seed: #{t}"
  
  z = [8,13,21,34,55,89,144].choose
  n = ((chord :c, :m7) + [z]).sort
  v = (line fibodiv, fibo).reflect
  p = (line -fibodiv, fibodiv, steps: fibobpm).reflect
  with_fx :normaliser, room: rrand(0,fibodiv), mix: rrand(0,fibodiv) do
    s1 = synth :dtri, note: n.tick(:n), attack: [fibo, fibodiv].choose, release: [fibo, fibodiv].choose, amp: v.tick, pan: p.look, cutoff: rrand(fibobpm-dice, fibobpm+dice)
    s2 = synth :fm, note: n.tick(:n), attack: [fibo, fibodiv].choose, release: [fibo,fibodiv].choose, amp: v.tick, pan: p.look, cutoff: rrand(fibobpm-dice, fibobpm+dice), noise: [0,1,2,3,4].choose, ring: [rrand(fibodiv, fibobpm), rrand(fibodiv, fibobpm), rrand(fibodiv, fibobpm)].choose
    control s1, amp: v.tick, amp_slide: [fibodiv, fibo].choose, pan: p.look, pan_slide: fibodiv, depth: rrand(fibodiv,fibo), depth_slide: rrand(fibodiv,fibo)
    control s2, amp: v.tick, amp_slide: [fibodiv, fibo].choose, pan: p.look, pan_slide: fibodiv, depth: rrand(fibodiv,fibo), depth_slide: rrand(fibodiv,fibo)
  end
  sleep fibo
end
2 Likes

Cool, thanks for sharing!
Now I need some time to study your code…

1 Like