Table of contents
For the fifth Decibels Challenge, the dataset provided was by Loud Numbers :https://github.com/loudnumbers/environmental_data
For this challenge, I wanted the sounds to represent the increase in CFCS gases as well as the accumulation of CO2 that is being seen annually. I decided to add an insect sample to the mix of sounds as a representation of the natural realm that is being affected by these changes.
Sounds
Data
Column usage in Code
year
- Used as the counter between iterations
co2annual
Divided by 3.3, so the max note is 127
Represented by the Chiplead synth
use_synth :chiplead play Environmental[i]["co2annual"].to_f/ 3
tempannual
using the data within this column to affect the rate of the following sounds (Guitar & Insects)
Acts as the background sound, heard throughout
sample :guit_e_fifths, rate: Environmental[i]["tempannual"].to_f # rate affected by tempannual sample "C:/SonicPi/SoundStreams/Samples/Samplings/Samplings/James/insect-19.wav", rate: Environmental[i]["tempannual"].to_f # rate affected by tempannual
sunspots
Kept the range between 0 to 127 through the division of 2
Represented by the Piano Synth
use_synth :piano play Environmental[i]["sunspots"].to_f/2 #range till 127
oilspills
- Represented by a distorted Piano Synth
with_fx :distortion do use_synth :piano play Environmental[i]["oilspills"].to_f/ 3, sustain: 2 end
cfcs
With the numbers increasing but still falling in a range of 0.965 to 3.287, It was the perfect column to have as the sleep between each iteration.
sleep Environmental[i]["cfcs"].to_f
Table
year | co2annual | tempannual | sunspots | oilspills | cfcs |
1959 | 315.98 | 0.07 | 225.1 | 0 | 0.965 |
1960 | 316.91 | 0.03 | 159 | 0 | 0.984 |
1961 | 317.64 | 0.07 | 76.4 | 0 | 1.004 |
1962 | 318.45 | 0.05 | 53.4 | 0 | 1.026 |
1963 | 318.99 | 0.08 | 39.9 | 0 | 1.05 |
1964 | 319.62 | -0.15 | 15 | 0 | 1.075 |
1965 | 320.04 | -0.06 | 22 | 0 | 1.103 |
1966 | 321.37 | -0.02 | 66.8 | 0 | 1.133 |
1967 | 322.18 | 0.01 | 132.9 | 0 | 1.166 |
1968 | 323.05 | -0.06 | 150 | 0 | 1.201 |
1969 | 324.62 | 0.09 | 149.4 | 0 | 1.241 |
1970 | 325.68 | 0.05 | 148 | 36 | 1.284 |
1971 | 326.32 | -0.05 | 94.4 | 32 | 1.331 |
1972 | 327.46 | 0.03 | 97.6 | 75 | 1.384 |
1973 | 329.68 | 0.2 | 54.1 | 59 | 1.441 |
1974 | 330.19 | -0.05 | 49.2 | 117 | 1.505 |
1975 | 331.13 | 0.01 | 22.5 | 116 | 1.575 |
1976 | 332.03 | -0.03 | 18.4 | 93 | 1.652 |
1977 | 333.84 | 0.21 | 39.3 | 86 | 1.735 |
1978 | 335.41 | 0.11 | 131 | 82 | 1.825 |
1979 | 336.84 | 0.22 | 220.1 | 92 | 1.919 |
1980 | 338.76 | 0.29 | 218.9 | 65 | 2.019 |
1981 | 340.12 | 0.35 | 198.9 | 61 | 2.123 |
1982 | 341.48 | 0.19 | 162.4 | 50 | 2.229 |
1983 | 343.15 | 0.35 | 91 | 65 | 2.336 |
1984 | 344.87 | 0.2 | 60.5 | 34 | 2.444 |
1985 | 346.35 | 0.17 | 20.6 | 41 | 2.549 |
1986 | 347.61 | 0.22 | 14.8 | 34 | 2.652 |
1987 | 349.31 | 0.34 | 33.9 | 38 | 2.753 |
1988 | 351.69 | 0.42 | 123 | 21 | 2.854 |
1989 | 353.2 | 0.31 | 211.1 | 45 | 2.957 |
1990 | 354.45 | 0.45 | 191.8 | 64 | 3.065 |
1991 | 355.7 | 0.42 | 203.3 | 37 | 3.177 |
1992 | 356.54 | 0.23 | 133 | 41 | 3.291 |
1993 | 357.21 | 0.27 | 76.1 | 42 | 3.4 |
1994 | 358.96 | 0.32 | 44.9 | 35 | 3.501 |
1995 | 360.97 | 0.48 | 25.1 | 53 | 3.588 |
1996 | 362.74 | 0.36 | 11.6 | 23 | 3.658 |
1997 | 363.88 | 0.5 | 28.9 | 38 | 3.711 |
1998 | 366.84 | 0.63 | 88.3 | 30 | 3.748 |
1999 | 368.54 | 0.42 | 136.3 | 25 | 3.773 |
2000 | 369.71 | 0.43 | 173.9 | 25 | 3.785 |
2001 | 371.32 | 0.55 | 170.4 | 21 | 3.787 |
2002 | 373.45 | 0.62 | 163.6 | 14 | 3.781 |
2003 | 375.98 | 0.63 | 99.3 | 23 | 3.768 |
2004 | 377.7 | 0.55 | 65.3 | 25 | 3.749 |
2005 | 379.98 | 0.7 | 45.8 | 25 | 3.727 |
2006 | 382.09 | 0.66 | 24.7 | 16 | 3.703 |
2007 | 384.02 | 0.66 | 12.6 | 15 | 3.677 |
2008 | 385.83 | 0.55 | 4.2 | 8 | 3.65 |
2009 | 387.64 | 0.66 | 4.8 | 9 | 3.623 |
2010 | 390.1 | 0.73 | 24.9 | 9 | 3.596 |
2011 | 391.85 | 0.63 | 80.8 | 5 | 3.569 |
2012 | 394.06 | 0.66 | 84.5 | 7 | 3.543 |
2013 | 396.74 | 0.68 | 94 | 38 | 3.517 |
2014 | 398.81 | 0.77 | 113.3 | 5 | 3.492 |
2015 | 401.01 | 0.92 | 69.8 | 8 | 3.466 |
2016 | 404.41 | 1.03 | 39.8 | 5 | 3.44 |
2017 | 406.76 | 0.95 | 21.7 | 6 | 3.415 |
2018 | 408.72 | 0.86 | 7 | 7 | 3.389 |
2019 | 411.66 | 0.98 | 3.6 | 3 | 3.364 |
2020 | 414.24 | 1.01 | 8.8 | 4 | 3.338 |
2021 | 416.45 | 0.86 | 29.6 | 6 | 3.312 |
2022 | 418.56 | 0.91 | 83 | 7 | 3.287 |
SonicPi Code
require 'csv'
Environmental = CSV.parse(File.read("C:/Creatuve Code Challenges/Sonification Challenges/May 2023/annual Tweaked- annual.csv"),headers: true)
#check if order is alright
#ranges from 1959 to 2022
puts Environmental[63][0] #2022
puts Environmental[0][0] #1959
puts Environmental[30][0] #1989
i = 0
live_loop :sunspots_tempannual do
use_bpm 120
puts Environmental[i]["year"].to_i
with_fx :echo, mix: 0.65 do
use_synth :piano
play Environmental[i]["sunspots"].to_f/2 #range till 127
end
with_fx :ping_pong do
with_fx :ixi_techno, mix: rrand(0.1,0.3) do
sample :guit_e_fifths, rate: Environmental[i]["tempannual"].to_f # rate affected by tempannual
sample "C:/SonicPi/SoundStreams/Samples/Samplings/Samplings/James/insect-19.wav", rate: Environmental[i]["tempannual"].to_f # rate affected by tempannual
end
end
sleep Environmental[i]["cfcs"].to_f
if i >= 63
i = 0
end
i += 1
end
live_loop :c02annual do
use_bpm 120
puts Environmental[i]["year"].to_i
with_fx :echo, mix: 0.65 do
use_synth :chiplead
play Environmental[i]["co2annual"].to_f/ 3.3 #range till 127
end
with_fx :distortion do
use_synth :piano
play Environmental[i]["oilspills"].to_f/ 3, sustain: 2
end
sleep Environmental[i]["cfcs"].to_f
if i >= 63
i = 0
end
i += 1
end