# WCCChallenge_Falling

# FallingInLayers

For this week's Creative Code Challenge by @sableraph : "***Falling",***  We entered a glitched fall that occurred during the gameplay of **Descenders**. Languages this week are **Hydra, Locomotion & SonicPi**

## **Falling Procedure**

* In this Sketch, **Hydra** is responsible for the glitched versions and the layering of the same footage of the fall during Descenders.
    
    * While falling in the various realms, raccoons seem to be falling on the screen. This is courtesy of **Locomotion.**
        
    * There are several snippets of similar but yet different layers of **Hydra** code
        
    * The audio coded by **SonicPi**, is a representation of the journey that is **FallingInLayers.** Two of the Audio pieces come from a mixture and remixed of previous submissions: [https://blog.illestpreacha.com/wccchallenge-phages](https://blog.illestpreacha.com/wccchallenge-phages) & [https://blog.illestpreacha.com/wccchallengecirclecreations](https://blog.illestpreacha.com/wccchallengecirclecreations)
        

## Poem

```ocaml
Falling in Style
Stylish in the wild
Where Even the Raccoons
Are Falling in line with the Moon
as The Sun rises with its Touching
as Those Who Have fallen are Bunched in
as They Have Fallen in Style
and It Has Been Awhile
```

## Video

<iframe width="560" height="315" src="https://www.youtube.com/embed/C7RptIQAYo0?si=oeI_lZtMmJMhhKef"></iframe>

## Code

### Hydra

#### Descenders Modification

```javascript
//Glitchified screen

s0.initScreen()

src(s0).scale(0.88).repeat(2).kaleid(2).diff(s0).out()
```

```javascript
//Less Glictified Screen

s0.initScreen()

src(s0).scale(0.88).diff(s0).out()
```

```javascript
//Layered Background
s0.initScreen()

src(s0).scale(0.88).blend(s0).blend(src(s0).scale(0.75)).
blend(src(s0).scale(1.25)).out()
```

```javascript
//Layered Grid Background

s0.initScreen()

src(s0).scale(0.88).blend(s0).blend(src(s0).scale(0.75)).
diff(src(s0).scale(0.25)).add(src(s0).scale(2)).out()
```

### Hydra

#### LocomotionRemake

```javascript
s0.initScreen()
src(s0).repeat(4).modulateRotate(s0,0.5).modulateKaleid(s0,0.25).
blend(src(s0).scale([0.5,1,2,0.75,1.5,3,4]).colorama(0.5).
scrollX([0.5,-0.5,0.5])).diff(src(s0).rotate(()=> Math.cbrt(time))).
diff(src(s0).pixelate(1000)).out()
```

### Locomotion

```haskell

--racoon
dancer{ url = "raccoon.glb",size = 1, animation = 2, dur = 2, z = range 4 - 4 (osc 3), x = -2, y = range 10 -10 (osc 0.5),rx = 360, x = osc 0.5,lz = range 10 -10 (osc 0.5) };

dancer{ url = "raccoon.glb",size = 1, animation = 3, dur = 2, z = range 5 - 10 (osc 3), x = -2, y = range 14 -14 (osc 0.5),rx = 360, x = range 4-4 (osc 0.5),lz = range 10 -10 (osc 0.5) };

dancer{ url = "raccoon.glb",size = 0.5, animation = 1, dur = 2, z = range 4 - 4 (osc 3), x = -2, y = range 10 -10 (osc 0.5),rx = 360, x = range 1 4(osc 0.5),lz = range 10 -10 (osc 0.5) };

dancer{ url = "raccoon.glb",size = 0.5, animation = 3, dur = 2, z = range 4 - 4 (osc 3), x = -2, y = range 10 -10 (osc 0.5),rx = 360, x = range 1 4(osc 0.5),lz = range 10 -10 (osc 0.5) };

dancer{ url = "raccoon.glb",size = 0.5, animation = 3, dur = 2, z = range 4 - 4 (osc 3), x = -2, y = range 10 -10 (osc 0.5),rx = 360, x = range 1 4(osc 0.5),lz = range 20 -20 (osc 7.5) };
```

### SonicPi

```ruby
#the gutair sounds are representing the phages and their quest
#of vanishing the bacteriums

#There will be mutliple thraeds of phages to embody their abundance

#every eight loops, there will be a beep to symbolize a bacteria that was taken out


#The bacteria are represnted by synths

x = 0
live_loop :phages_set1 do
  
  #the amp paramter is also representing the 8
  #to 1 ratio but with a dice randomizer
  
  #In one source they mention 70% of marine bacteria contains Phages,
  #That can be seen with in the Spread function that uses Euclidean
  sample :guit_em9, beat_stretch: 2 , amp: dice(8) if spread(7,10).tick
  
  #this represents a 10 times faster speed than the bacteria
  #As well as the abundance they have over others
  
  
  if x % 8 == 0
    with_fx :distortion, distort: 0.9 do
      with_fx :echo do
        sample :elec_beep, amp: 7
      end
    end
  end
  
  sleep [0.8,1.2,1.6].choose
  
  
end

#A Different Strand of Phages

live_loop :phages_set2 do
  
  with_fx :ping_pong do
    sample :guit_em9, beat_stretch: 10, amp: dice(8) if spread(5,12).tick
  end
  
  puts x
  
  x += 1
  
  # every tenth loop, there will be a beep to symbolize a bacteria that was
  #taken out
  
  
  if x % 8 == 0
    with_fx :echo do
      with_fx :echo do
        sample :elec_beep, amp: 7, beat_stretch: 2
      end
    end
    
  end
  
  #this represents a 10 times faster speed than the bacteria
  #As well as the abundance they have over others
  
  sleep [0.6,1,2].choose
end



live_loop :bacteria do
  with_fx :krush, mix: 0.67 do
    use_synth :piano
    play_pattern chord(:E3, :m7), sustain: 12, decay: 14
  end
  
  sleep [8,12,16].choose
end


live_loop :bacteria2 do
  
  with_fx :ixi_techno, mix: 0.67 do
    use_synth :prophet
    play_pattern chord(:E3, :m7), sustain: 12, decay: 14
  end
  
  sleep [8,12,16].choose
end
```

```ruby
#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,circumference/2], decay: rrand(1,4), amp: 2
        sample [:ambi_drone,:elec_beep].choose, beat_stretch: area / 80,amp: dice(5)
      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/2,circumference/3,circumference].choose, sustain: dice(3), amp: 2
        sample [:tabla_ghe2,:elec_pong,:drum_bass_hard].choose, rate: area / 100, attack: dice(5), amp: dice(5)
      end
    end
    sleep [0.25,0.5,1,2,4,8].choose
  end
  
end


circles1(2,:circle1)
circles2(4,:circle2)
circles2(5,:circle3)
circles1(7,:circle4)
circles2(9,:circle5)
circles1(12,:circle6)
```

```ruby
with_fx :slicer do
  live_loop :mehado2 do
    use_bpm 20
    sample :bd_mehackit,amp: 7, beat_stretch: 4 if spread(4,7).tick
    sleep [0.25,0.15,0.4].choose
  end
end

with_fx :slicer do
  live_loop :kick do
    use_bpm 20
    sample :loop_amen,amp: dice(7), beat_stretch: 2 if spread(5,7).tick
    sleep [0.25,0.15,0.4].choose
  end
end

with_fx :slicer do
  live_loop :blips do
    use_bpm 20
    sample :elec_bong,amp: dice(7), beat_stretch: 2 if spread(5,7).tick
    sleep [0.25,0.15,0.4].choose
  end
end
```

```ruby

live_loop :dancing do
  use_bpm 120
  with_fx :flanger,decay: 4, amp: 3, feedback: 0.7, mix: 0.7 do
    sample :perc_snap if spread(9,12).tick
    sample :elec_blip2 if spread(7,15).tick
  end
  sleep [0.25,0.5,0.75,1].choose
end

live_loop :snapping do
  use_bpm 120
  with_fx :bitcrusher do
    sample :perc_snap2, beat_stretch: 2 if spread(6,12).tick
    sample :drum_bass_hard, beat_stretch: dice(2) if spread(5,12).tick
    sample :drum_bass_soft, beat_stretch: dice(4) if spread(8,13).tick
  end
  sleep [1,2,4].choose
end

live_loop :electronic do
  use_bpm 120
  with_fx [:whammy,:ixi_techno].choose do
    sample :ambi_sauna, amp: dice(4), beat_stretch: dice(2) if spread(2,5).tick
    sample :elec_blip, amp: dice(4), beat_stretch: dice(2) if spread(4,5).tick
    sample :elec_chime, amp: dice(4), beat_stretch: dice(5) if spread(3,7).tick
  end
  sleep [0.5,1].choose
end
```
