Searching YouTube for videos of low battery toys and keyboards brings up results like "Demon Possessed Singing Trout." Please watch the video before proceeding.
I have a limited understanding of electronics, but a compulsory need to explain this phenomenon due to tech blogger ego syndrome. A low battery has an abnormally high internal resistance, causing its voltage to sag in response to the loads it's supporting. If it's powering multiple things, they will interact in strange ways. The distorted audio from the singing fish sounds like the clock rate is dropping in reaction to the load of the speaker. (The servo motors might also be causing voltage sag, although it isn't entirely clear from the video.)
The speaker/clock interaction is interesting since it works in a feedback loop: the clock controls the playback rate, and the amplitude of the output audio draws current that affects the clock. This inspires a general method for turning an audio algorithm into a "low battery" version:
- Run a DSP algorithm such as sample playback, synthesizer, effect, etc. that can be operated at a variable clock rate.
- Apply filters like a full-wave rectifier, envelope follower, or simple lowpass to simulate speaker load. Optional.
- Apply a highpass filter to block dc. (This helps prevent the algorithm from getting stuck.)
- Use this signal to control the clock rate of the DSP algorithm, so that a signal of higher amplitude lowers the clock rate.
The casual experiments I've done with this are promising. At subtle settings, this creates wandering, droopy pitch bends. Pushed to the extreme, it produces squelchy signal-dependent distortion. I especially like its effect on percussive signals, where louder transients are stretched out and any rhythmic pulse becomes irregular. I'm imagining software plugins that emulate digital hardware could be augmented with a "battery" knob that lets the user control how much the clock rate sags in response to the output signal.