# SciArtSeptember2023_Sweet

# ChocoBurstAppleCrisp

For the 20th prompt of SciArtSeptember2023: "***Sweet***", We will be witnessing the **"ChocoBurst"** that happened a couple of centuries ago in Zenthian that contain traces of Apple Crisp

Coded with **Hydra & SonicPi**

The visuals are made through **Hydra** and the sound is made through numbers embedded in the colour of **Apple Crisp** as seen in the **SonicPi** Code

## Poetry

```ocaml
Chocolate Parades
Chocolate Serenades
Chocolate acting as planes
Chocolate reacting to the plains
In the rain
During their reign
As Chocolate to Be
To them is Chocolate to breathe
```

## Video

<iframe width="560" height="315" src="https://www.youtube.com/embed/wx2W0mrmY04?si=dMwxERqYD7cHV2JS"></iframe>

## Images

### ChocoChunks

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178302414/659c3c42-4522-4eef-bf50-795b7dd0e28e.jpeg align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178307614/d1b2aaee-2925-4309-9064-c6f4aff34bdb.jpeg align="center")

### ChocoSplits

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178317070/20c4a67b-87fa-4fc5-9d52-249e9ebf684f.jpeg align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178325866/51133909-f9c1-43d7-be84-9183e1f65d8b.jpeg align="center")

### ChocoDivisions

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178383874/5c8b31b9-fc6b-44c8-918a-af967c61caee.jpeg align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695178387763/92920fa9-fedc-4817-9ba3-85ca56655732.jpeg align="center")

## Code

### Hydra

```javascript
var img = document.createElement('img');

img.crossOrigin = "anonymous";
img.src = 'https://upload.wikimedia.org/wikipedia/commons/7/70/Chocolate_%28blue_background%29.jpg';

img.onload = function() {
  s0.init({ src: img, dynamic: false });
  src(s0)
    .rotate(5,3).scrollX(0, [0.11,1.2,4,2.6,-0.5,-1.5,-2.01]).scale(0.3).modulateRotate(src(s0).rotate(()=>time % 4)).modulateRotate(src(s0).scale([0.10,0.20,0.75,1].smooth()).rotate(90,()=> (time % 50)/100000).modulateRotate(osc(0.1,0.25,0).blend(s0).blend(s0).rotate(()=>time % 5).scale(0.5)))
    .out();
};
```

### SonicPi

```ruby
#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
AppleCrisp = Dip[5]

#Dip[foodname][column].to_f , need to.f as it is to float

with_fx :flanger do
  live_loop :AppleCrisp1 do
    use_bpm AppleCrisp["Red"].to_f
    sample :perc_swash, rate: dice(AppleCrisp["Yellow"].to_f/AppleCrisp["Key"].to_f)  if spread(AppleCrisp["Blue%"].to_f,AppleCrisp["Green%"].to_f).tick
    sample :ambi_lunar_land,rate: rrand(AppleCrisp["y2"].to_f,AppleCrisp["Red"].to_f/AppleCrisp["Blue"].to_f)  if spread(AppleCrisp["H-Lab1"].to_f,AppleCrisp["CIE-L"].to_f).reverse.mirror
    sleep [AppleCrisp["x2"].to_f,AppleCrisp["Yellow"].to_f/AppleCrisp["Mangeta"].to_f,AppleCrisp["Saturation2"].to_f/AppleCrisp["Lightness"].to_f].choose
  end
end

with_fx :ixi_techno do
  live_loop :AppleCrisp2 do
    use_bpm AppleCrisp["Blue"].to_f
    with_fx :reverb do
      sample :ambi_choir, rate: rrand(AppleCrisp["y2"].to_f,AppleCrisp["Red"].to_f/AppleCrisp["Blue"].to_f) if spread(AppleCrisp["H-Lab1"].to_f,AppleCrisp["CIE-L"].to_f).reverse.mirror
      sleep [AppleCrisp["x2"].to_f,AppleCrisp["Green%"].to_f/AppleCrisp["Blue%"].to_f].choose
    end
  end
end

with_fx :whammy do
  live_loop :AppleCrisp3 do
    use_bpm AppleCrisp["Green"].to_f
    sample :perc_swash, rate: dice(AppleCrisp["Yellow"].to_f/AppleCrisp["Key"].to_f)  if spread(AppleCrisp["Blue%"].to_f,AppleCrisp["Green%"].to_f).tick
    sample :ambi_lunar_land,rate: rrand(AppleCrisp["y2"].to_f,AppleCrisp["Red"].to_f/AppleCrisp["Blue"].to_f)  if spread(AppleCrisp["H-Lab1"].to_f,AppleCrisp["CIE-L"].to_f).reverse.mirror
    sleep [AppleCrisp["x2"].to_f,AppleCrisp["Yellow"].to_f/AppleCrisp["Mangeta"].to_f,AppleCrisp["Saturation2"].to_f/AppleCrisp["Lightness"].to_f].choose
  end
end

with_fx :ixi_techno do
  live_loop :AppleCrisp4 do
    use_bpm AppleCrisp["Red"].to_f
    with_fx :reverb do
      sample :ambi_choir, rate: rrand(AppleCrisp["y2"].to_f,AppleCrisp["Red"].to_f/AppleCrisp["Blue"].to_f) if spread(AppleCrisp["H-Lab1"].to_f,AppleCrisp["CIE-L"].to_f).reverse.mirror
      sleep [AppleCrisp["x2"].to_f,AppleCrisp["Green%"].to_f/AppleCrisp["Blue%"].to_f].choose
    end
  end
end
```
