Kofi / Illestpreacha
Code is Poetry & Data is Poetry


Code is Poetry & Data is Poetry

WCCChallenge: TinyIsland

WCCChallenge: TinyIsland

Kofi / Illestpreacha's photo
Kofi / Illestpreacha
·Feb 5, 2023·

3 min read

Table of contents

  • TinyIslandMultiversing


For this week's Creative Code challenge by @sableRalph : Tiny Island, I decided to have an interactive mouse experience coded in Hydra. The audio is coded in SonicPi

To fit in the theme, I decided to take the following countries and territory and their respective coordinates and rainfall data to control the visuals and sound.


Being Tiny doesn't explain the soul
Or the way you can glow
The way the tide can harness your flow
As if you are gliding into space
In space
At your pace
Like it's your place

Visuals/Hydra Code

  • I decided to only use the 8 coordinate numbers found from those countries and territory

  • Then in the Hydra code, I gave them all their own section that only contains numbers from them but are able to communicate through the following functions:

    • osc,pixelate, diff, blend, add, noise, modulateRotate, modulateScale, voronoi, scale, mouse.x, mouse.y, color and shape

    • Video is also played backwards in the final Edition

Guam13.4443° N144.7937° E
Palau7.5150° N144.7937° E
Nauru0.5228° S166.9315° E
Federated States of Micronesia7.4256° N150.5508° E

Location of the Four Countries
13.4443° N, 144.7937° E - Guam
7.5150° N, 144.7937° E - Palau
0.5228° S, 166.9315° E Nauru
7.4256° N, 150.5508° E Federated States of Micronesia

//Gave the first two functions the coordinates of Nauru

//Gave this section the numbers from Guam

//Palau Coordinates
voronoi(134.5825).scale(()=> time % 7.5150).blend(o0).add(o3).blend(o1).out(o2)

shape(()=> mouse.x / 150.5508).color(()=> mouse.y / 7.4256).modulateRotate(o1).out(o3)

Audio / SonicPi Code

require 'csv'

#Parsing the Data for the Tiny Island Creative Code Challenge
#For today, I am parsing the Rainfall of the Following Four Countries : Nauru, Palau, Micronesia, Guam

Nauru = CSV.parse(File.read("C:/Creatuve Code Challenges/New folder/Nauru_RainFall - Sheet1.csv"), headers: true)
Palau = CSV.parse(File.read("C:/Creatuve Code Challenges/New folder/Palau_RainFall.csv"), headers: true)
Micronesia = CSV.parse(File.read("C:/Creatuve Code Challenges/New folder/Micronesia_RainFall.csv"), headers: true)
Guam = CSV.parse(File.read("C:/Creatuve Code Challenges/New folder/Guam-RainFall.csv"), headers: true)

#doing the months as the index instead of an integer

January = 0
February = 1
March = 2
April = 3
May = 4
June = 5
July = 6
August = 7
September = 8
October = 9
November = 10
December = 11

def weathering(looping,country1,country2,looping2)

  months = ["January", "February", "March", "April", "May", "June","July", "August", "September", "October", "November", "December"]

  i = 0
  live_loop looping do

    #since it is read as a strong got to put it as float

    #taking the millimeters per month and taking the difference between them
    use_synth [:bass_foundation,:piano,:chipbass].choose
    #play (country1[i]['Millimeters'].to_f - country2[i]['Millimeters'].to_f).abs / 2 + 1 #- Making sure the loop is functioning right
    play chord((country1[i]['Millimeters'].to_f - country2[i]['Millimeters'].to_f).abs / 2 + 1 , :minor), release: country1[i]['Inches'].to_f
    play_pattern_timed chord((country1[i]['Millimeters'].to_f - country2[i]['Millimeters'].to_f).abs / 2 + 1 , :minor), country1[i]['Inches'].to_f / country2[i]['Inches'].to_f  * 2
    #taking the addition of the rainy days and dividing them by 10
    sample :guit_e_slide , rate: (country1[i]['Days'].to_f + country2[i]['Days'].to_f).abs / 10

    if i >= months.length - 1
      i = 0

    #taking the inches of rain seen by the countries and dividing them
    sleep [(country1[i]['Inches'].to_f / country2[i]['Inches'].to_f).abs + 0.5,(country1[i]['Days'].to_f + country2[i]['Days'].to_f).abs / 10].choose

    i += 1

  live_loop looping2 do
    sample :tabla_ghe2 , pitch: (country1[i]['Days'].to_f + country2[i]['Days'].to_f).abs / 10
    sample :perc_impact1, pitch: (country1[i]['Inches'].to_f + country2[i]['Inches'].to_f).abs / 2
    sleep (country1[i]['Inches'].to_f + country2[i]['Inches'].to_f).abs / 2

    if i >= months.length - 1
      i = 0
    i += 1


Share this