MinaCoding2024_Morning

MinaCoding2024_Morning

Early Morning Thoughts

MorningSoundBites

For the 6th day of #MinaCoding2024 : "Morning" , MorningSoundBites is coded this morning in SonicPi.

Poetry

What shall we visualize
For this morning?
For this time?
What is it that you were thinking,
Once the sun rises
And you open the lid on your eyes
And they began to start blinking?

Audio

IllestPreacha · MorningSoundBites

SonicPi Code


def soundbites (div,div2)
  live_loop :door do

    #Timer in integers
    counter = Time.now.to_i
    use_random_seed (counter / div).to_i

    puts counter

    m0d = counter % div2


    with_fx :ping_pong do
      #using the time to control the sounds
      case m0d

      when div2 - 2

        with_fx :octaver, mix: 0.35 do
          sample [:loop_perc2,:elec_twip,:elec_wood,:elec_hollow_kick].choose, rate: rrand_i(-2,2)  + 0.1, beat_stretch: Math.cbrt(Math.cbrt(counter))
        end

      when div2 - 1

        with_fx :tremolo, wave: dice(4), mix: 0.45 do
          sample [:loop_electric,:ambi_soft_buzz].choose, decay: dice(5), beat_stretch: Math.hypot(m0d, rrand_i(-3,4))
        end

      else

        with_fx [:whammy,:vowel,:wobble,:ixi_techno].choose, mix: 0.56 do
          sample [:ambi_soft_buzz,:ambi_choir,:ambi_drone].choose, decay: dice(5), sustain: dice(4), beat_stretch: Math.hypot(m0d, rrand_i(-3,4) + 0.1)
        end

      end
    end


    sleep [0.25,0.5,1,2].choose
  end
end

#different sounds to get this following

soundbites(1,3)
soundbites(2,4)
soundbites(1,4)