Table of contents
UndecidedPoints
The prompt for Genuary 2024 Day 8 is Chaotic Systems, Day 22 is Point-Line-Plane and Day 24 is Undecided Geometry
The Chaotic systems can be heard through the sound design in this SonicPi Coded Composition. To reinforce the chaotic system, usage of geometric and linear algebra equations were used to control the sound.
The Point to Plane and Line to Plane equations were the linear algebra components used to create the sound. Then an assortment of those return values were then integrated in the circumference equation to bring a sense of undecided geometry.
Audio
IllestPreacha · Undecided Points
Poetry
Points to Plane
Line not knowing to stay
Undecided
But reminded
That the path isn’t only the plane
So, Chaotic they get
Chaotic in depth
SonicPi Code
#linear algebra - point to a plane forumla
# distance between point and
# plane is: d = |Axo + Byo + Czo + D |/√(A**2 + B**2 + C**2)
#pt_$ = variable for points
#pl_$ = variable for plane
def pointToPlane (pt_a,pt_b,pt_c, pl_a,pl_b,pl_c,pl_d)
use_random_seed (Time.now.to_i)/5
point_a = [pt_a,pt_b,pt_c]
plane_a = [pl_a,pl_b,pl_c,pl_d]
#dot product of the point and planes
dot = point_a[0]*plane_a[0] + point_a[1] * plane_a[1] + point_a[2] * plane_a[2] + plane_a[3]
#the distance of the point to plane
return plane_D = dot / Math.sqrt(plane_a[0] ** 2 + plane_a[1] ** 2 + plane_a[2] ** 2)
#puts plane_D
end
def lineToPlane(xt,yt,zt, pl_a,pl_b,pl_c,pl_d)
use_random_seed (Time.now.to_i)/4
t = 0
# line to point
point_a = [xt + t,yt * t + yt,zt * 2]
plane_a = [pl_a,pl_b,pl_c,pl_d]
#dot product of the point and planes
dot = point_a[0]*plane_a[0] + point_a[1] * plane_a[1] + point_a[2] * plane_a[2] + plane_a[3]
#the distance of the point to plane
return plane_D = dot / Math.sqrt(plane_a[0] ** 2 + plane_a[1] ** 2 + plane_a[2] ** 2)
#puts plane_D
end
#the rate of the loops are determined by the distance to the plane
#as well as the sustain length
live_loop :lineToPlaneDistance do
use_random_seed (Time.now.to_i)/2
speed = lineToPlane(dice(5),dice(9),rrand_i(1,12),dice(10),8,rrand_i(-4,4),[0,1,2,3,4].choose)
sample [:loop_perc1,:ambi_dark_woosh].choose, rate: speed + 0.1, sustain: speed, amp: dice(5)
sleep [0.5,1,1.5,2,4].choose
end
live_loop :pointToPlaneDistance do
use_random_seed (Time.now.to_i)
speed = pointToPlane(dice(3),dice(4),rrand_i(0,3),dice(10),8,rrand_i(-4,4),[0,1,2,3,4].choose)
speed2 = pointToPlane(rrand_i(0,3),5,dice(4),dice(10),rrand_i(-4,4),9,[0,1,2,3,4].tick)
sample [:loop_electric,:elec_chime].choose, rate: speed, sustain: speed2, amp: dice(5)
sleep [0.5,1,1.5,2].choose
end
live_loop :DistanceToDistance do
use_random_seed (Time.now.to_i)/3
speed = pointToPlane(dice(3),dice(4),rrand_i(0,3),dice(10),8,rrand_i(-4,4),[0,1,2,3,4].choose)
speed2 = lineToPlane(rrand_i(0,3),5,dice(4),dice(10),rrand_i(-4,4),9,[0,1,2,3,4].tick)
#undecided geometry
distToDist = speed + speed2
distXdist = speed * speed2
dist_dist = speed / speed2
#points into circle
circumference = (2 * Math::PI * ([distToDist,distXdist,dist_dist].choose)).abs
area = Math::PI * (distToDist ** 2)
play [circumference,circumference/2], decay: rrand(1,4)
sample [:ambi_drone,:elec_beep,:drum_splash_hard,:guit_em9].choose, beat_stretch: area / 80
sleep [0.5,1,1.5,2,4].choose
end