Sound Examples

A collection of Sound, MIDI, and I2S examples for Arduino

  MIDI Serial
  MIDI to the VS1053 module
  MIDI Controllers
VS1053 MP3 playback

This project is maintained by tigoe

Sound & Music Examples for Arduino

A collection of sound examples for Arduino. There are simple tone examples, MIDI examples, and examples for sound playback components.

These examples were written using the MKR Zero and other MKR boards, though many of the of them will work on other boards as well. Most of them, except for the I2S examples, will work on the Nano 33 IoT, for example. Each example notes any restrictions on which boards are required.

The projects here are divided up as follows:

  1. Setup - setting up the software and hardware for these examples.
  2. Introduction - The basics of making sound
  3. Tone - Making Tones and Making Music
  4. Melody - one approach to scoring a melody using Arduino.
  5. MIDI - an introduction to MIDI, the Musical Instrument Digital Interface protocol
  6. The VS1053 Audio Codec and MIDI Synthesizer - a nifty component that can both decode and play MP3 files, and also act as a general MIDI synthesizer
  7. I2S, the Inter-IC Sound Protocol - the I2S protocol for playing digital sound files

The parts used are listed on the inventory page.