Multichannel music generation for Arduino

[Drew] wrote a library for playing multichannel music on an Arduino. The project connects multiple piezo buzzers to the popular prototyping platform and handles the dirty work involved in modulating multiple buzzers at the same time. The video above starts with an explanation for the first three minutes but if you’re impatient you can jump directly to the music demonstration. The results are magnificent. We’re going to check out the code and see what we can make happen just as soon as we can round-up multiple piezos.

Comments

  1. osgeld says:

    sounds great (tho you could run the outputs tru some resistors and mix them onto 1 speaker)

  2. landon says:

    that sounds pretty sweet. :)

  3. janin says:

    The multiple speakers give an interesting stereophonic effect.

    It’s a shame it’s restricted to square waves though. I know for sure that at least 5 PCM channels at 16kHz are achievable on an ATMega168. Probably more with better C skills than mine.

    I took a look at the code, it’s nice object-oriented code and all, but a bit heavy on RAM (each note needs to be queued before it can be played). This can easily be improved.

    With a little more work this could become an awesome polyphonic synthesizer.

  4. Skitchin says:

    Code looks clean but no way would I want to program each note like that. I’ve not programmed around sound before so I’m not sure if this is a pretty typical approach, or if it’s just because it’s in prototyping stages. Doesn’t seem like it’d be too far off from interpreting more common chip tunes, very neat!

  5. ard says:

    Why does his voice change into a robot occasionally?

  6. Acedio says:

    If you think this is cool, you should really check out Linus Akesson’s hardware chiptune project (http://www.linusakesson.net/hardware/chiptune.php). It’s much more customizable (4 channels that can make use of several basic waveforms), has it’s own tracker that is fairly straight forward to use, and even has blinking lights to emphasize the bass ;) All on an Atmega8 as well, I think.

  7. M4CGYV3R says:

    Could be cool, except it’s an Arduino clone and it requires a piezo for each polyphonic voice. It could get real cluttered real fast if you wanted to create a basic multichannel playback system.

    What’s the song? It’s somehow very familiar.

    (Also, the guy in the vid looks like a strung-out MaCaulay Culkin)

  8. Doug says:

    skip to around 3:05 on the video,

    thank me later :P

  9. Fallen says:

    I don’t think it really needs one piezo per channel. I’m pretty sure you could sum everything up with resistors and an OP-Amp. And then potentially drive some full range speakers. Piezos are nice, but I like being able to play below 500Hz lol. But yeah, really cool project.

  10. phishinphree says:

    nice work. next time show us your project, not your face.

  11. Phlip says:

    Thanks Doug :D

  12. .m. says:

    It reminded me more than 20 years old 8-bit Sinclair ZX Spectrum – check out for an inspiration: 1bit(1 piezo) multi channel music

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,027 other followers