Code&Groceries
Today's MinaCoding Prompt is Unusual Places to Code. I decided to remix some old Hydra Code while going grocery shopping to utilize the i**nitCam function rather than the initScreen function.
To use Hydra while shopping, I used two cameras from my cellphone to film the footage while using the code as a real-time filter. Then, I tripled up the footage as you see on the screen.
For the sounds, I used a previous SonicPi sonification of my heart rates while working out what I compose for a Decibels Challenge
Video
Poem
There are many options at this grocery,
What shall I take? What shall I eat?
Which flavours shall make my tasting complete?
What would make the the mind at ease
And for my taste buds, that makes my taste buds pleased?
Code
SonicPi
require 'csv'
#naming the Dataset DipInCode and going to read the file
Heart = CSV.parse(File.read("C:/Creatuve Code Challenges/Sonification Challenges/March 2023/HeartRatePrep.csv"), headers: true)
i = 0
live_loop :HeartZone do
with_fx :echo, mix: Heart[i]['Other Zones'].to_f do
with_fx :ixi_techno, mix: Heart[i]['Zone3'].to_f do
with_fx :krush, mix: Heart[i]['Zone2+3'].to_f do
use_synth [:organ_tonewheel,:mod_sine,:mod_sine].choose
play Heart[i]['HR_MIN'].to_f, decay: Heart[i]['Other Zones'].to_f, amp: dice(12)
#We can even pass a list of times which it will treat as a circle of times:
play_pattern_timed chord(Heart[i]['HR_MIN'].to_f, :m13), [Heart[i]['Zone2+3'].to_f, Heart[i]['Other Zones'].to_f ,Heart[i]['HR_MAX'].to_f/ Heart[i]['HR_MIN'].to_f]
end
end
end
i += 1
if i == Heart.length #make the loop nonstop
i = 0
end
sleep Math.sin(Heart[i]['HR_MAX'].to_f/ Heart[i]['HR_MIN'].to_f)
end
live_loop :HeartBeat do
with_fx :flanger, depth: Heart[i]['Other Zones'].to_f do
with_fx :echo, mix: Heart[i]['Zone2+3'].to_f do
with_fx [:ping_pong,:vowel,:whammy].choose, mix: Heart[i]['Other Zones'].to_f do
sample :ambi_piano,beat_stretch: Heart[i]['Zone2'].to_f ,pitch: Heart[i]['CaloLoad'].to_f
sample :perc_impact1,beat_stretch: Math.cos(Heart[i]['Other Zones'].to_f), decay: Heart[i]['CaloLoad'].to_f
end
end
end
i += 1
if i == Heart.length #make the loop nonstop
i = 0
end
sleep Heart[i]['HR_MAX'].to_f/ Heart[i]['HR_MIN'].to_f
end
Hydra
s0.initCam()
s1.initCam(2)
src(s0).modulateRotate(src(s1).repeat(3).kaleid([3,2,1,2,3])).mult(src(s0).diff(osc(20.273, 0.001, 0.541)).rotate(1.036)).pixelate([200,400],[400,800,1600,1000]).blend(s1, 0.799).scrollX(0.1,0.1).modulateScale(src(s0).scale(3, () => 1.05 + 0.1 * Math.sin(0.088 * time))).out(o0);
frame = 30
speed = 0.5