There are a few things one must take into consideration when building an animatronic karaoke-singing robot.
Perhaps the most important consideration is that of timing.
if your 'bot has sloppy animations, it'll look less lifelike and the illusion will be lost.
Since I was using a Digital Audio Workstation (DAW) to program speech, I thought I might as well use it to program animations as well. A separate, soundless MIDI channel was created for animation, and I was able to slide "hits" (captured as MIDI NOTE_ON messages) and "releases" (captured as MIDI NOTE_OFF messages) around in real time to create believable facial animations.
A few tips for anyone looking to create a MIDI controlled robot:
- Have separate servos to control? Consider writing code that listens to separate MIDI channels (you have 16 of them to work with)
- MIDI messages aren't just on and off - they can also carry pitch and velocity (the "pressure" or "strength" of a note). You might consider using these to vary, for example, how wide your robot's eyes and mouth open
- With the servo I used, it took about half of a second to rotate from the "mouth fully closed" to "mouth fully open" position. If note offs/ons were placed too rapidly in succession, the mouth wouldn't have time to fully open and close, and would just sort of shudder in place. This meant that slower paced vocals worked better, but more fast paced syllables would just have to be cut a little short