Project tutorial

Arduino MIDI Arpeggiator © GPL3+

The device that creates beautiful arpeggiated sequences according to the musical theory.

  • 11,456 views
  • 36 comments
  • 67 respects

Components and supplies

About this project

Introduction

Electronic music is my hobby and I have a lot of fun playing with my Korg Volca Keys. Some time ago I’ve met the web application called “Chord Progression Arpeggiator,” and I was impressed by the power and simplicity of the musical algorithms. Spend a couple of minutes on the app, and you would understand why I was so inspired by the idea of generating arpeggios on my Korg. The video “Korg Volca Keys beautiful arps! (and 128-note sequence)” shows manually entered arpeggio notes, but it is too complicated and inflexible to input all the notes by hands.

As I’m an software developer, I decided to create the Arduino-based device, that generates arpeggios in the form of MIDI messages and sends the messages through DIN (MIDI) port. The arpeggiator can be used together with another hardware or software synthesizers of course, but I don't have another one.

Basic music theory

(The text below is taken from reddit, many thanks to user kmmeerts)

So there's a whole spectrum of noises. It turns out every one of those noises has a fundamental frequency, how fast the air wiggles. A lower frequency sounds, well, lower, and a higher frequency we discern as a higher tone. Two different instrument playing at the same might sound very different, but they will still appear to us as the same note. This difference is called timbre, and it's how you can differentiate between flute and cellos playing the same note. This allows very different instruments to play harmoniously together.

At the highest level, this spectrum is divided into octaves. An octave is an interval between a note and another at double the frequency. This is the most basic subdivision in music. Notes that differ a number of octaves (i.e. where the frequencies are related to each other by a power of two) get the same name: a piano and a violin might both play a C, but one a lot lower than the other. Why do we do this? Well because they sound harmoniously together, as even the most tone-deaf person can hear.

The octave itself is subdivided in 12 notes, which we've named:

[A, A#, B, C, C#, D, D#, E, F, F#, G, G#]

These are the most basic notes in western music, and they correspond to the white and black keys on the piano. You can see that after every 12 keys, the pattern repeats. Why 12? It's complicated and has a long history, but the gist is that it sounds the best. The most pleasing intervals are well represented by the 12 key system, in a way they wouldn't with more or less keys (although people do try).

From these 12 notes scales are formed. A scale is a collection of notes that, well..., sound good together. My arpeggiator only has heptatonic diatonic scales, called modes. Heptatonic means each scale has 7 notes, and practically all western music is built on this. Diatonic is related to the order of the intervals between notes. For example, the C major scale is just the notes without sharp signs starting at C: [ C D E F G A B ]. Each scale is begat from a root note. There's also a major scale rooted in D: [ D E F# G A B C# ]. The scales are defined by patterns of which notes to skip. The major scale is [ W W H W W W H ], where W means "take a note and skip one" and H means "take a note". The other modes have other patterns of taking and skipping notes.

For each of those seven notes there's a bunch of chords. The chords used here are simple: starting from a note, take three notes, each time skipping one in the scale we're using. So in our simple C major scale (CDEFGAB), the V chord (V = five, so on the fifth note) would be G (skip A) B (loop around, skip C) D, so GBD. This pattern can be repeated, going up an octave (6 notes: GBDGBD). An arpeggio (Italian for 'broken') is simply playing those notes one for one, instead of all together.

What defines a song is mostly the chord progression. The composer picks a mode, picks a root note, and then chooses 8 (or more or less) chords from the key defined by that root note. There are some rules for what chords to pick of course, but it's still an art. In a real song, on this chord the rest is built, there can be all kinds of deviations from this structure of course, all sorts of ornamentations, but often you'll still be able to recognize the chords in that order.

Schematics

The schematics of my arpeggiator is quite simple, it consists from 7 potentiometers, 7 buttons, MIDI port, 2 LEDs and 4 resistors. It can be easily assembled on a breadboard as shown below, but if you are newbie in the arduino world it would be much better if you start with first the following tutorials:

https://www.arduino.cc/en/main/howto

https://www.arduino.cc/en/Tutorial/Blink

https://www.arduino.cc/en/Tutorial/InputPullupSerial

https://www.arduino.cc/en/tutorial/potentiometer

https://www.arduino.cc/en/Tutorial/Midi

Controls

Potentiometers:

  • Octave of the tonic note (0..7)
  • Octave of the chord (0..7)
  • Delay between the notes in the progression (beats per minute)
  • Tonic / root note (C...B)
  • Arpeggio Steps (1...5)
  • Music mode (Ionian, dorian...)
  • Arpeggio style (Rising, descending, rising+descending, random)

Buttons: by pressing a button the corresponding chord progression is played.

Demonstration

In the first video I describe the functionality of the device and it's controls:

The second video shows the small jam with the arpeggiator:

Synchronization

You can synchronize the tempo of the arpeggios with Korg Volca: connect the audio jack of the arpeggiator to the "SYNC OUT" of the synthesizer. Be sure to configure the source code in the right way in arpeggiator.ino:

// Synchronization: choose one of two possible options:

#define EXT_SYNC

//#define INT_SYNC

Uncomment EXT_SYNC for synchronization through SYNC IN, or INT_SYNC for tempo control through poti.

I will be glad for every feedback and comment, if you have an idea how to improve the device - please leave the comment.

Have fun and good luck!

Code

Schematics

Schematics
for Fritzing
arpeggiator_LICtzK2a2Q.fzz

Comments

Similar projects you might like

Cthulhinho: A MIDI Controller

Project showcase by primvla

  • 2,152 views
  • 2 comments
  • 14 respects

Minimal MIDI Drum Kit with 3D Printer

Project tutorial by ryokosaka

  • 9,487 views
  • 1 comment
  • 28 respects

Arduino MIDI Fighter

Project tutorial by Liz - Blitz City DIY

  • 4,258 views
  • 1 comment
  • 13 respects

XY MIDI Pad With Arduino and TFT

Project tutorial by Silvius

  • 1,069 views
  • 0 comments
  • 6 respects

Massive MIDI Controller for Full Bucket FB3100 Synthesizer

Project showcase by kboutorabi

  • 5,396 views
  • 1 comment
  • 16 respects

The Analog Modeling MIDI Synth Kit

Project tutorial by Jan Ostman

  • 2,601 views
  • 2 comments
  • 8 respects
Add projectSign up / Login