Open Source Piano Midi Controller

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

timfrost91

Member
Joined
Apr 2, 2016
Messages
10
Hi Everyone

Over the coming months, I would like to design and build a full sized (88 Key) midi controller, designed to imitate the true feel of a high quality grand piano piano action (within reason of course, but as closely as possible). There is already a highly acclaimed midi controller by Kawai on sale right now, the VPC-1, which is well known as 'the midi controller of choice' for pianists seeking a grand piano-esque action. It would fit my needs perfectly, however here in the UK it is £1000, which just seems an awful lot to pay for a piece of gear that doesn't even do anything productive until it's connected to a computer!  Please can anyone advise me on whether it is realistic to try and build a midi controller of similar quality to the VPC-1 for around half the price? 

The two critical elements of the project will be: (1) the sensor system/electronics and (2) the action. For the sensors, there are many options available, and choosing the right one will be key. Cheap non-velocity sensitive beginner keyboards tend to have a single contact sensor, hence can only play any note at a single identical volume, no matter how hard the keys are struck. Most higher quality stage pianos and midi controllers tend to use a double contact sensor system. I could be wrong, but I believe these systems work using two protruding pieces of plastic underneath every key of slightly different lengths. As 'prong 1' and 'prong 2' under each key are slightly different in length, this creates a time delay between the points at which the rubber contact sensors are struck, which is translated to velocity midi information i.e. the harder the key is pressed, the shorter the delay between prong 1 and prong 2 contacting their respective sensors.  However, double sensor systems are poor at playing
very fast repeated notes, which limits their capabilities in many respects.  For this reason The VPC-1, and a few other higher end piano controllers use a triple sensor system, where an additional 'middle sensor' is added. This means the controller has the ability to replicate a grand piano more realistically for fast repeated notes - in a triple sensor system the key prongs only have to return to above the middle sensor, (not to above the top sensor) before the same key can be replayed.  A triple sensor system like this far more closely mimics the action of a grand piano, which has a repetition lever designed to allow the hammers to play very fast repeated notes (some pianists claim up to 12 per second!).

Triple sensor systems like that used in the Kawai VPC-1 are undoutedly much better for fast repeated notes, however the reasoning as to why they are baffles me in many ways - the top sensor is surely useless for these fast repeated notes, so why can't the 'top' sensor in a triple sensor system simply be eliminated altogether, leaving a better double sensor system with sensors closer to the bottom (full depression) of each key? This would still allow fast repeated notes, no? Perhaps I am missing something obvious and someone could shed some light on why this isn't possible.

In addition to contact sensors, there is also the option of using a pressure rather than velocity based system, for example Force Sensitive Resistors under each key as shown in a rudimentary proof of concept fashion on YouTube using 'velostat https://www.youtube.com/watch?v=nmIXKrA4-UA'. There is also the option of using some kind of LED/light based optical system, as shown in this proof of concept article: http://hackaday.com/2010/10/07/playing-piano-with-optical-sensors/ which following this article I believe was subsequently turned into a commercial product, or at least attempted to be: https://sebion.wordpress.com/posts/

Which sensor system in a DIY project do you think would provide the best results? (Contact vs Pressure (FSR) vs Optical (LED))

