4chord MIDI

4chord MIDI - the USB MIDI keyboard to play every major hit pop song with four little buttons.

Similar projects worth following
4chord MIDI - the USB MIDI keyboard dedicated to play all the four chord songs, from Adele via Green Day and Red Hot Chilli Peppers to U2 and Weezer. Thanks to MIDI, you can be any instrument - and all of them at once. Yay!

The Axis of Awesome showed it: all it takes to create a major hit pop song is four chords. So here is a MIDI keyboard to tag along, and play the I-V-iv-VI chord progression with four buttons.

Built around an AVR ATmega328 and Objective Development's V-USB library, 4chord MIDI acts as a regular USB MIDI instrument. It supports playback in every key and five different playback modes:

  • simple triad chord (root, third, fifth)
  • triad chord + third + fifth + third as quarter notes
  • triad chord + third + fifth + octave as quarter notes
  • root note + third + fifth + third as quarter notes
  • root note + third + fifth + octave as quarter notes

The playback tempo can be set between 60 and 240 bpm.

  • 1 × ATmega328P TQFP32 Microcontroller
  • 1 × Nokia 5110 LCD Clip-in version taken from the usual breakout boards
  • 1 × USB Mini B SMD connector Connector
  • 7 × SMD tacticle switch 4 white and 3 black to achieve some piano-ish look, but doesn't really matter
  • 1 × 6pin IDC connector Serial programming connector

