Code&GroceriesRemake
For Today's MinaCoding Prompt of "Recreating a View", I decided to remake the view of my previously coded piece "Code&Groceries" for the "Unusual Place" Prompt, by placing the original view into crystal shapes by a video editor and then overlaying it via some Hydra and SonicPi (The SonicPi Code is a remake of a previously composed piece that the sounds were composed via the RGB and XYZ of various red shades)
Below is the Description of the piece that was remade:
"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&GroceriesRemake Code
Code
Hydra
osc(4,1,1).color(0,[1,0.75,0.5,0.25],[0.5,0.75,0.35,0.15,1]).kaleid(4)
.scrollX([0.5,-0.5]).scrollY([0.4,0.3,-0.2,-0.1,0.1])
.scale(()=> (time % 22+ 1)/12).rotate(()=> time % 20 + 1).out()
speed = 0.33
SonicPi
#Color +Shadows
#RGB Values + XYZ
#Shadeofred [R,G,B, X, Y, Z]
# Crimson : 157,34,53
# Darkred : 139, 0, 0
# Firebrick : 178,34,34
#shadow length equation is Length = height / tan(angle)
#Creating Arrays
Crimson = [157,34,53,30.5810,16.0422,5.7596]
DarkRed = [139,0,0,10.6475,5.4890,0.4983]
FireBrick = [178,34,34, 19.2209,10.7245,2.5704]
with_fx :ixi_techno do
live_loop :reds do
i = 0
use_synth :pretty_bell
play (Crimson[i] + DarkRed[i])/5 ,release: 3
play Crimson[i] ,release: 3
with_fx :ping_pong, mix: rrand(0.3,0.75) do
use_synth :chiplead
play (FireBrick[i] + DarkRed[i])/5 ,release: 3, decay: dice(4)
end
sleep [0.5,1,2].choose
if i < 7
i+= 1
end
end
end
live_loop :redshuffle do
CrimsonShuffle = Crimson.shuffle()
DarkRedShuffle = DarkRed.shuffle()
FireBrickShuffle = FireBrick.shuffle()
i = 0
use_synth :pretty_bell
play (CrimsonShuffle[i] + DarkRedShuffle[i])/4 ,release: 3
play CrimsonShuffle[i] ,release: 3
with_fx :ping_pong, mix: rrand(0.3,0.75) do
use_synth :piano
play (FireBrickShuffle[i] + DarkRedShuffle[i])/5 ,release: 3, decay: dice(4)
end
sleep [0.5,1,2].choose
if i < 7
i+= 1
end
end
#shadow length component
with_fx :ixi_techno do
live_loop :redsshadow do
i = 0
use_synth :piano
play (Crimson[i]/Math.tan(70)).abs + (DarkRed[i]/Math.tan(70)).abs - 20,release: 3, sustain: 8
sleep [0.25,0.5,1,2,4].choose
if i < 7
i+= 1
end
end
end
Code&Groceries Original Code
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