s0.initVideo("/home/pln/Videos/HARDKORRIGANS/Dancers/C'mon and Swim - Bobby Freeman (480p_30fps_H264-128kbit_AAC).mp4")
s2.initVideo("/home/pln/Videos/HARDKORRIGANS/Dancers/Best 60s Dancer Boy Ever - The Nitty Gritty (480p_30fps_H264-128kbit_AAC).mp4")

s1.initVideo("/home/pln/Videos/HARDKORRIGANS/Dancers/Keep on Dancing - The Gentrys (480p_30fps_H264-128kbit_AAC).mp4")
s2.initVideo("/home/pln/Videos/HARDKORRIGANS/animation_WTF_trip_bonnenuitlespetits.mp4")

s0.src.playbackRate = 1.4
s0.src.currentTime = 10
s0.src.loop = true

s2.src.playbackRate = 0
s2.src.currentTime = 0
s2.src.loop = true

a.setSmooth(0)
a.show()
a.setScale(14)

src(s0)
.scale(() => 1 + 0.5 * a.fft[0])
.saturate(() => 0.1 + 2 * a.fft[2] + 0.5 * a.fft[3])
.out(o0)

src(o0)
  .modulate(src(s0).scale(() => 1.09 + a.fft[0]))
  .diff(src(s1).scale(() => 0.2 + 0.5 * a.fft[3])
    .kaleid(() => 2.4 + 4 * a.fft[2])
  )
  .colorama(() => 0.4 * a.fft[2])
  // .rotate(() => (time * (a.fft[0]) % 360))
  .out(o1)

src(s1)
  // .modulateRotate(src(s1).scale(0.8))
  // .add(src(s2).scale(2))
  .out(o2)

src(s2)
  // .colorama(() => 0.5 * a.fft[2])
  // .diff(src(o0).mask(shape(4).scale(() => 1.2 + 0.5 * a.fft[1] + 0.82 * a.fft[3])))
  .out(o3)

render(o1)