View all 19 components

  • 4chord MIDI Piano PCB is ready

    Sven Gregoria day ago 0 comments

    The revised PCBs arrived earlier this week and later the same night, I was holding another fully assembled 4chord MIDI piano prototype in my hand. Moment of truth has come: will this finally be the revision I'm happy enough to share it with the world and start offering to strangers?

    Initial situation looked good, I attached an USBasp programmer and checked if avrdude could recognize and communicate with the controller. No smoke, no short circuit, ATmega328p recognized - all good. Flashed the firmware, remembered to burn the fuses to use the external oscillator right away this time, and excitedly watched the syslog output as I plugged in the USB cable for the first time.

    New USB device found, idVendor=1209, idProduct=deaf

    What beautiful words.

    The LCD back light went on and the 4chord MIDI logo appeared on the LCD itself. It was one of those Disney moments you just want to burst into song. So I started up fluidsynth.

    Long story short, latest revised Piano shaped 4chord MIDI keyboard PCB seems to work all well and nicely, the toppling problem is solved, and the back light works.

    Time for some pictures and show the (admittedly minor) differences between the two PCB iterations.

    On the left is the initial version, on the right the revised one. Ignore the buttons on the right, I'm currently on the (seemingly futile) mission to find the perfect tactile switch.

    Main change is the fourth rubber foot on the top, slightly lowered silk screen on the buttons and the voltage selector for the UART connector.

    The bottom side, has mostly re-arranging some components and re-routing the tracks accordingly and some silk screen related changes, and of course fixing the back light transistor arrangement (which is also a MOSFET now).

    Again, left side the initial PCB, right side the revised, latest version.

    So, yeah, I'm happy enough with all of it, so this will be the version that is going to be shared on the OSH Park website. The KiCad and Gerber files have been merged to the Github master branch and tagged as release.

    Next steps are finalizing my preparations for a first small batch that will eventually make it to Tindie. But as I mentioned, I'm currently on some quest for buttons. Some year ago or so I ended with a random eBay order of tactile switches (the ones used for the chords), which are like no other switch I ever met. They are simply smooth and silent with a nice pressure point and feeling to it (Omron B3S series as it turned out). Would be great to find the same type of switch for the menu buttons - preferably in black (ebony would be perfect since those Omron ones are actually ivory), but so far no luck.

    So I'll keep up the quest for a little while longer and little by little set up everything else - including some new firmware features.

  • Revised Revision B iteration finalization

    Sven Gregori08/09/2017 at 23:23 0 comments


    Finished all items on my TODO list, and threw in some extra changes to - hopefully - end up with a slightly less amateurish PCB design. I'm still working on finding some better buttons than the cheap ones I have lying around for the menu navigation. They simply need a bit too much force and I'm just not happy with their feel. Especially in comparison with the chord buttons that are just so damn smooth. But knowing what to look for now, will make this a smaller issue.

    Apart from that, latest changes are in the Github repo in the feature/hardware-revision-b branch (once I get the latest iteration and am happy with it, it will be merged in the master branch), and I just sent the design to OSH Park (which will have the PCB as shared project the same time the feature branch gets merged to master).

  • Unique USB identifier

    Sven Gregori08/03/2017 at 18:32 1 comment

    Thanks to the folks at, 4chord MIDI has now its own unique USB vendor/product ID pair! In practice this means that one could add a udev rule specific to 4chord MIDI, and for example automatically execute a shell script whenever a device gets plugged in, which could then start fluidsynth and automatically connect it via aconnect. Or start jackd and a2jmidid to get Ardour ready for MIDI recording.

    Well, I guess those two example udev rules just made it on my TODO list..

  • Hardware Revision B

    Sven Gregori07/28/2017 at 18:43 0 comments

    Earlier this week, the fully re-designed revision B PCBs have arrived from @oshpark, and they are even more beautiful than I imagined. You simply cannot emulate this shininess in KiCad's 3D Viewer ..or capture it on a picture, but here is one nonetheless:

    The main change is obviously the PCB shape. I honestly don't know why I thought a MIDI keyboard had to be credit card sized in the first place, it's not like you'd carry it around in your wallet along with a battery powered computer to actually use it. So I figured, why not give it a more musicy look.

    Also there were a few issues I didn't like in my initial design and wanted to change regarding the crystal oscillator (too high frequency for 3.3V supply voltage and a form factor which wasn't that easy to source) and the LCD (also sourcing situation, couldn't fit the back light, and they kinda kept on dying on me). Also the horizontal button arrangement for the chords playback didn't feel very ergonomic or natural.

    So with the new boards designed, manufactured, and right in front of me, last night was the time to turn one of them into a functional prototype:

    I emphasize prototype here, because I realized a few things along the way:

    • There's really no need to have zero Ohm links in the power supply paths, this is a USB powered device. While analyzing and optimizing current consumption is fun and interesting, there simply is no reason to be able to do that in the final design.
    • Real pianos may be nicely balanced with three legs, but they don't have a huge USB connector in their upper end either. Pressing the "<" button will topple the board with the current mechanical arrangements, so that will need some adjustments.
    • On very first try, the LCD back light didn't turn on, and I haven't had time to look into it yet, so there is a possible issue that needs some re-work. Maybe I should just stop using BJTs and finally get more familiar with FETs.
      • Edit: turns out I used the wrong generic NPN transistor in the schematic, and base and emitter ended up swapped. Removed the SOT-23 transistor, bent some legs on a TO-92 to replace it, and back light turned on just fine.
    • Santa is coming early this year and he's so gonna bring some hot air soldering equipment.

    So there will be another iteration in the near future taking care of all these things, and once I'm satisfied with the results, the PCB will be available from OSH Park's shared project section, and some assembled ones will make their way to Tindie. And in the mean time, I have a whole list of new feature ideas for the firmware to work on, so I won't get bored.

    (Side note on Tindie, if you'd be interested to get a 4chord MIDI keyboard, drop me a message so I could get a rough picture)

View all 4 project logs

Enjoy this project?



davedarko wrote 2 days ago point

Okay, just saw the video and I really like it :) Nice work!

  Are you sure? yes | no

Sven Gregori wrote a day ago point

Cheers :) will do some more at some point, using the new hardware, now that it seems to be ready enough.

  Are you sure? yes | no

danjovic wrote 07/29/2017 at 14:59 point

I just have seen this project featured on Hackaday! It's awesome!!

  Are you sure? yes | no

Sven Gregori wrote a day ago point

Thanks :) was quite a nice surprise when I saw it there myself.

  Are you sure? yes | no

Ondřej Petrlík wrote 07/28/2017 at 14:18 point

Wow, interesting idea! Good job, thinking about building own copy asap.

  Are you sure? yes | no

Sven Gregori wrote 07/28/2017 at 19:07 point

Thanks! I just wrote an update on the new hardware I designed and mentioned it will eventually be available on OSH Park and Tindie (so far the plan).

If you want to take care of everything yourself, the Revision A hardware has the KiCad project and Gerber files on Github, Revision B has only the KiCad project so far and is in its own branch (I could add Gerbers though - but as I wrote in the update, some minor changes are still coming).

  Are you sure? yes | no

oshpark wrote 07/25/2017 at 18:26 point

Great project!

  Are you sure? yes | no

Sven Gregori wrote 07/28/2017 at 19:01 point

Great service ;)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates