# MinaCoding2023_Time

# TripleDonutingInTime

Today's MinaCoding Prompt is **TIme.** I will be coding with extra focus on the ***time*** variable in **LiveCodeLab** to produce the audiovisuals for ***Triple Donuting In Time.***

This sketch takes place in a universe where three donuts are travelling together and are affected by the elements of time around them.

Oil Paint filter added

## Video

<iframe width="560" height="315" src="https://www.youtube.com/embed/nVBSm6dTkIQ"></iframe>

## Poem

```ocaml
Travelling
To see what the universe decides
Decides what needs unravelling
Unravelling as if it is second nature to this ride
This ride that finds it ways behind
But also ahead
As the miles grows to the words that are said
```

## **LiveCodeLab Code**

```javascript
turns = floor(time / 10) % 6
detail = 100
speed = 3 * sin(time % 10 + 1)



if time % 50 < 25
	ambientLight 255, 255, 255
	simpleGradient color(10 + (time % 6) * 40, (time % 20) * 12,(time * 3) % 90),blue, red
	fill blue
	animationStyle paintOver
else
	simpleGradient black,color(30 + (time % 4) * 40, (time % 12 + 1) * 18,255 - (time % 100)),yellow
	ambientLight 122,122,122
	fill green


scale (time % 8 + 1) / 35


rotate time / 5

detail times with i
	rotate 0, 0, (2 * pi) / detail
	move 2, 0, 0
		rotate (turns * i * pi) / detail + (time * speed), 0, 0
		ball (time % 6)

detail times with i
	rotate 0, 0, (2 * pi) / detail
	move 2, sin(time % 9), time % 3
		rotate (turns * i * pi) / detail + (time * speed), 0, 0
		if time % 15 > 7
			fill orange
		else
			fill red
		ball (time % 6)

detail times with i
	rotate cos(time % 7), 0, (2 * pi) / detail
	move 2, sin(time % 9), time % 3
		fill white
		rotate (turns * i * pi) / detail + (time * speed), 0, 0
		ball (time % 6)

bpm 60
play "cosmos"  ,'--x- -x-x --x- -x-xx'
play "hiss" + int(random 3) ,'x'
play "hoover" + int(random 4) ,'x-ox'

if time % 45 > 30
	bpm 80
	play 'tranceKick'  ,'-x-x --xxxx -x x-x- x-xx'
	play "alienBeep" + int(random 16) ,'x-x'
	play "glass" + int(random 9) ,'x-ox--x'
else if time % 45 < 30 && time % 30 > 15
	bpm 40
	play "growl" + int(random 6) ,'x--x----xx-x'
	play "highHatClosed"  ,'--x- ---x- --x- ---x-'
	play "highHatOpen"  ,'--x- --x-- --x- ----xx'
	play "pianoLDChord" + int(random 4) ,'x---x--xx--x'
	play "pianoLHChord" + int(random 4) ,'x--x---xx'
else
	bpm 20
	play 'tranceKick'  ,'-x-x ---x x-x- x-xx'
	play "alienBeep" + int(random 16) ,'x-x'
	play "glass" + int(random 9) ,'x-ox--x'
	play "cosmos"  ,'--x- -x-x --x- -x-xx'
	play "hiss" + int(random 3) ,'x'
	play "hoover" + int(random 4) ,'x-ox'
```
