MinaCoding2025_GradientScene

AlternativePlanetaryRise

For MinaCoding2025 Prompt 16 & 23: Gradient & Scene, AlternativePlanetaryRise coded in LiveCodeLab & SonicPi recreates a scene of planetary bodies rising.

Poem

Sun Rise to the backdrop
As the different gradients of the sky
Decide their portion of the day and its time
Will rotate and navigate
Through the rises and drop
Of the sun till it is out of sight
Temporarily crop
But managing to do its part in bright

Video

Code

LiveCodeLab

if time % 6 > 3
    animationStyle motionBlur

if time % 30 > 20
    simpleGradient purple,pink,orange
if time % 30 < 10
    simpleGradient aqua,white,blue
if time % 30 < 20 && time % 30 > 10
    simpleGradient black,navy,maroon

if time % 15 > 10
    ambientLight 100,20,200
    fill yellow
    stroke yellow

if time % 15 < 5
    ambientLight 255,255,0
    fill orange
    stroke orange

if time % 15 < 10 && time  % 15 > 5
    ambientLight 200,125,90
    fill red
    stroke red


if time % 12 > 6
    rotate (time % 4 + 1)/9,(time % 4 + 1)/9,(time % 4 + 1)/9 
    move (time % 12 +1)/12
else
    move (time % 12 +1)/12,(time % 12 +1)/12,(time % 12 +1)/12
    rotate sin(time),cos(time),tan(time)

ball

SonicPi

live_loop :bassflow do
  with_fx [:reverb,:echo].tick, mix: [0.6,0.4,0.2,0.1].tick do
    use_random_seed Time.now.to_i / 2
    use_bpm [120,30].choose
    if one_in(2)
      sample [:tabla_dhec,:tabla_tas3,:tabla_re].tick , rate: [0.5,1,-0.87,0.25].tick, amp: dice(3)+ 1
      sleep [0.5,1,2].choose
    else
      use_bpm [120].choose
      sample :drum_bass_soft, amp: 2.5
      sleep [0.25,0.5,1,4].tick
    end
  end
end


live_loop :heavydrum do
  with_fx :ixi_techno, mix: [0.75,0.5,0.625].choose do
    use_random_seed Time.now.to_i / 4
    if one_in(2)
      use_bpm [120].choose
      sample :drum_cymbal_closed
      sleep 0.5
    else
      use_bpm [120].choose
      sample :drum_heavy_kick
      sleep 0.25
    end
  end
end


live_loop :heavydrum1 do
  with_fx :ixi_techno, mix: ((use_random_seed Time.now.to_i / 10) % 10 + 1)/11 , phase: dice(3) do
    use_random_seed Time.now.to_i / 3
    if one_in(2)
      use_bpm [120,60].choose
      sample :drum_cymbal_closed
      sleep [0.5,0.75,1,2,4].tick
    else
      use_bpm [120,60].choose
      sample :drum_heavy_kick
      sleep [0.25,0.5,2,4].choose
    end
  end
end

live_loop :drumming do
  use_bpm [120,60].choose
  use_random_seed Time.now.to_i / 2
  sample :drum_cymbal_pedal
  sample :drum_splash_hard
  sleep [4,8,2].choose
end



live_loop :moredrums do
  use_bpm [120,60,30].choose
  with_fx [:flanger,:ping_pong].tick, mix: ((use_random_seed Time.now.to_i * 2) % 10 + 1)/11  do
    with_fx :echo, mix: rrand(0.1,0.7), amp: dice(4) do
      sample [:drum_tom_mid_soft,:drum_roll].choose
      sleep [1,2,4,8].choose
    end
  end
end
0
Subscribe to my newsletter

Read articles from Kofi / Illestpreacha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kofi / Illestpreacha
Kofi / Illestpreacha