Skip to main content

Command Palette

Search for a command to run...

WCCC_ Chromatic

Coding Through Colors

Updated
3 min read
WCCC_ Chromatic

ChromaticSpells&Tales

For this week's Creative Code challenge by @sableRaph: " Chromatic ”, ChromaticSpells&Tales is designed by having the animation be told through chromatic elements. What are the colors trying to say? And how are they trying to move?

Coded with SonicPi, LiveCodeLab & Python

Designing with Chromatics

  • Python for the Chromatic Squares and the Grid for the Chromatic Poetry)

  • using SonicPi to sonify the variables within the color Peach Cobbler and then using various tempos to represent the different ways, one can eat this color.

  • LiveCodeLab is used for extra colors and shapes

Chromatic Poem

Poetic Stanza 1 :
[['s' 'q' 'i']
 ['p' 'b' 'x']
 ['d' 'a' 'l']]


Poetic Stanza 2:
[['s' 'p' 'd']
 ['q' 'b' 'a']
 ['i' 'x' 'l']]

Colors For Poem

Using the name database of https://www.jootoor.com/

LetterName of ColorHex CodeRGB
SSalmon Salmon#FA8072(250, 128, 114)
QQuartz Deep Teal#006D75(0, 109, 117)
IIceberg#B4D8E7(180, 216, 231)
PPersian Green#00A693(0, 166, 147)
PPeach Cobbler#FFB181(255,177,129)
BButterscotch#F6A600(246, 166, 0)
XXimenia#F5A6A0(245, 166, 160)
DDragon’s Blood#A70D2A(167, 13, 42)
AAloe Vera#8C9C5D(140, 156, 93)
LLemon Meringue#F8DD5C(248, 221, 92)

Video

AudioVisual Code

Chromatic Squares - Python (Aided with Glitchlab)

import random


def colorgrid(amt):
    x =  "🟩🟡🟨🟪🟦🟪⏹️🔲🔳⬛⬜▫️🟥"
    joined = random.choices(x, k=amt)

    final = ''.join(joined)

    print(final)



def spellcase():
    colorgrid(5)
    colorgrid(7)
    colorgrid(12)
    colorgrid(19)
    colorgrid(3)
    colorgrid(17)
    colorgrid(24)
    colorgrid(10)
    colorgrid(5)

spellcase()

Peach Cobbler - SonicPi (Audio)

#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

LiveCodeLab

noStroke
ambientLight wave(0.03)* 170,255 - wave(0.03)* (170 - (time % 20) * 7), (time % 20) * 11

scale 0.45
ball Math.hypot(sin(time % 5 + 1),cos(time % 4)+ 1),  Math.hypot(sin(wave(time % 5 + 1)),tan(time % 4)+ 1)

move
scale 0.35
    ball Math.hypot(sin(time % 5 + 1),cos(time % 4)+ 1),  Math.hypot(sin(wave(time % 5 + 1)),tan(time % 4)+ 1)

move
scale 0.35
    ball Math.hypot(sin(time % 5 + 1),cos(time % 4)+ 1),  Math.hypot(sin(wave(time % 5 + 1)),tan(time % 4)+ 1)

move
scale 0.35
    ball Math.hypot(sin(time % 5 + 1),cos(time % 4)+ 1),  Math.hypot(sin(wave(time % 5 + 1)),tan(time % 4)+ 1)

Poetic Code

Ran previous NaPoGenMo Code: https://blog.illestpreacha.com/napowrimo24-poetic-matrices

WCCChallenge

Part 1 of 50

Submissions to the WCCChallenge