The electronics and sensor system is the hardest part of the project to get right, but when it comes to other element of the project, the action, there is still a lot to consider. I would like to build a fairly quiet weighted and 'graded' (meaning bass notes have slightly more resistance than treble notes due to the thicker strings at the bottom end of a real piano, so they are weighted slightly more heavily at the bottom end) hammer action with full length key sticks, of a length similar to the length of those used in the Kawai MP11 Stage Piano's 'Grand Feel action (an all but identical action to the RMIII action used in the VPC-1, with the only slight difference (improvement) being the keysticks are around 1" longer, giving a slightly more realistic feel (easier depression with the same force) further up the keys).  It would also be nice to feature "let-off" a very subtle resistance in the action part way down the key depression at very soft velocities, although this not essential as it is a very subtle effect and not noticeable during normal playing. There is a very good clickable animation here: http://www.kawaivpc.com/en/features/, which illustrates the grey mechanical rubber "let-off" mechanism in the top left, together with the grey triple contact system at the back of the key. It also shows the positioning of the balance pins, hammer system, and padding very clearly.

Any advice on this project would be much appreciated as I am still very much in the early days.
 
abbey road d enfer said:
1000$ divided by 88=>£11.36 for 3 sensors and all the meccano that goes with it. There's no way you could beat that with a non-industrial product.

I think you've overestimated the cost of the sensors. For the "double contact" style sensor strips, which by far is the most common type found on velocity sensitive midi controllers and stage pianos, you can buy contact strips in lengths of either 12 contacts or 13 contacts from this supplier: http://www.midi-store.com/Fatar-Rubber-Contact-for-SL880-990-13-13-p/sku17165.htm. By my calculations, you could buy 14 strips of the contact strips of length 12 contacts, and 2 strips of the contact strips of length 13 contacts for around $95usd total, and have exactly enough contacts to create a midi controller with 97 keys at 4 contacts per key (this would actually have extra black bass keys, like the acoustic Bosendorfer Imperial concert grand - the best piano in the world perhaps). Incidently only one midi controller I know of (pictured below) has already done this (implemented extra bass keys) and it is very expensive

Namm2013_01_500.jpg
 
I guess the first switch of the three will help when really slow, soft touch, when you don't even hit the key to the bottom or just take too much time, with 1st and 2nd you already have the key press and velocity, when the key is not fully depressed in fast repeated notes that's when the first doesn't helps and only 2nd and 3rd are working.

What about piezo pickups, I know it's a lots of piezo transducers and ADCs but you are already thinking about the ADCs with the variable resistance option. The FSR option has a nice feature, you could potentially read the force not only when pressing the key but afterwards, which could let you do some cool stuff in string/wind arrangements, not so useful for a piano I guess.

You could use a lot of other methods, an encoder working as multiple switches, maybe more than 3, depending on the mechanics and the encoder. Some magnetics options, or optical as you said, and keep counting. The comercial has been chosen for a reason, would be nice to know why.

The mechanics is what frightens me the most in a project like this, having a "good feeling" is something you can't simulate, predict or estimate before hand, as is the case for the electronics. Throwing a few numbers you get the idea if it's doable or not. I don't think it's going to be much cheaper than the comercial in the end, at least for one off in a project like this. Many hours of work to be accounted in the cost as well, it could take quite a lot experimenting to have it working as you expect to be at the level you try to.

I think I'd try to get n actual piano for cheap and use it's mechanics to do this, strip the harp away, put something in the place of the strings for the hammers to bounce, probably the sensors themselves, and build a new enclosure as small and light as I can.

Said that I'm completely in if you get in to it to help if I can.

JS
 
timfrost91 said:
abbey road d enfer said:
1000$ divided by 88=>£11.36 for 3 sensors and all the meccano that goes with it. There's no way you could beat that with a non-industrial product.
I think you've overestimated the cost of the sensors.
I haven't. The important part is "all the meccano that goes with it". Indeed, using industrial parts reduces cost significantly, and at the end of the day you may find, as is very often the case, that buying the whole finished product is a better economical alternative.
If your motivation for DIY was to create something that doesn't exist, I wouldn't have the same view, but you have clearly signified that you want to make cheaper...
By my calculations, you could buy 14 strips of the contact strips of length 12 contacts, and 2 strips of the contact strips of length 13 contacts for around $95usd total, and have exactly enough contacts to create a midi controller with 97 keys at 4 contacts per key
The cost in piano keyboards is not in the sensors, it's in the action, with its hundreds of parts that do not make sense making on a one off basis. You would have to source them, and the final cost would be more than that of a complete finished product.
 
joaquins said:
I think I'd try to get n actual piano for cheap and use it's mechanics to do this, strip the harp away, put something in the place of the strings for the hammers to bounce, probably the sensors themselves, and build a new enclosure as small and light as I can.

Probably the best way to realize it.
Bernd
 
joaquins said:
I guess the first switch of the three will help when really slow, soft touch, when you don't even hit the key to the bottom or just take too much time, with 1st and 2nd you already have the key press and velocity, when the key is not fully depressed in fast repeated notes that's when the first doesn't helps and only 2nd and 3rd are working.

What about piezo pickups

Hi thanks for your reply. I'm not sure what you a mean by suggesting the function of the first (top) sensor in triple sensor systems could be to help with very soft playing, do you mean the time between the first and middle sensors is measured and converted to a velocity (volume) in situations when the key is not fully depressed as far as the bottom sensor? This is very unlikely in my opinion, as on a real piano if the key is not depressed almost all the way to the bottom of it's travel depth (to the bottom sensor), the hammer simply would not strike the string. The only thing I can think of regarding the potential function of the top sensor in triple sensor systems is perhaps it controls the point at which the dampers are released off and back on to the strings.

Regarding your idea of using piezo pickups in a similar fashion to FSRs, piezos are obviously extremely sensitive to vibrations, so surely there would be problems with pressed keys triggering neighbouring notes, i.e. it wouldn't it be pretty much impossible to mechanically isolate each key from neighbouring vibrations when a nearby key is played.
 
timfrost91 said:
Hi thanks for your reply. I'm not sure what you a mean by suggesting the function of the first (top) sensor in triple sensor systems could be to help with very soft playing, do you mean the time between the first and middle sensors is measured and converted to a velocity (volume) in situations when the key is not fully depressed as far as the bottom sensor? This is very unlikely in my opinion, as on a real piano if the key is not depressed almost all the way to the bottom of it's travel depth (to the bottom sensor), the hammer simply would not strike the string. The only thing I can think of regarding the potential function of the top sensor in triple sensor systems is perhaps it controls the point at which the dampers are released off and back on to the strings.

Regarding your idea of using piezo pickups in a similar fashion to FSRs, piezos are obviously extremely sensitive to vibrations, so surely there would be problems with pressed keys triggering neighbouring notes, i.e. it wouldn't it be pretty much impossible to mechanically isolate each key from neighbouring vibrations when a nearby key is played.

In my only time around a really nice piano (3/4 Steinway IIRC)  it was quite hard to depress a key so slightly that the string doesn't sound at all, but I get what you are saying, the hammer flies at some point, that point would be your 3rd sensor. The thing you are saying makes sense, but I guess a slight delay by software in the release of the key would do the trick, since in an actual piano the damper takes a little while to return and damp the vibration shouldn't be a problem for the player and would allow multiple touches to a single string without dampen it in the meanwhile.

For the Piezo I was thinking it related with a switch, when the switch is depressed the µC looks at the ADC. If not for a digital piano that would make a nice sensitive analog synth controller.  Also by software you could probably work out quite nicely which are the pressed keys and which are noises, given the proper processing power but thats quite cheap nowadays. Also quite easily you could isolate the HF mechanically and only pay attention to that electronically, at least giving a better S/N to the processor to work with.

JS
 
I've been mulling over the important decision between the three obvious sensor system options (contact sensors vs force sensors vs optical sensors) After some thought, I am leaning more and more towards an optical sensor system (reflective phototransistors). Sebastian, who developed the ePick (what basically appears to be a less expensive clone of the PNOScan) has already shown that is is possible to get excellent results with his hackaday article: http://hackaday.com/2010/10/07/playing-piano-with-optical-sensors/

The electronic side of the project is what I want to tackle first. I will then move on the mechanics/action side of the project. Sebastian uses an Atmel ATmega16 microcontrollers as the ADC for every group of 8 piano keys. This means for each of the 8 ATmega16 used, all of the 8 ADC channels are assigned to keys. Sebastian determined that the minimum phototransistor sampling frequency necessary is 1KHz. This means in his project it is important that the microcontroller is run at its maximum frequency of 16Mhz in order to sample each of the 8 ADC channels at 1202Hz. Read more about sebastians project here: http://sebi.g3th.net/ You can already see how choosing a suitable microcontroller is very important.

p.s. not really relevant quite yet, in fact its probably weeks if not months away, but on the image side of things I am aiming for something similar to a piano black version of this, a DIY keyboard conversion project you can read about here if interested http://modularsynthesis.com/kurzweil/kurzweil.htm
keyboard_finished.jpg
 
I've spotted a Studiologic SL990 Pro midi controller for sale in the window of a local charity shop for £29!, it happens to be exactly the same controller that I already own, just in worse condition.  I paid about £300 for 5 or 6 years ago. "The price tag says it has "88 piano weight keys, fully functional except pitch bend and modulation wheel, also missing body closing screws at bottom"

As I already own the same controller I know the action is pretty horrible (very noisy, plastic feeling, and weighted far too heavily) However it still could be a bargain to help me with my piano controller project - I don't need the pitch bend or mod wheel functions anyway so them being broken doesn't really matter. Anyone reckon I should buy it? The lady has reserved it for me until the shop closes at 4:30pm today. I was thinking perhaps I could perhaps replace the double sensors with phototransistor/LED optical sensors in some way and recycle the contact PCB and mainboard from the SL990?

Any thoughts?
 
I'd buy it at least for parts, maybe you can tweak the mechanics and use it for what you are looking for.

JS
 
timfrost91 said:
I've spotted a Studiologic SL990 Pro midi controller for sale in the window of a local charity shop for £29!, it happens to be exactly the same controller that I already own, just in worse condition.  I paid about £300 for 5 or 6 years ago. "The price tag says it has "88 piano weight keys, fully functional except pitch bend and modulation wheel, also missing body closing screws at bottom"

As I already own the same controller I know the action is pretty horrible (very noisy, plastic feeling, and weighted far too heavily) However it still could be a bargain to help me with my piano controller project - I don't need the pitch bend or mod wheel functions anyway so them being broken doesn't really matter. Anyone reckon I should buy it? The lady has reserved it for me until the shop closes at 4:30pm today. I was thinking perhaps I could perhaps replace the double sensors with phototransistor/LED optical sensors in some way and recycle the contact PCB and mainboard from the SL990?

Any thoughts?
You should be able to answer your own question; what would you keep that you would recycle in your project? I guess you could use it as a permanent test bench for your experiments, but when it comes to your final goal, you'll have to work the subject of action, which, IMO, is the biggest challenge for a DIYer.
 
joaquins said:
I'd buy it at least for parts, maybe you can tweak the mechanics and use it for what you are looking for.

JS
I went back bought the controller. I figured it was such a great price that I might as well buy it. I'm sure I will be able to find a use for some of the parts.
 
joaquins said:
I'd buy it at least for parts, maybe you can tweak the mechanics and use it for what you are looking for.

JS

Designing and building a custom built action around the existing electronics of a donor controller like the SL990 is a nice idea and would certainly simplify the project a heck of a lot. Of course, using this approach you might also end up with a really nice feeling piano controller at the end of it all, but in reality building a high quality piano controller via this method  is not possible because the donor controller (SL990 in my case) would almost certainly only have a double sensor system. I would like to build a piano controller that not only feels like a true piano but also has the playability of one. By this, I mean it should be possible to play any composition written for piano, including ones with extremely fast repeated notes, (where any recently played key only needs to return a little  (significantly less than halfway) back up towards its normal 'unplayed position' before can be replayed). This can only be achieved using a better sensor system than the common double contact sensor system. The obvious solution is to use a triple contact sensor system, as used in many high quality stage pianos and midi controllers (Casio CGP-700, Nord Piano 3, Kawai VPC-1 etc)  or an optical (phototransistor & LED) based sensor system , as used in high end controllers (Lachnits, Roland V-Piano) and acoustic piano retrofit systems (QRS PNOScan II, ePick),.

The first thing I would like to look into is if there is any way to to swap the existing double sensors in my donor SL990 for an optical sensor system. If I can find a way to do this, (essentially turn the SL990 PCB strip into an optical sensor bar similar to the PNOScan or ePick), it would massively simplify the project and save a lot of cost, as obviously I would not need to fully design and order my own electronics. I also think that an optical system would be easier to integrate into an action that a contact based system. Of course, I am still willing to do this (start the electronic design from scratch) if modifying the SL990 circuitry proves impractical. I will open up the guts of my new donor SL990 tomorrow and see what I'm working with.
 
I was saying in the worst case use as parts for your good one, in case something goes south with that one and you didn't find any use for the broken one.

Of course, the sensors needs to be improved, but tweaking the mechanics of an existing keyboard may be easier than starting from scratch. I don't know how it works, but modding spring stiffness, adding or removing weight, adding some foam dampers, etc. as necessary seems better than think and build the mechanical system from scratch.

JS
 
joaquins said:
I was saying in the worst case use as parts for your good one, in case something goes south with that one and you didn't find any use for the broken one.

Of course, the sensors needs to be improved, but tweaking the mechanics of an existing keyboard may be easier than starting from scratch. I don't know how it works, but modding spring stiffness, adding or removing weight, adding some foam dampers, etc. as necessary seems better than think and build the mechanical system from scratch.

JS

Yeah if I can't find any use for the new SL990 I have bought in my project, I'll just keep in in my attic as a spare for parts in case anything on my own ever breaks. Either way it was a bargain.  Then again, I've just opened up the 'broken' SL990 to find quite a nice surprise - it's not really that broken at all - the only reason the modulation wheel and pitch wheel weren't working was because they weren't plugged into the mainboard! I plugged the (joint) connector for these functions back into the mainboard, and after testing these functions, they both work perfectly well now. I've also tested the sustain pedal input which also works fine. All in all the only real thing wrong with this controller is the missing screws which stop the top from being opened... and this is not a bad thing for me because i'm going to be using it for parts or spares anyway.

Upon opening the 'broken' controller, my initial thoughts were that this controller has definitely been repaired at some point in the past but not put back together properly, hence the missing screws. Unlike my own controller , the letters 'L' and 'R' (which I assume stand for 'Left' and 'Right') have been penned onto the 20-pin ribbon cables which connect the mainboard to 2 long contact sensor PCB's which are screwed in place underneath the action. Its possible but very unlikely this was done in the factory, much more likely is the scenario that the previous owner using the controller quite heavily and therefore had to replace worn out contact sensors at some point.

Looking at the hammer action from underneath whilst pressing on the keys from above, it appears as though the left sensor PCB controls the keys from the bottom key of the piano up to B immediately before middle C (39 keys in total), and the Right hand sensor PCB controls all the keys from middle C (inclusive) up to the top key of the piano.  (49 keys in total). It also looks as though the contact sensor PCBs won't be hard to remove as they are simply screwed onto the bottom of the action. On the other hand, it looks like the rest of the action can not be disassembled, at least not without breaking it. The left and right contact sensor PCBs are connected together with a small 4 pin ribbon cable. Hopefully i'll get a chance to remove the contact sensor PCBs from the action, later today. I'd like to take a look at the mainboard too.
 
aomahana said:
Have a look at this ......

http://www.vaxmidi.com/

thanks for sharing this. Its certainly along the same lines as what I'm aiming for.  That said this project is clearly not tailored to Piano  as there is no standard 88 key piano keyboard option and it has features of no use to a pianist like polyphonic aftertouch, However it also shows that there are others out there who are thinking 'outside the box' in terms of not using contact sensors in their midi controllers.

I'll definitely be taking a more 'build from scratch' approach rather than using a kit, as a build from scratch offers better customization options, better value for money, and better educational value.  By avoiding a contact sensor based design, it looks like this project has achieved one of the most important things for a high end piano controller - super accurate velocity sensing (this obviously allows more accurate velocity sensing of each key strike, but perhaps more importantly it should also allow realistic very fast repeated notes, just like the repetition mechanism on a real grand piano action - the lack of this feature being one of ,  if not 'the', most notable flaw of current contact sensor-based midi controllers from an advanced pianist's perspective, with the exception of a few high end ones triple contact sensor-based controllers like the Nord Piano 3 and Kawai VPC-1, (which I'd imagine are out of the price range of most amateur/hobbyist pianists like myself anyway).
 
This project is going to have to become more of a long term goal than I envisaged. Unfortunately I have many far more important things to sort out, which are going to take up all my time. In the mean time I'll keep checking this page (at least once every day) for contributions, and I'll definitely try and start the project within the next few weeks and I still aim to have it finished by September.

I am also going to reverse my original decision of designing the electronics (velocity sensor system), followed by the action.  I guess after reconsideration it just seems more logical to design and build an action and then integrate the electronic sensor system, rather than building a sensor system and then piecing a potentially complex action together around it. More importantly, doing things this way around gives me time to learn about the necessary electronics whilst building the action, which for me, I feel will be more tasking than developing a realistic piano action.

Any contributions will be highly appreciated in the mean time, especially on the electronics side, and as I said I'll try to keep the page fairly regularly updated with any significant design decisions or developments.
 
Ever since dealer wanted to charge me 2k for speaker and cabinet upgrade I've been wondering how hard it would be to make one  8).  Since I found this thread, here are my 2c...

Acustic pianos:
o  Pianos vary in touch.  There no one single way that piano supposed to feel.
o  Upright and grand actions are different.
o  Upright piano releases the hammer earlier than grand probably due to gravity
o  On the grand the mechanism stays in touch with the key longer
o  There's a period of time at the end of the key travel when hammer does not exert any force on the key (is disconnected)
o  When the key fails to overcome inertia of the hammer  (key is pressed too softly) sound is not produced, key needs to move back before it can push on the hammer again
o  One they key return, escapement mechanism bounces slightly few times on top of the key.
o To repeat a note key has to travel up certain amount.

To me, in order to simulate accustic key action three things need to happen:
1) It needs full length key (at least up to the wippen https://www.youtube.com/watch?v=XthnCDTnAGw.  Portion that moves damper could be simulated with counter weight).  Key needs to have a density of a wooden key and properly balanced.

2) Escapement machanism's and hammer's inertia needs to be simulated as well  (missing from many digital piano actions)

3) Lastly key should not be fastened to the hammer.

As to the sensors, I think important quality is repetitiveness and (low) latency.    Sensors (number of which does not matter) have to allow calculation of: acceleration and speed from which force could be derived.  I think pressure sensors are neat idea but are not accurate or sensitive enough, same with accelerometers.  Therefore one is left with optical or mechanical (contact) sensors.  I think optical sensors is a neat idea and worth exploring as it maybe easier to implement (may not need as precise alignment as mechanical sensors would).

so that's my 2c...


PS: Casio came out with GP-500 an upscale digital piano that, interestingly, does not simulate let-off and has shallower key action.  It was made this way so it can play faster (and to simplify the mechanism, I guess).  This is an example that perhaps simulating everything that piano does is may not be needed.

 
Back
Top