WCCChallenge-6+10+5+3

WCCChallenge-6+10+5+3

The challenge was 6 Circles, 10 Lines, 5 Rectangles & 3 Triangles

For this week's Creative Code Challenge by @sableRalph : 6 Circles, 10 Lines, 5 Rectangles & 3 Triangles, I decided to use Hydra & Livecodelab to Represent the 10 Lines, 5 Rectangles & 3 Triangles.

For the 6 Circles, I used the formula of area and circumference to control the audio output via SonicPi Code.

Poem

The six circles let their voice be heard
As the lines were finalised their herd
As they were waiting for the rectangles
Waiting for the triangles
10 is larger than eight
But the size of the five
And the addition of the three
Added a difference that couldn't be unseen
In this scene to be
But at this rate
The lines were twice the five
So they began and took the dive
And the instance
That you witness
Shall be occurring live

Video

Code

Hydra

s0.initScreen()

shape(3,0.5,1.5)
.scale(0.25,0.35)
.color([0.5,2].smooth(1),0.3,0).colorama(()=> (time % 12 + 6)/12)
.repeat(1,3).scrollX([0.1,0.3,-0.3,0,0,0,-0.1,0.1]).scrollY([0.1,-0.2,0.3,-0.4,0.3,0.2,-0.1])
.modulateScale(osc(3,0.5),-0.6)
.blend(s0)
.scale(3)
.out()


speed = 0.5

LiveCodeLab

simpleGradient black,white,orange

scale 0.2

time % 4 + 1 times with i //5 rects
    rotate wave(0.3),cos(time)
    move 0.5,1,2
    if time %  30 > 20
        rect 3 + (time % 12 + 1)/13,cos(wave(1))+ 3,3 +wave(3)
    if time % 30 < 10
        rect 3 + (time % 12 + 1)/13,cos(wave(0.3))+ 3,3 +wave(1)
    else
        rect 3 + (time % 12 + 1)/13,3 +wave(2),3 + cos(wave(2))
    2 times //10 lines
        move sin(time % 6), cos(wave(0.003))
        line 22,wave(0.03)*12,4

SonicPi

#using 6 circles to make the sound


def circles1(radius,loop)

  circumference = 2 * Math::PI * radius
  area = Math::PI * (radius ** 2)

  live_loop loop do
    with_fx :ping_pong,mix: 0.75 do
      with_fx :gverb, damp: 0.5 do
        use_synth :piano
        play circumference, decay: rrand(1,4), amp: 2
        sample :ambi_drone, beat_stretch: area / 80,amp: dice(10)
      end
    end
    sleep [0.25,0.5,1,2,4,8].choose
  end

end

def circles2(radius,loop)

  circumference = 2 * Math::PI * radius
  area = Math::PI * (radius ** 2)

  live_loop loop do
    with_fx :ixi_techno,mix: 0.75 do
      with_fx :vowel, voice: dice(3) + 1 do
        use_synth :chipbass
        play circumference, sustain: dice(3), amp: 2
        sample :tabla_ghe2, rate: area / 100, attack: dice(5), amp: dice(10)
      end
    end
    sleep [0.25,0.5,1,2,4,8].choose
  end

end


circles1(7,:circle1)
circles2(8,:circle2)
circles2(9,:circle3)
circles1(10,:circle4)
circles2(11,:circle5)
circles1(12,:circle6)