WCCC_Soft

PastelWorlds

For this week's Creative Code challenge by @sableRaph: “Soft” PastelWorlds takes LiveCodelab, SonicPi & Hydra Code to make a pastel (which are considered Soft colors) based sketch. To fit the the soft theme, the audio is a slowed down version of a SonicPi Composition that is based on liquid inspired colors.

Poem

Pastelworld
Where The hue of the Pastel
Is left to unravel
Is left to Spiral
Left to communicate
Left to be Intricate
This is Pastelworld

Video

Code

Livecodelab


if time % 15 < 5
    simpleGradient color(204,241,255),color(224,215,255),color(255,204,225)
    fill color(255, 223, 211)
    stroke color(222, 241, 151)
    animationStyle paintOver
    rotate wave(sin(0.3)) * 5, wave(0.1), wave(0.03)
    peg sin(wave(0.003)),wave(0.3),tan(wave(0.3))

if time %15 > 10
    simpleGradient color(186,255,201),color(255,223,186),color(255,179,186)
    fill color(215,238,255)
    stroke color(250,255,199)
    animationStyle paintOver
    rotate wave(sin(0.3)) * 5, wave(0.1), wave(0.03)
    ball sin(wave(0.003)),wave(0.3),tan(wave(0.3))


if time % 15 > 5 and time % 15 < 10
    simpleGradient color(186,225,255), color(255,255,186),color(224, 187, 228)
    fill color(254, 200, 216)
    stroke color(202, 235, 237)
    animationStyle motionBlur
    scale (time % 10)/5
    rotate wave(sin(0.3)) * 5, wave(0.1), wave(0.03)
    4 times
        move
        box sin(wave(0.003)),wave(0.3),tan(wave(0.3))

Hydra

s0.initScreen()

src(s0).modulateRotate(src(s0).scale(1.5)).
modulatePixelate(src(s0).scale(0.75)).modulateScale(src(s0)).out()

SonicPi

#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
Honey = Dip[3]
Merlot = Dip[24]

#Dip[foodname][column].to_f , need to.f as it is to float

if Time.now.to_i % 2 == 0


  with_fx :vowel do
    live_loop :Merlot1 do
      use_random_seed Time.now.to_i / 2
      use_bpm Merlot["Red"].to_f
      sample :sn_dub, rate: dice(Merlot["Yellow"].to_f/Merlot["Key"].to_f)  if spread(Merlot["Blue%"].to_f,Merlot["Green%"].to_f).tick
      sample :ambi_dark_woosh,rate: rrand(Merlot["y2"].to_f,Merlot["Red"].to_f/Merlot["Blue"].to_f)  if spread(Merlot["H-Lab1"].to_f,Merlot["CIE-L"].to_f).reverse.mirror
      sleep [Merlot["x2"].to_f,Merlot["Yellow"].to_f/Merlot["Mangeta"].to_f,Merlot["Saturation2"].to_f/Merlot["Lightness"].to_f].choose
    end
  end

  with_fx :ixi_techno do
    live_loop :Honey do
      use_random_seed Time.now.to_i
      use_bpm Honey["Red"].to_f
      with_fx :reverb do
        sample [:perc_bell,:elec_bell,:loop_electric].choose, rate: rrand(Honey["y2"].to_f,Merlot["Red"].to_f/Merlot["Blue"].to_f) if spread(Merlot["H-Lab1"].to_f,Merlot["CIE-L"].to_f).reverse.mirror
        sleep [Honey["Red%"].to_f,Honey["Green%"].to_f/Honey["Red%"].to_f].choose
      end
    end
  end
end

if Time.now.to_i % 3 == 0

  with_fx :gverb do
    live_loop :Merlot3 do
      use_random_seed Time.now.to_i / 4
      use_bpm Merlot["Green"].to_f
      sample :elec_blip, rate: dice(Merlot["Yellow"].to_f/Merlot["Key"].to_f)  if spread(Merlot["Blue%"].to_f,Merlot["Green%"].to_f).tick
      sample :ambi_dark_woosh,rate: rrand(Honey["y2"].to_f,Merlot["Red"].to_f/Merlot["Blue"].to_f)  if spread(Merlot["H-Lab1"].to_f,Merlot["CIE-L"].to_f).reverse.mirror
      sleep [Merlot["x2"].to_f,Merlot["Yellow"].to_f/Merlot["Mangeta"].to_f,Merlot["Saturation2"].to_f/Merlot["Lightness"].to_f].choose
    end
  end

  with_fx :distortion do
    live_loop :Honey2 do
      use_random_seed Time.now.to_i / 5
      use_bpm Honey["Red"].to_f
      with_fx :reverb do
        sample [:drum_bass_soft,:elec_chime,:glitch_robot,:perc_snap2,:perc_till].choose, rate: rrand(Honey["y2"].to_f,Merlot["Red"].to_f/Merlot["Blue"].to_f) if spread(Merlot["H-Lab1"].to_f,Merlot["CIE-L"].to_f).reverse.mirror
        sleep [Merlot["x2"].to_f,Merlot["Green%"].to_f/Merlot["Blue%"].to_f].choose
      end
    end
  end
end
0
Subscribe to my newsletter

Read articles from Kofi / Illestpreacha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kofi / Illestpreacha
Kofi / Illestpreacha