# 220822 0032 Fast beat with samples from numbers - it dont have to be pretty (Improviz code)
# Visuals "220822 0032 Fast beat with samples from numbers - it dont have to be pretty Imporivz.pz"
# YT https://youtu.be/y7G3ZgufBnk
use_bpm 88# 88
live_loop :time, delay: 0.01 do
sleep 1
end
use_osc "localhost", 5510 # Setup OSC to Improviz port
r = 0.1
f = 0.5
live_loop :kick1, sync: :time do
64.times do
s = 25
sample s, cutoff: 80, amp: 3, release: r, finish: f if spread(3,7).tick()
osc "/vars/bd1", 1 if spread(3,7).look
sleep 0.125
osc "/vars/bd1", 0 # reset OSC
sleep 0.125
end
64.times do
s = 30
sample s, cutoff: 110, amp: 3, release: r, finish: f if spread(3,5).tick()
osc "/vars/bd2", 1 if spread(3,5).look
sleep 0.125
osc "/vars/bd2", 0 # reset OSC
sleep 0.125
end
end
live_loop :kick2, sync: :time do
#stop
s = ring(25, 28, 40, 44, 49, 50, 62, 68, 69, 72, 73, 76, 77).choose
sample s, cutoff: 130, amp: 3, release: r, finish: f, rate: 4, pan: rrand(0.5,-0.5) if spread(5,7).tick()
osc "/vars/bd3", 1 if spread(5,7).look
sleep 0.125
osc "/vars/bd3", 0 # reset OSC
sleep 0.125
end
live_loop :melody, sync: :time do
# stop
#2.times do
#64.times do
#sleep 0.25
#end
#end
use_synth :saw
64.times do
notes = chord(:c4, :minor, num_octaves: 3).take(ring(3,7,5).tick(:r)).mirror
play notes.tick(:n1), release: 0.25, cutoff: rrand(70,100)
#sleep 0.25
osc "/vars/tab1", notes.look
sleep 0.125
osc "/vars/tab1", 0 # reset OSC
sleep 0.125
end
64.times do
use_synth :dtri
notes = chord(:a3, :minor, num_octaves: 3).pick(3).mirror
play notes.tick(:n1), release: 0.25, cutoff: rrand(100,130)
#sleep 0.25
osc "/vars/tab2", notes.look
sleep 0.125
osc "/vars/tab2", 0 # reset OSC
sleep 0.125
end
use_synth :saw
64.times do
notes = chord(:c4, :minor, num_octaves: 3).mirror
play notes.tick(:n1), release: 0.25, cutoff: rrand(70,100)
#sleep 0.25
osc "/vars/tab3", notes.look
sleep 0.125
osc "/vars/tab3", 0 # reset OSC
sleep 0.125
end
64.times do
use_synth :dtri
notes = chord(:a3, :minor, num_octaves: 3).pick(5).mirror
play notes.tick(:n1), release: 0.25, cutoff: rrand(100,130)
#sleep 0.25
osc "/vars/tab4", notes.look
sleep 0.125
osc "/vars/tab4", 0 # reset OSC
sleep 0.125
end
end
live_loop :bass, sync: :time do
#stop
use_synth :saw
64.times do
notes = [:c2, :c2, nil, :c2, nil,:c4]
#notes = chord(:c2, :minor, num_octaves: 4).mirror
play notes.tick(:n2), release: 0.25,
cutoff: range(70,120,steps: 1).tick(:r),
pitch: knit(0,7*3, 12,7*1).tick(:k)
sleep 0.25
end
64.times do
notes = [:a2, :a2, nil, :a2, nil,:c4]
#notes = chord(:c2, :minor, num_octaves: 4).mirror
play notes.tick(:n2), release: 0.25,
cutoff: range(70,120,steps: 1).tick(:r),
pitch: knit(0,7*3, 12,7*1).tick(:k)
sleep 0.25
end
end
Improviz code
paintOver()
#motionBlur()
# 220822 0032 Fast beat with samples from numbers - it dont have to be pretty Imporivz.pz
# https://improviz.rumblesan.com/language.html
t = time/2
background(0)
strokeSize(2)
#noFill()
#stroke(255) # nice
scale(1) # 1 0.8 2
a=1
bd1 = ext(:bd1,a)
bd2 = ext(:bd2,a)
bd3 = ext(:bd3,a)
tab1 = ext(:tab1, 2)/100
tab2 = ext(:tab2, a)/100
tab3 = ext(:tab3, a)/100
tab4 = ext(:tab4, a)/100
#if (t%2)
b = 0.25 #thickness
rotate(0,0,t)
rectangle(tab1+2,0.001,0.001)
#move(1,1,0)
#fill(255,150,0)
#noFill()
rotate(0,0,t)
fill(0)
move(2,0,0)
#delete black
rectangle(4,0.025,0.0025)
#rectangle(4,0.025,0.025)
move(-2,0,0)
rotate(0,0,-t*0.25)
#rotate(t)
fill(255)
move(1,0,0)
rectangle(bd1+b,b,b)
move(1,0)
#rotate(-t)
fill(255,0,0)
rectangle(b+bd2,b,b)
#move(1,1)
#rotate(t)
move(1,0,0)
fill(0,0,255)
rectangle(bd3+b,b,b)
move(-0.5,0,0)
fill(255)
rectangle(tab2+0.1,0.1,0.1)
move(0.25,0,0)
fill(255)
rectangle(tab3+0.05,0.05,0.05)
move(0.7,0,0)
fill(255)
rectangle(tab4+0.025,0.025,0.025)