Close

Time to move to electronic part of the project

A project log for Cheap Expandable Floor Piano

Fully functional floor piano, with midi in/out, leds and training mode.

fredericFrederic 08/31/2018 at 06:360 Comments

So, I told you already, I'll use master/slave method to drive this thing and already explained a bit of the technic. what does it translate to when we move to electronic...

Right now, I'm using arduino for control box and keyboard simply because it was cheapest and fastest way to have something working.

 In the future to expand capabilities I will indtroduce RasPI for that mater allowing the ability to select midi music, play all staves but one that should be played by the kid, also using training mode where the key will light before the note should be played... but this is for later.

So Arduino for all.

You'll find in project file list the slave, and master files. For me, they are self explainable, but I'll give you some hint to understand them.

Slave

- Setup is initializing the MPR121, and Led driver.

- Loop is :

    1 - checking MPR

When Interruption arise, it will create a message NoteOn/NoteOff that will be sent on master bus.

    2 - Check for message on Slave Bus.

First message received should be "init" with octave number. When octave has been associated, there are only 2 other messages. LedOn and LedOff.

Master :

Setup is initializing VS (midi driver) and send message "Init Octave" on Slave Bus till there is no more answer.

At the time, it will know how many octave are plugged to it, and will use an array to define notes and instrument associated to keys in each octave.

About this, I also have a part that will allow changing note, instrument and pitch. It's done thanks to another arduino that will send message to master too, but I can also create an app that can use bluetooth to drive the piano. Let's get this for later, but you can already see the code for it in the master.ino file.

Once all keys have been setup, the master is just waiting for data.

When an octave send a noteOn message it will simply send a midi message to play it, and when the note is released, it will receive a noteOff message.

Simple enough.

Discussions