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:
- Setup - setting up the software and hardware for these examples.
- Introduction - The basics of making sound
- Tone - Making Tones and Making Music
- Melody - one approach to scoring a melody using Arduino.
- MIDI - an introduction to MIDI, the Musical Instrument Digital Interface protocol
- 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
- I2S, the Inter-IC Sound Protocol - the I2S protocol for playing digital sound files
The parts used are listed on the inventory page.