CircularThoughts
The prompt for Genuary 2024 Day 29 is SDF (Signed Distance Function)
Within the SonicPi Composition of "Circular Thoughts", the SDF controls the bpm, rate, beat_stretch and the notes being played
Poem
The Circles are Rotating
Their Inner Thoughts are Gyrating
The tone is Glitchy
The thoughts are plenty
As the Circular Thoughts are explaining
What their inner Thoughts are Saying
Audio
IllestPreacha · CircularThoughts
SonicPi Code
def SDF_circle(x, y, r)
Math.hypot(x,y) - r
end
r = 75
live_loop :soundOfSDF do
use_random_seed Time.now.to_i
use_bpm (dist_sdf).abs * 10 + 2
angle = rrand_i(-75,400)
x = r * Math.cos(angle * Math::PI / 180)
y = r * Math.cos(angle * Math::PI / 180)
dist_sdf = SDF_circle(x,y,r)
if (dist_sdf < 1)
with_fx [:ping_pong,:flanger].choose, mix: rrand(0.4,0.7) do
use_synth :prophet
play (dist_sdf).abs
sample [:bass_dnb_f,:perc_snap,:perc_swoosh].tick,
rate: (r/dist_sdf) if spread(7,12).tick
end
else
with_fx [:ixi_techno,:whammy].choose, mix: rrand(0.1,0.9) do
use_synth :piano
play (dist_sdf)
sample [:drum_bass_hard,:tabla_ghe1].choose,
beat_stretch: (r/dist_sdf).abs if spread(5,12).tick
end
end
sleep 0.5
end