# WCCChallenge_Flat

# EntranceToFlattenage

For this week's Creative Code Challenge by @sableraph : ***Flat,*** Enter the World of Flattenage thru the ***"EntranceToFlattenage"***

This week's languages are **Hydra, Locomoation, LiveCodeLab & SonicPi.** With **Videography** and **Worldbuilding** concepts added to build the world of ***Flattenage.***

## **World of Flattenage**

* As seen in the Video, to enter the world of Flattenage, The traveller has to find the right flat objects to touch. In the video, this was done four times, through a variety of flat-based objects.
    
* After being in contact with said Flat objects, the users will see the movements occurring in that realm. Unfortunately, to be fully transported into the world, the power level of the user has to be strong. Hence the various levels of the objects and surrounding areas transform into Flattenage.
    
* The sketches done in **LiveCodeLab & Locomotion** were both flattened by **Hydra** Code and in 360 view when applied.
    
* The **SonicPi-based** composition was made to complement the differences and similarities in the world of Flattenage and the world of Ours.
    

## Poem

```javascript
The world of the Flat
Facts that have been chosen
To be hidden
But now resides 
Within the finger of the one
The one that can summon
The portal to be opened
Opened to world of the 3D
Where volume is an aspect
Hovering is a concept
That provides content
But what about Flattenage
What is unlocked when we explore this phase
What happens when we look strictly for 2d
And start to see
What is needed to embrace
Now it is time, to get see where it is at
The world with Flattenage
What shall transpire with this new page?
```

## Video

<iframe width="560" height="315" src="https://www.youtube.com/embed/utizlrNL9BA"></iframe>

## Code

### LiveCodeLab

```javascript
simpleGradient red,teal,orange


if time % 8 > 4
	ambientLight 255, 100, 50
	box sin(time % 7), tan(time % 3) + 1, cos(time % 10)
else
	ambientLight 155, 10, 50
	ball sin(time % 7), tan(time % 3) + 1, cos(time % 10)

if time % 8 < 4
	ambientLight 80,120,200
	box  cos(time % 9) * wave(0.03), time % 3
else
	ambientLight 10,12,20
	rect  cos(time % 9) * wave(0.03), time % 3
```

### Locomotion

```haskell
dancer { url="StoneFigure.glb", x = -2,y = -1, z = -2, ry=3.14, size=0.75 };
dancer { url="StoneFigure.glb", x = -4, z = -2, ry=3.14, size=0.5 };
dancer { url="StoneFigure.glb", x = 2, z = -2, ry=3.14, size=0.5 };
dancer { url="StoneFigure.glb",animation = 2, x = -0, z = -2, ry=3.14, size=0.5 };
dancer{ url = "StoneFigure.glb", animation = 4, dur = 2, z = 0, x = -2, y = -3,rx = 360, x = osc 0.5,lx = range 10 -10 (osc 0.5) };
dancer{ url = "StoneFigure.glb", animation = 4, dur = 2, z = 0, x = -2, y = -3,rx = 360, x = osc 0.5,lx = range 10 -10 (osc 0.5) };
```

### Hydra

```javascript
s0.initScreen()
s1.initScreen()

src(s0).scale(0.25).kaleid(2).add(s1).repeat(()=> (time % 50 + 1)/17).out()
```

### SonicPi

```ruby
live_loop :dance do
  use_random_seed Time.now.to_i
  with_fx [:flanger,:whammy].choose, mix: rrand(0.1,0.7) do
    sample :loop_breakbeat,amp: dice(8),decay: dice(8), rate: [0.5,1,2].choose
    sleep [2,4,8].choose
  end
end


live_loop :dance1 do
  use_random_seed Time.now.to_i/2
  with_fx :ping_pong, mix: [0.1,0.2,0.1].choose do
    with_fx :vowel, voice: [1,2,3,4].choose, mix: 0.2 do
      use_bpm 60
      sample :loop_breakbeat, beat_stretch: [4,8].choose, amp: dice(8), rate: [0.5,0.25,1].choose
      sleep [4,8,16].choose
    end
  end
end


live_loop :dance2 do
  with_fx :ping_pong do
    use_random_seed Time.now.to_i/3
    with_fx :gverb, mix: rrand(0.3,0.6) do
      with_fx :vowel, voice: dice(3) do
        sample :loop_breakbeat,amp: dice(8), rate: 0.5
        sleep [1,2,4,8].choose
      end
    end
  end
end



with_fx :ixi_techno, mix: 0.4 do
  with_fx :whammy, mix: rrand(0.1,0.9) do
    use_bpm 60
    live_loop :r_dab808 do
      sample :guit_em9, beat_stretch: 12 if spread(9,12).tick
      sample :guit_em9, beat_stretch: 7 if spread(4,13).tick
      sample :guit_em9, beat_stretch: 11 if spread(11,14).tick
      sleep [0.25,0.5,0.75,1,2,4].choose
    end
  end
end



with_fx :ixi_techno, mix: 0.4 do
  with_fx :whammy, mix: rrand(0.1,0.9) do
    use_bpm 60
    live_loop :r_dab8082 do
      sample :ambi_piano, beat_stretch: 12 if spread(5,12).tick
      sample :ambi_piano, beat_stretch: 7 if spread(6,13).tick
      sample :ambi_piano, beat_stretch: 11 if spread(7,14).tick
      sleep [0.25,0.5,0.75,1,2,4].choose
    end
  end
end
```
