# WCCC_ColorRiot

# ColorSplashRiotScape

For this week's Creative Code Challenge by @sableraph: ***"Riot of Color”,* ColorSplashRiotScape** coded from **HydraVideoSynth, BarbaraGraphics & SonicPi**. Uses a riot of colors to convey the personalities, characteristics and movements from these colors. Audio is also coming from the color : Peach Cobbler.

## Poem

```cpp
Colors Overlapping and Rioting
Different splashes of hues, 
Rotating & Pivoting
WIth a snap, externally choose
Where to go
Where the ColorSplashScape
Decides to Hold
Forgoes sense and begins it Fate
```

## Video

%[https://youtu.be/Z3mp9e6YSR4] 

  

## Code

### HydraVideoSynth

```javascript
//Part 1

osc(8,-0.5, 1).color([-1.5,2,3],[-1.5,0,1.5], [0,1,-1.5]).diff(o0).luma(0.3).rotate([-0.5,10,20].smooth(), ()=> (time % 10 + 1)/9).modulate(shape([0.2,0.1,1,2].smooth(),[0.4,0.2,0.3].smooth(),[0.5,1].smooth()).rotate(0.5, 0.5).modulateScale(osc(1,-0.5,0)).scale(0.5).repeatX(1.5, [1.5,2.5,3].smooth()).repeatY([1.5,2.3,3].smooth(), 1.5)).scrollX([0.5,1,2,4].smooth()).scrollY(()=> (time % 20 + 1)/30).out(o0)

speed = 0.015

//Part 2


osc(8,-0.5, 1).color([-1.5,2,3],[-1.5,0,1.5], [0,1,-1.5]).diff(o0).rotate([-0.5,10,20].smooth(), ()=> (time % 10 + 1)/9).modulate(shape([0.2,0.1,1,2].smooth(),[0.4,0.2,0.3].smooth(),[0.5,1].smooth()).rotate(0.5, 0.5).modulateScale(osc(1,-0.5,0)).scale(0.5).repeatX(1.5, [1.5,2.5,3].smooth()).repeatY([1.5,2.3,3].smooth(), 1.5)).scrollX([0.5,1,2,4].smooth()).scrollY(()=> (time % 20 + 1)/30).out(o0)

speed = 0.015

```

### SonicPi

```ruby
#reading of the DipInCodeFirstService
#for csvs larger than 10 mbs use the for reach


require 'csv'

#naming the Dataset DipInCode and going to read the file
Dip = CSV.parse(File.read("C:/Colorscape/DipInCode/SonicPi_CodeBase/Model/DipInCode_FirstService.csv"), headers: true)

#Getting the Ingredients
PeachCobbler = Dip[31]

#Dip[foodname][column].to_f , need to.f as it is to float
#0s and other ratios might have to be switch out to give flow to that track and make it run

with_fx :ixi_techno do
  live_loop :PeachCobbler1 do
    use_bpm PeachCobbler["Red"].to_f
    sample :ambi_choir, rate: dice(PeachCobbler["Yellow"].to_f/PeachCobbler["Hue"].to_f)  if spread(PeachCobbler["Blue%"].to_f,PeachCobbler["Green%"].to_f).tick
    sample :perc_snap2,rate: rrand(PeachCobbler["y2"].to_f,PeachCobbler["Red"].to_f/PeachCobbler["Blue"].to_f)  if spread(PeachCobbler["H-Lab1"].to_f,PeachCobbler["CIE-L"].to_f).reverse.mirror
    sleep [PeachCobbler["x2"].to_f,PeachCobbler["Yellow"].to_f/PeachCobbler["Mangeta"].to_f,PeachCobbler["Saturation2"].to_f/PeachCobbler["Lightness"].to_f].choose
  end
end

with_fx :krush, mix: PeachCobbler["x2"].to_f  do
  live_loop :PeachCobbler2 do
    use_bpm PeachCobbler["Blue"].to_f
    with_fx :reverb do
      sample :perc_snap2, rate: rrand(PeachCobbler["y2"].to_f,PeachCobbler["Red"].to_f/PeachCobbler["Blue"].to_f) if spread(PeachCobbler["H-Lab1"].to_f,PeachCobbler["CIE-L"].to_f).reverse.mirror
      sleep [PeachCobbler["x2"].to_f,PeachCobbler["Green%"].to_f/PeachCobbler["Blue%"].to_f].choose
    end
  end
end

with_fx :ping_pong do
  live_loop :PeachCobbler3 do
    use_bpm PeachCobbler["Green"].to_f
    sample :tabla_ghe2, rate: dice(PeachCobbler["Yellow"].to_f/PeachCobbler["Hue"].to_f)  if spread(PeachCobbler["Blue%"].to_f,PeachCobbler["Green%"].to_f).tick
    sample :perc_snap2, decay: PeachCobbler["H-Lab2"].to_f, rate: rrand(PeachCobbler["y2"].to_f,PeachCobbler["Red"].to_f/PeachCobbler["Blue"].to_f)  if spread(PeachCobbler["H-Lab1"].to_f,PeachCobbler["CIE-L"].to_f).reverse.mirror
    sleep [PeachCobbler["x2"].to_f,PeachCobbler["Yellow"].to_f/PeachCobbler["Mangeta"].to_f,PeachCobbler["Saturation2"].to_f/PeachCobbler["Lightness"].to_f].choose
  end
end

#.ceil to round up

with_fx :vowel,voice: dice((PeachCobbler["Saturation"].to_f % PeachCobbler["Hue"].to_f).ceil()) do
  live_loop :PeachCobbler4 do
    use_bpm PeachCobbler["Red"].to_f
    with_fx :reverb do
      sample :perc_snap2, rate: rrand(PeachCobbler["y2"].to_f,PeachCobbler["Red"].to_f/PeachCobbler["Blue"].to_f) if spread(PeachCobbler["H-Lab1"].to_f,PeachCobbler["CIE-L"].to_f).reverse.mirror
      sample :ambi_choir, rate: dice(PeachCobbler["Yellow"].to_f/PeachCobbler["Hue"].to_f)  if spread(PeachCobbler["Blue%"].to_f,PeachCobbler["Green%"].to_f).tick
      sleep [PeachCobbler["x2"].to_f,PeachCobbler["Green%"].to_f/PeachCobbler["Blue%"].to_f].choose
    end
  end
end

```

### BarbaraGraphics

```dockerfile
triangle white color 180 rotate
triangle black color 180 rotate 25 75 translate
triangle purple color 25 10 translate 17 10
triangle brown color 180 rotate 0 25 translate 20 5
triangle red color 0 25 translate
triangle yellow color 10 translate
duplicate 25 25 translate blue color
duplicate 180 90 rotate green color 5 translate
triangle orange color 75 rotate
all repeat

—



triangle white color 180 260 rotate
triangle black color 18 rotate 15 75 translate
triangle purple color 25 10 translate 27 20
triangle brown color 180 rotate 0 25 translate 20 15
triangle red color 0 25 translate
triangle yellow color 14 translate
duplicate 25 25 translate blue color
duplicate 180 90 rotate green color 15 translate
triangle orange color 75 rotate
all repeat

–


triangle grey color 180 rotate
circle black color 180 rotate 25 75 translate
triangle purple color 25 10 translate 17 10
triangle brown color 180 rotate 0 25 translate 20 5
circle red color 0 25 translate
circle navy color 10 -12
translate
duplicate 25 25 translate blue color
duplicate 180 90 rotate lime color 5 translate
triangle yellow color 75 rotate
all repeat

```
