Video and dancing
with eilik.connect() as robot: robot.play("clip.mp4") # picture and sound robot.play("clip.mp4", dance="simple") # and the robot moves to it robot.play("clip.mp4", dance="guitar")play blocks until the clip ends or you press Ctrl-C, and holds 30 fps.
Decoding needs ffmpeg on PATH — brew install ffmpeg. A clip you already
prepared plays without it.
The two styles
Section titled “The two styles”simple asks nothing of the music but loudness. Each arm runs its own
oscillator at a period the other’s cannot divide, so they never settle into
mirroring each other. It works on anything.
guitar gives the arms different jobs, the way two hands have them: one strums
the beat, the other shifts on bar lines and holds between them. It needs music
with an audible pulse and looks aimless without one, so pick it yourself rather
than expecting the library to guess.
Sound comes out of your computer. The robot has a speaker, but no command exists to send audio to it — not in this protocol, and not in the manufacturer’s own software either.
Preparing a clip once
Section titled “Preparing a clip once”clip = eilik.load("clip.mp4", dance="simple")with eilik.connect() as robot: robot.play(clip)Conversion options belong to load. Passing them alongside a prepared clip
raises TypeError rather than being ignored, because a setting that silently
does nothing is how an afternoon disappears.