Micro:Bit Gets Pseudo-Polyphonic Sound With Neat Hack

The Micro:bit is a fun microcontroller development platform, designed specifically for educational use. Out of the box, it’s got a pretty basic sound output feature that can play a single note at a time. However, if you’re willing to get a bit tricky, you can do some pseudo-polyphonic stuff as [microbit-noob] explains.

The trick to polyphony in a monophonic world? Rapidly alternating between the different notes you want to be playing at the same time. Do this fast enough and it feels like they’re playing together rather than seperately. [microbit-noob] demonstrates how to implement this with a simple function coded for the Micro:bit. Otherwise, it uses the completely stock sound hardware. However, the IR receiver is added to the device in order to allow a simple remote control to be used to command the notes desired, along with some extra tactile buttons to add further control.

Is it chiptune? Well, it’s a chip, playing a tune, so yes. Even if it is through a tiny speaker stuck to the PCB. In any case, if you’re trying to get some better bleeps and bloops out of the Micro:bit, this is a great place to start. If you’ve got other hacks for Britain’s educational little board, let us know on the tipsline!

4 thoughts on “Micro:Bit Gets Pseudo-Polyphonic Sound With Neat Hack

    1. That term is even used in the article.

      Another equally-viable term would be TDM: TIme-Division Multiplexing. Depends, really, on how fast the microcontroller is cycling between each note.

      Some microcontrollers, like the SunPlus SPG2xx series, have an audio output rate which is a multiple of the number of audio channels, and the hardware emits the current sample for each channel in a round-robin fashion. You need a low-pass filter to file off some of the higher harmonics that this technique introduces, but it works surprisingly well, producing near SNES-quality audio (and, for that matter, video) on a SoC with only 3 kilobytes of RAM. There’s a good reason why the SPG series has been used in all manner of individual TV-pluggable games, and a variety of other cheap handhelds, to boot.

Leave a Reply to InfastylesCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.