This is the second part of the article about the Arduino Pitch Detector. It describes the signal path starting with the instrument sound and ending with the sound produced by a MIDI synthesizer, possibly driven by auto-accompaniment software.
In the prototype, the signal passes from a music instrument and is played as MIDI events on an external synthesizer. Various hardware and software components make up the signal path. This page gives a brief description of each of these components.
- Musical instrument. Playing a clarinet, pan flute or piano.
- Microphone with automatic gain control.
-
The microcontroller is responsible for:
- Digitizing the analog signal (
microphone.cpp
). - Detecting the fundamental frequency and pitch of the signal (
pitch.cpp
). - Determining the beginning and duration of the notes. (
segment.cpp
,segmentbuf.cpp
) - Displaying the notes on a tremble staff or piano roll. (
pianoroll.cpp
,staff.cpp
) - Sending MIDI events to an attached synthesizer. (
midiout.cpp
).
- Digitizing the analog signal (
- An external synthesizer interprets the MIDI messages to create sound. The MIDI signal can also be sent to auto-accompaniment software (e.g. Band-in-a-Box) or Notation software (e.g. MidiEditor).
To test the MIDI functionality of the Arduino, it needs to be connected to a synthesizer. A synthesizer interprets MIDI messages to create sound. Synthesizers to range from all-in-one hardware synthesizers, to software synthesizers (Cool Virtual Midi, Nano, GarageBand).
A synthesizer interprets MIDI messages to create sound. There are many synthesizers to choose from:
- Hardware. I found an old SynthStation25 in our garage and use that with an old iTouch running the Nano app.
-
Microsoft Windows comes with a “Microsoft GS Wavetable Synth”. It has horrible latency and sounds bad.
- Alternatives are Cool Virtual Midi, SyFonOne, and SFZ+ with ASIO4All.
-
All require a virtual instrument file (SoundFount) such as FluidR3
- FluidR3 () compressed as sfArk.
- Timbres Of Heaven compressed as 7z.
- I ended up using, and iPad with Garage Band. The messages can be carried over USB (requires the Apple iPad Camera Connection Kit) or over possibly over the network (AppleMIDI). When using USB, connect the USB cable first, and then plug the adapter into the iPad. For the connector, refer to the corresponding section above.