Creative Coder/Multimedia Artist/Performative Programmer : Engineering Thru Creative Means and Providing Experiences
The prompt for Genuary 2023 Day 23 is
Moire
Overlaying a multitude of Moire Circles and other shapes
Sound is coded in SonicPi using the distance equation
Overlaying
As the circle prowl
As their diameters growl
And their circumferences howl
For they are not staying
As the day turns in
SonicPI Code
defdistance(x1,y1,x2,y2)
distance = Math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
puts distance
distance
end
i = 0
live_loop :distancingdo#a and b are line 1 and line 2#X and Y are the coordinates
Xa = [5,7,9,12,4,1]
Ya = [2,3,5,6,1,3]
Xb = [0,4,5,2,1,7]
Yb = [3,2,4,5,0,8]
x = distance(Xa[i],Xb[i],Ya[i],Yb[i])
y = distance(Xa[dice(i)],Xb[dice(i)],Ya[dice(i)],Yb[dice(i)])
with_fx :flanger, amp: dice(2) do
with_fx :ping_pong, mix: rrand(0.3,0.6) do
use_synth :hollow
play (x * y)/2, sustain: dice(4)
play_pattern_timed chord([:c3,:E3].choose, :m7), x/y
endendif i >= Xa.length - 1
i = 0end
i+= 1
sleep [0.25,0.5,1,2,4].choose
end
j = 0
live_loop :distancing2do#points C and D
Xc = [dice(3)+3,dice(6),dice(5),dice(10)]
Yc = [dice(2),(dice(5)-1).abs,dice(7),dice(10)+1]
Xd = [dice(5),dice(4),dice(5),(dice(10)-1).abs]
Yd = [dice(9),dice(7),dice(9),dice(10)]
x = distance(Xc[j],Xd[j],Yc[j],Yd[j])
y = distance(Xc[dice(j)],Xd[dice(j)],Yc[dice(j)],Yd[dice(j)])
with_fx :pitch_shift, mix:0.35, amp: dice(2) do
with_fx :ping_pong, mix: rrand(0.3,0.6) do
use_synth :hollow
play (x * y)/1.5, attack: dice(4)
play_pattern_timed chord([:c2,:e3,:a4,:g2].choose, :m7), y/x
endendif j >= Xa.length - 1
j = 0end
i+= 1
sleep [0.25,0.5,1,2,4].choose
end