WCCC_MathematicalDecayHorses
HorsingAround
For this week's Creative Code challenge hosted by Raphaël de Courville , I combined the runner ups & winning topic of "Mathematical , Decay & Unrealistic Horses" to make HorsingAround.
Coding Languages used ; Locomotion & Hydra for the Horses, SonicPi for Mathematical & Decay
Mathematical Design
Using Math Libraries within SonicPi with a hint of decay
Using code for Mathematical Indexes as seen here: https://blog.illestpreacha.com/mathober2023index
Using Code for the Mathematical concept of Kissing Numbers: https://blog.illestpreacha.com/mathober2023kiss
Various Remixes of horses through this previous Genuary sketch: https://blog.illestpreacha.com/genuary2024re-creation
Poem
The Decaying of the pixels
Around the edges of horses
Deem to be unrealistic
A surreal statistic
Perhaps Magical?
Reinforce that feeling of surrealism?
Imbued with different equations
That manifest of sources
To bring on sensations
A hint of futurism??
As the Horses room to the decaying of Pixels
VIdeo
AtHydra
s0.initScreen()
src(s0).luma([0.5,0.4,0.3,0.2,0.3,0.4,0.5].
smooth()).diff(src(s0).colorama(()=> (time % 10 + 1)/20)).
colorama(()=> (time % 10 + 1)/20).modulateScale(osc(1,1,1),1.27).
repeat(1,2).modulateScale(osc(1,1,1).kaleid([1,2,3,4,3,2,1].smooth()),1.15).
modulatePixelate(osc(1.5,0.75, 0.25).kaleid([4,3,1,2].smooth()).
scrollX(0.5,[0.25,0.5,0.75]),5000).out()
speed = 0.15
s0.initScreen()
src(s0).modulate(s0).scroll([0.5,0.25,-0.25,-0.5],[0.15,1,0.5,-0.43]).out()
//Hydra
s0.initScreen()
s1.initScreen()
src(s0).repeat(1,2).blend(src(s1).repeat(2,1)).out()
Locomotion
-- Triple Light Points
point {x = range 0 17 (osc 0.15), z = range 0 6 (osc 0.35) , intensity = range 8 35 (osc 0.15), color = 0xFFA500 };
point {x = range 0 17 (osc 0.15), z = range 0 6 (osc 0.35) , intensity = range 15 35 (osc 0.25), color = 0xFF0000 };
point {x = range 0 17 (osc 0.15), z = range 0 6 (osc 0.35) , intensity = range 20 45 (osc 0.25), color = 0x661111 };
ambient {intensity = 1};
point {color = 0x5555A7, x = 0, y = 3};
directional { colour=0xf00f80, intensity = range 0 2 (osc 0.5), z = range 0 17 (osc 0.8), y = 10, x = -6 };
point {x = range 0 17 (osc 0.15), z = range 0 6 (osc 0.35) , intensity = range 8 25 (osc 0.5), color = 0xFFA500};
directional {z = 6, intensity = range 0 10 (osc 0.5), color = 0xff0000};
--Horses Racing
for [0..10] (\n -> dancer { url ="https://threejs.org/examples/models/gltf/Horse.glb", size = 0.005, y = n/5 + range - 3 3 (osc 0.15),ry = n* 90,lz = n* 45, z = - 10 + 2* n, x = n + range -15 15 (osc 0.15), dur = (n * 2)/30});
b n = dancer {url = "https://threejs.org/examples/models/gltf/Horse.glb",dur = 3.5, rx = range n n*45,lz = n * 5, ry = n + range 10 260 (osc n * 0.215 / 10), x = n - (3) * 3,animation = [n,0.25, n + (-2),0.5,n*3,07.5,n*2.1], size = n/455};
for [0..15] b;
SonicPi Code
Mathematical with a Hint of Decay
def sounds(name, bpming,x,timer,sampling)
live_loop name do
use_bpm [bpming.choose,bpming.choose * 2].choose
use_random_seed Time.now.to_i / timer
with_fx :ixi_techno, phase: Math.hypot(( x.tick - 10).abs,x.tick) do
with_fx :echo, decay: Math.sqrt(dice(x.tick)),mix: 0.6 do
a = Math.acos(rrand(-1,1)) * 35
use_synth [:chiplead, :piano, :hollow].choose
play (a - bpming.choose).abs , sustain: Math.atan2(rrand(-1,1),rrand(-1,1)).abs
sample sampling.choose, beat_stretch: Math.cbrt(bpming.choose / timer) , rate: x.tick % 7 + 0.1
sleep [2,5,9].choose
end
end
end
end
sample
sounds(:math1,[45,12,30].shuffle,[20,30,40,12,44],2,[:ambi_choir,:sn_zome,:elec_twip])
sounds(:math2,[132,22,7],[50,15,30,27,32].reverse,3,[:elec_mid_snare,:elec_lo_snare])
sounds(:math3,[145,225,74].reverse,[44,75,120,5,7].shuffle,12,[:bass_trance_c,:ambi_piano,:drum_splash_hard])
sounds(:math4,[132,12,87].shuffle,[20,30,40,12,44].reverse,8,[:drum_snare_hard,:drum_tom_lo_hard,:elec_bong,:elec_pop])
Indexes
#Index3ForBlips
#Remixing this code by adding an index of 3
#Done by bringing the power to 3 via **
with_fx :reverb do
use_random_seed Time.now.to_i % 100 #making true random as it goes with the actual time
puts Time.now.to_i
live_loop :blips do
use_bpm 120
sample [:elec_blip,:elec_blip2,:elec_bong].choose, pan: rrand(-0.9,0.9)** 3, rate: rrand(-1.5, 1.5) ** 3
sleep [0.5,1,2].choose
end
end
live_loop :blips1, sync: :blips do
use_random_seed Time.now.to_i #making true random as it goes with the actual time
puts Time.now.to_i
with_fx :ixi_techno, mix: rrand(0.1,0.9) ** 3 do
use_bpm 60
sample [:elec_blip,:elec_blup,:elec_blup,:elec_flip].choose, pitch: 4, pitch_stretch: 0.4**3, rate: rrand(-2.5, 2.5) **3
sleep [0.5,1,2].choose
end
end
live_loop :blips2, sync: :blips do
use_random_seed Time.now.to_i / 3 #making true random as it goes with the actual time
puts Time.now.to_i
with_fx :echo,mix: rrand(0.1,0.7) ** 3, decay: rrand(0.5,2) ** 3 do
use_bpm 120
sample [:elec_blip,:elec_blip,:elec_blup,:elec_blup,:elec_flip].choose,amp: dice(5), rate: rrand(0,4) ** 3
sleep [0.5**3,1,2**3].choose
end
end
Kissing Numbers
#kissingNumbers Dronified
#The arrays are based on kissing numbers and their lower and upperbounds
number = [1,2,3,4,5,6,7]
lower = [2,6,12,24,40,72,126]
upper = [2,6,12,24,44,78,134]
i = 0
#number
live_loop :dronify1 do
with_fx :whammy, mix: 0.3 do
use_bpm 180
sample :ambi_drone , beat_stretch: number[i%7], amp: rrand_i(3,8)
sleep number[i%7]
i += 1
end
end
#lower bound
live_loop :lowerbound do
use_bpm 180
sample [:perc_snap,:perc_swoosh].choose , beat_stretch: lower[i%7]
sleep number[i%7]
i += 1
end
#numbers between lower and upperbound
live_loop :upperbound do
with_fx :ping_pong do
use_bpm 180
sample [:ambi_choir,:ambi_dark_woosh].choose , beat_stretch: rrand_i(lower[i%7],upper[i%7])
sleep number[i%7]
i += 1
end
end
Subscribe to my newsletter
Read articles from Kofi / Illestpreacha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by