Skip to main content

Command Palette

Search for a command to run...

WCCC_Balls

Attempt at Making Spheres

Updated
3 min readView as Markdown
WCCC_Balls

IllFittedSpheres

For this week's Creative Code Challenge by @sableraph: "Balls”, IllFittedSpheres  coded from #HydraVideoSynth, #LiveCodeLab & #SonicPi uses the Ball shape LiveCodeLab, adjustments from Hydra & various digital techniques and usage of the sphere formula in the SonicPi Coded Audio to envision a world where Spheres are Ill-fitted.

Poetry

Bounce slow, bounce fast
Bounces that turn into swings
In & out with either a pan or zoom
Where they vary in pace
Vary in the space
They amassed
Through various hues,
Delirious rules
That allows for the balls to bloom
Reacting like bubbles in a room

Video

https://youtu.be/c59i426SKU4

Code

LiveCodeLab

simpleGradient white,grey,navy

if time % 30 > 20
	ambientLight color((time % 10 + 1) * 25, (time % 15 + 1) * 15,(time % 5 * 1) * 45)
if time % 30 < 10
	ambientLight color((time % 15 + 1) * 15,(time % 5 * 1) * 45,(time % 10 + 1) * 25)
else
	ambientLight color((time % 5 * 1) * 45,((time % 10 + 1) * 25),(time % 15 + 1) * 15)

pushMatrix()
125 times with i
	scale 0.75
	rotate i/1000,time % 4,0
	move (time %10 +1) * wave(i),wave(i)/(time % 10 +1),sin(wave(i))
	ball sin(i), Math.hypot(sin(i/2), sin(i/3)),Math.hypot(sin(i/2), sin(i/3))
popMatrix()

pushMatrix()
125 times with i
	scale 0.5
	rotate Math.hypot(time % 4,Math.cbrt(time%4)),i/1000,0
	move sin(wave(i)),(time %10 +1) * wave(i),wave(i)/(time % 10 +1)
	ball sin(i/2),cos(i), sin(i/3)
popMatrix()

pushMatrix()
125 times with i
	scale 0.75
	rotate 0,time % 4,i/1000
	move (time %10 +1) * wave(i),sin(wave(i)),wave(i)/(time % 10 +1)
	ball  sin(i/3),sin(i/2),sin(i)
popMatrix()
simpleGradient white,grey,navy

if time % 30 > 20
	ambientLight color((time % 10 + 1) * 25, (time % 15 + 1) * 15,(time % 5 * 1) * 45)
if time % 30 < 10
	ambientLight color((time % 15 + 1) * 15,(time % 5 * 1) * 45,(time % 10 + 1) * 25)
else
	ambientLight color((time % 5 * 1) * 45,((time % 10 + 1) * 25),(time % 15 + 1) * 15)

pushMatrix()
(time % 25 + 1)*5 times with i
	scale 0.75
	rotate i/1000,time % 4,0
	move (time %10 +1) * wave(i),wave(i)/(time % 10 +1),sin(wave(i))
	ball sin(i), Math.hypot(sin(i/2), sin(i/3)),Math.hypot(sin(i/2), sin(i/3))
popMatrix()

pushMatrix()
(time % 15 +1)*9 times with i
	scale 0.5
	rotate Math.hypot(time % 4,Math.cbrt(time%4)),i/1000,0
	move sin(wave(i)),(time %10 +1) * wave(i),wave(i)/(time % 10 +1)
	ball sin(i/2),cos(i), sin(i/3)
popMatrix()

pushMatrix()
(time % 50+1) * 3 times with i
	scale 0.75
	rotate 0,time % 4,i/1000
	move (time %10 +1) * wave(i),sin(wave(i)),wave(i)/(time % 10 +1)
	ball  sin(i/3),sin(i/2),sin(i)
popMatrix()

HydraVideoSynth

s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).out()

speed = 0.0125
s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).modulate(src(s0)).out()

speed = 0.0125
s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).modulateRotate(src(s0)).out()

speed = 0.0125
s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).diff(src(s0).modulateRotate(src(s0))).out()

speed = 0.125
s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).diff(src(s0).scale([1.15,1.8,1.3,1.26]).modulateRotate(src(s0).scale([1.15,1.75].smooth()),[0.5,1,2].smooth())).out()

speed = 0.125
s0.initScreen()

src(s0).scale(1.20).blend(osc(1,1,1).kaleid(10)).repeat(()=> (Math.sin(time % 10 + 2)) * 3).blend(src(s0).scale([1.15,1.8,1.3,1.26]).modulateRotate(src(s0).scale([1.15,1.75].smooth()),[0.5,1,2].smooth())).out()

speed = 0.125

SonicPi



def sounding(radius,looping,sound,timer,timer2)
  
  
  #a volume of a sphere
  volume1 = (4.0 / 3.0) * (3.14) * radius* radius* radius;
  area1 = 4.0 * (3.14) * radius* radius;
  
  
  live_loop looping do
    use_bpm volume1 / area1 * radius
    use_random_seed Time.now.to_i/timer
    with_fx :ping_pong, mix: [0.1,0.8,0.3,0.5,0.25].choose do
      with_fx [:flanger,:whammy].tick, mix: [0.2,0.15,0.32,0.5,0.1,0.7].choose do
        use_random_seed Time.now.to_i/ volume1
        sample sound.choose, beat_stretch: [2,3,4].choose, pitch: radius/area1 if spread(19,24).tick
        sleep [1,2,4].choose
      end
    end
  end
  
end

 

#sonicarrangements
sounding(7,:loop1,[:ambi_piano,:arovane_beat_a],1,4)
sounding(8,:loop2,[:misc_cineboom, :arovane_beat_e],2,3)
sounding(9,:loop3,[:ride_tri,:elec_twang],4,2)
sounding(19,:loop4,[:ride_via,:ambi_haunted_hum ],2.5,1.5)

# Welcome to Sonic Pi


WCCChallenge

Part 4 of 50

Submissions to the WCCChallenge

Up next

WCCC_Burnout

Different Responses