Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Restoring and MIDI-Fying a Baby Grand Piano (jacquesmattheij.com)
199 points by jacquesm on June 19, 2020 | hide | past | favorite | 75 comments


My parents bought a used Disklavier in the 90s that had mostly just been furniture, since floppy disks went obsolete.

A few years ago, my dad found a Bluetooth adaptor for it, but the process of streaming songs to it was a convoluted mess that involved downloading MIDIs, putting them in Dropbox, opening them on an iPad in a different app, etc.

I was home for the holidays that week, so I threw together a Chrome extension that streams songs with WebMIDI:

https://github.com/appsforartists/midicast

Super fun project. Far from perfect, but it's neat to programmatically control a musical instrument.

Gave me a chance to try the Cycle architecture too, which works really well for a Chrome extension. Chrome extensions are all about message passing between various contexts. Cycle's reactive model abstracts all that away, so you don't have to think about which piece is running where - you just describe how data gets transformed as it flows through the system.


Neat project!

Disklavier control boxes also have MIDI in, and you can get fairly cheap USB->Midi adapters. That way you can sidestep the bluetooth link if you want to use a computer to drive it.


I think the Bluetooth is Yamaha-branded, but it's really just BT -> MIDI. Probably pretty similar to your cable, but wireless.

WebMIDI doesn't care, so either adaptor should work with it.


Nice work ! Your solution is much better, but I'd be remiss if I didn't mention that floppy drive emulators also exist and are currently in use for people who are using old samplers - https://www.amazon.com/SFR1M44-U100K-Floppy-Drive-Emulator-E....


This is great, thanks for making it! I've got a bluetooth midi adaptor with my old Disklavier too - there is an iOS app for streaming midi files into it but it's got a monthly subscription. Your Chrome extension looks perfect.


This whole 'software as a service' thing has really gone too far when things like drivers are being sold on a subscription base.


I imagine the demo to be playing a Nancarrow Player Piano Study like no. 36 or 37 (or Tango?).

No. 36 is a 4 part canon where each part moves in a different tempo, forming a tempo ratio 17:18:19:20. Imagine taking a Bach fugue and applying a skewX or perhaps a Gaussian blur to it. All the voices converge roughly in the middle of the piece to create a striking texture unplayable by humans.

No. 37 is a twelve-voice canon with an esoteric relationship among the voices (based on pitch-interval ratios of a particular scale from a book by Henry Cowell.) It's basically a series of little episodes where he trains the listener to focus on the texture-- because what else could you focus on in a twelve-voice canon? Then at the end, he introduces this low, enigmatic ricercare tune that builds into this enormous, sprawling texture of harmonic and melodic surprises, like aliens slowly descending upon Eisenach 300 years too late to find their lost ancestor.

Trimpin made MIDI recordings of the 50+ player piano etudes back in the 90s.

And if copyright weren't full of anachronistic concepts, one of them would be the Lenna of MIDI piano demos in the 21st century.

Unfortunately, copyright is still full of anachronistic concepts.

So instead you get an early Debussy piece. And where you would have said, "Holy shit, that is wild!" to a demo that properly shows off all the work the author put into MIDI-fying a baby ground, you instead say, "Hm, neat."


What's the problem with copyright? Assuming the rights owner can be found and midi transcriptions made of the piano rolls, why would it be legally any more complicated than publishing sheet music? Of course any public performace would require royalties, as would shipping the midi files as demos when selling a piano, but that's kind of the whole point of copyright law.


That's some fantastic work, a job well done for sure! I couldn't help to notice some texture on the new wood paint and I wondered why the author simply did not restore the original beautiful wood and went instead for that hard brownish painted tone. It's as if the sanding wasn't fine enough in grit too, because lacquering with polishing is supposed to give you almost a mirror-like result (that's all based on a single indoor picture of course, sorry). Congrats again to the author!


The case was extremely damaged, and not made of real wood but of plywood with veneer on top.

The veneer layer had already been sanded at least once and was super thin in places and of course that is where the bulk of the water damage was. In the end in a few places there was only a super thin layer of veneer left and in one or two places none at all. Wood grain filler was used to make the first layer more even, then three layers of red stain were added and finally two layers of high gloss transparent.

I would have loved to use only two layers of stain but the wood left underneath just wasn't good enough for that anymore. Anyway, so it isn't quite as dire as you make out from the pics but it also could have come out a lot better if there was more to start with. In person it looks quite good, especially the combination of brass with the red stain.


Thanks for the detailed follow-up!


You're welcome. In fact, the case was so bad, and the action so messed up that I thought it might end up a total loss. I love recycling other people's junk into things that are nice again, this is probably the best example of that so far.


Fabulous work. The kind of project that I would have never heard about... if it weren't for HN.

Supper happy to see this at the top of the front page.

Thank you for sharing.

On a less serious note, you could totally freak out your future house guests with stories about a ghost that occasionally plays the piano at night!


> On a less serious note, you could totally freak out your future house guests with stories about a ghost that occasionally plays the piano at night!

Hm... that's some inspiration I may not be able to ignore.


Love it. Thank you for reading and responding!


I like the mix of postings on HN.

There are enough personal projects out there to absolutely flood this site and it seems on weekends there are more of them (maybe my imagination). But still the site doesn't get flooded.


Does it have power limitations on the number of simultaneously active solenoids? A friend ran into that problem. Can it play Circus Galop? https://www.neatorama.com/2012/02/03/unplayable-piece-used-t...


It will be more than happy to activate 20 solenoids at once, which is pretty loud. In practical music you'd use the sustain pedal if you wanted more/longer notes held.

I don't feel like stressing it to the point where it might break using 'black MIDI' or some equivalent, the power supply is 35 years old and might give up the ghost.


You can also do this with even more simultaneous notes: https://www.youtube.com/watch?v=oPG-VhU6Kiw


This is amazing. I'm going to show this to my tuner who also does restorations, but I know that he's going to shake his head that anyone would do this much work on that piano.

What did you do with the G3? Do you now have two baby grands?


It is still there, sitting right next to the other. So yes, and a G3 is 180 so not quite a baby, it is huge next to the other one. This is - obviously - a matter of some discussion as was turning the living room into a woodshop for the last month or so ;)


This is an impressive amount of work, especially considering how much modification had to be done to the solenoids.

For me, the best part was the link to the PianoBooster software http://pianobooster.sourceforge.net/ That software looks like a great way to help newbies overcome the early hump in learning to play the piano.


Pianobooster is awesome, it is the most patient piano teacher you can imagine. I've modified it a bit to give me more statistics and to more intelligently split left / right hand parts. The original tends to assign notes based on a pretty rigid rule and I changed it so it uses some geometrical clues about what handspan you can expect to better assign the notes to the individual hands.


Can you open a pull request at https://github.com/captnfab/Piano Booster someone has given the project new life in the past year (it was dead for about 5)


Ah cool. I tried to reach the original author but he did not respond. Thank you for the pointer.

Pianobooster has an interesting internal architecture, it works completely in 'streaming' fashion which makes it quite hard to operate on the input files, you can't really look ahead because the whole file is never entirely in memory. It took me a while to get my head wrapped around that, it is so completely different from how I would have approached that particular problem. I can see some advantages to this way of doing things. Another interesting point is that it has a lot of the business logic in two places, one where it deals with the audio part of things and one where it deals with the visual part. These then sync up again at the currently playing note(s).

Anyway, regardless, it is an awesome project and I'm super happy to see that someone has taken up the mantle.


Awesome project. The main difference I can see is that the solenoids on Disklaviers are very quiet.

I've got a mid-80's U3 Disklavier I bought a couple of years ago, one with a floppy disk controller. It was about £4k, bought it from a dealer who imports them from Japan. I love it - the strings are longer than a standard upright, but doesn't take as much space as a baby grand.

I only have one wish for it - that someone would make a new ( ideally open source) controller unit that works with old Disklaviers!

The unit has midi I/O but has about 500ms of latency on playback - still very nice as a party trick and for recording ideas - but somewhat limits the usability with a sequencer.

Still, it's pretty mad I am using a Japanese robot piano from nearly 40 years ago that still works exceptionally well.


Those solenoids are super quiet because of how they are designed, the top is made of rubber with a felt insert, the weight also has a felt layer at the top so when it strikes upwards it can so so forcefully but quietly, without the 'clack' associated with solenoids. Finally, the shaft is super thin (2mm) and runs in a nylon guide for reduced friction, and there is a small spring in between so that when it drops it gets slowed down a bit.

As for the 500 ms, there is a setting on the wagon that allows for realtime during playback.


How much control do you have with the solenoids, and the hammers? Is it just control of the velocity of strike, or is it possible to have positional control of the hammer?

If you could control the position, maybe you can create some interesting tonal effects that a human pianist could not achieve, by holding the hammer close to the string to partially damp it

(Similar to what guitarists can do)


Positional control of the keys (not the hammers) is possible but the solenoids get very hot. Strike velocity is not proportional, I will have to add some filtering to ensure that loud passages don't break a hammershank.

As for the tonal effects, you can't really manipulate a piano hammer like that through the action, and this mechanism still uses the normal action the way it is intended, only it strikes from below the pivot rather than above, so at the back of the key. The whole function of the piano action is to give a uniform response to uniform input so the hammer can only describe a particular arc with a speed relative to the force with which the key is struck. You can't 'freeze' the hammer at the top of that arc, it will just fall back down until it gets caught by the back-checks.

What you can do and what would be impossible with just one pianist and just your fingers is to strike key combinations that would be otherwise impossible. For instance to make a chord that uses more than the normal number of fingers or that would require extreme contortions or more than two hands.


Then you could make some interesting effects by using each human key strike to trigger extra keys, such as one or two octaves higher or lower, or something more colorful like a note one fifth higher at reduced velocity, or time delayed perhaps

edit - just noticed that it seems you hadn't yet been able to get the key sensors working, only the output


Church organs have such functionality, typically limited to activating octaves higher and lower than the rank played. Quite impressive given that that all works mechanically.

And yes, that would require input, but I will be working on that next and I can already play using a digital keyboard on the piano (which gives a very eerie effect), and that way I can do such stuff.


The Windows 3.1-era Band-in-a-box had a feature (and probably still has, if that software is still around) that allowed playing along a pre-programmed chord progression in different styles, which always produced a harmony that matched the current chord with a a single key press. You could play in the style of eg. Erroll Garner, even if you only knew how the "bare" melody of the song goes.


There's a relatively old FOSS "band-in-a-box" program: https://www.mellowood.ca/mma/


Neat example of this (someone posted this as a response on Twitter):

https://www.youtube.com/watch?v=bvMW71BJofc


That was amazing "AI" for the 1990s. It would play never-ending bebop solos that were pretty legit. The author must have been a well-versed musician and programmed in the standard licks from the jazz vocabulary.


Do you know which software this was?


I think we were both talking about PG Music's (literal) "Band-in-a-Box": https://en.wikipedia.org/wiki/Band-in-a-Box

Happy to read that it's still being updated.


Thank you!


My friend and serial colleague David Levitt wrote his PhD thesis about applying AI to Jazz improvisation at MIT EECS in 1981, titled "A Melody Description System for Jazz Improvisation". His PhD advisor was Marvin Minsky.

https://dspace.mit.edu/handle/1721.1/32122

https://dspace.mit.edu/bitstream/handle/1721.1/32122/0827896...

>A Melody Description System for Jazz Improvisation

>This thesis describes a program which embodies several computational aspects of music improvisation and composition. Given an initial melody and harmonic outline, the program produces a single voice of improvisation. While the improvisation is intended to resemble a jazz (eg. "swing" or "bebop") solo, the program's descriptive techniques reflect computational elements common to a range of tonal music. These include building up phrases from partial descriptions, recognizing interesting features, and re-examining a remembered phrase to produce a variation in a new context. Throughout, the program uses various ideas of similarity, repeated patterns, defaults, and mutually constraining structures, trying to anticipate the audience's expectations to make the improvisations understandable and interesting.

David also developed an early musical/graphical Mac app called "Harmony Grid", and a visual programming language called "Hookup" for controlling and integrating MIDI and hardware and software like the Macromedia Director player library. David shared an office at the MIT AI Lab's "Music Hacker's Hangout" with Miller Puckette, who developed Max/MSP and PD. He later worked on Body Electric aka Bounce, another MIDI supporting visual programming language for real time VR simulation developed by Chuck Blanchard at VPL.

https://link.springer.com/chapter/10.1007/978-3-642-58126-7_...

>Representing Musical Relationships in the Harmony Grid

>One of the most difficult questions of multimedia design is when is it appropriate to use a given medium or mode of interaction. Sometimes the answer is not as obvious as it might seem. For instance, a program which manipulates music obviously has to be capable of playing music, presenting auditory information, but to what extent should the interface to the program be an auditory one? This chapter describes one such program which teaches about music, but with which the student interacts using a two-dimensional spatial representation of musical relationships. In other words a cross-modality mapping occurs. This kind of mapping appears to be especially successful because variants of it have been applied to good educational effect more than once. Indeed, Chapter 12 describes a successful use of a different but closely related cross-modality mapping. A very interesting and open question is: why is this mapping appropriate, where others may not be?

>1. Introduction

>The Harmony Grid was developed to help musicians and non-musicians visualize harmonic relationships in the traditional western 12-semitone chromatic system. It spatially represents some of the thinking that goes on when a composer or improvisor describes a melody or chord progression: 'Now the chord root is descending on the circle of fifths; now the melody is ascending . . chromatically; now it's descending on the whole tone scale~ .. ' and so on. Articulately or not, we create these structures when we make and appreciate music - dynamic ways of thinking about notes as 'near' each other. The Harmony Grid lets us visualize these musical relationships as adjacencies in fields of spatial intervals, displayed as two-dimensional grids.

Here he is demonstrating his "Music Box" software, and talking about his research at the MIT AI Lab and Atari Cambridge Research Lab:

https://www.youtube.com/watch?v=ocwsVkqEKys

There'a a link to great old photo of David in this comment:

https://news.ycombinator.com/item?id=8860722

More stuff about Hookup and Bounce:

https://news.ycombinator.com/item?id=22788773



I misread this title as a MIDI capable 'flying' Baby Grand Piano. So was mildly disappointed, but OTOH that could be a whole other level of drone-art/aeronautical/electro-mechanical project for some enterprising hacker out there?


Thank you. I've seen this article on HN a couple times this morning and each time I briefly think "A flying grand piano, that sounds awesome!".


Q: What do you get when you drop a piano down a mine shaft?

A: A flat minor.


With the weight of your average piano (700 pounds or thereabouts) that would require some major engineering, you're looking at something the size of a regular helicopter to lift it.


This in interesting. I've been wanting to make a neural piano synthesizer for an electronic keyboard that outperforms the sample-based stuff Yamaha and Kawai use. But getting labelled training data is a problem. Would be interesting to use a setup like this to amass loads of accurate training data about what inputs produce what waveforms!

If the author is willing to mic up the piano properly with a good mic, and publish a few hours of uncompressed samples of piano playing along with the associated MIDI files -- it doesn't have to be good playing, but preferably better than "random" playing, it would be super cool to play with that data.


For another project (mp3->midi) I used a large number of piano midi files coupled with midi->wav conversion to give me a dataset like that. The original midi serves as labels for the audio.


Yep all the author needs to do is download a few hundred MIDI files, play them, and record the piano -- it would be an interesting dataset to play with.

Most of even the top of the line digital pianos seem to get the resonances and cross-talk between the strings wrong in my opinion, and I think a neural net should possibly be able to learn the internal physics of the piano from enough samples.


Author here... Unfortunately there is a pretty busy road passing my house which would preclude miking the piano and getting meaningful results. Also: that's a lot of combinations! But you are right, going this route should in theory give you a way to generate audio that comes much closer to the real interaction between the strings and the soundboard than the mixer step at the end of your typical digital piano. They all sound way too clean.


would definitely be amazing for someone to do this. i do believe that there is some more accurate sounding piano synthesis software (or whatever you want to call it) out there that relies more directly on huge libraries of actual recordings of playing steinways, etc. recording each key a bunch of different ways and then ~interpolating between all those various recordings during synthesis, which in my limited playing around with it seemed to work relatively well (not that i had a steinway laying around, of course), but is definitely not as inspiring or scalable an approach.

really, really cool hack btw. always inspiring to see people put "unreasonable" amounts of time into labors of love like this. :)


The upside of the COVID lockdown I guess.


> Most of even the top of the line digital pianos seem to get the resonances and cross-talk between the strings wrong in my opinion

I agree. A well-maintained, in-tune acoustic piano, especially a grand, has a richness of tone that digital pianos cannot match. The main problem with digital seems to be the resonance between the strings, which has apparently been difficult to model well. Your neural-net suggestion might work better.

Decent digital pianos, though, are superior to mediocre acoustic pianos, which can be unpleasant to play or listen to. They also require little or no maintenance and can be played with headphones, a definite advantage for many living situations.


Yep. I'd be happy if I can make my digital sound as good as a YouTube recording of a concert grand, which obviously isn't as good as a real piano in richness and spatial feeling but the the quality of the resonances is there in the recording. I have a Kawai CA48 which is pretty good for digital but it still falls short of what I hear on YouTube recordings of Bosendorfers or Steinways playing through the same speakers, and I think that's a good neural net synthesis problem to match the sound indistinguishably to the quality of those recordings.


It turns out, depending on where you live, a piano may actually cost you nothing.

The free stuff section of craigslist has many pianos, for some weird reason. Just go to "For sell" > "Free stuff" and search "Piano".


Yes, this is true. Many people that move want to get rid of their pianos, they are heavy and need some pretty specialized gear if they are not on the ground floor to move them. But grand pianos are usually worth at least something simply because people like them as furniture even if they can't play at all.

CL isn't very active here in NL as far as I know but Marktplaats has lots of listings and there are also quite a few thrift stores that will sell pianos for very little money. Even so, you can expect about a 100 euros or thereabouts to move one.


True, the moving part is not free. Also, some may not be in perfect condition and may need tuning or more costly work, but certainly not $10,000. But, as a starting point, it's something.

I did a quick search and I could find baby grand pianos and grand pianos for free.

Cool article, I enjoyed the demo.


> I did a quick search and I could find baby grand pianos and grand pianos for free.

Neat, that would be worth watching to see if anything nice and worth restoring comes by. Even so, plenty of old pianos are simply so worn out that any work on them is probably lost effort, this one was a border case. For instance, replacing the 'dead' bass strings would be way too expensive. A useful trick is that you can rotate them 90 degrees to get some more life out of them (because they've been struck by the hammer at the bottom they typically vibrate in only one direction!), but there is a fair chance the string will break when you re-tension it after rotating it.


I mentioned it to some piano playing friends a while ago, I wondered the same, and they said that if the "frame is cracked" then its just garbage - you can never tune it properly, and repair is not viable unless it's a very expensive piano. Here's a blurb on it http://www.cambridgepianotuner.co.uk/newsite/cracked-frame/


Cracked frames are rare though they do happen usually because a piano was mishandled during transport. Cracked soundboards quite common and just as bad, cracked pinblock makes it impossible to tune the piano.


In case anyone comes back to this - there's some comments on reddit about this https://www.reddit.com/r/whatisthisthing/comments/hcrfto/wha...


Very nice read, thanks.

It made me recall a nice memory as well. A while ago we (me and some friends) were helping out in some hurricane struck area. We were basically cleaning and throwing away stuff. In one house there was a Disklavier that was ruined and almost completely covered with mud. We asked the owners if we could keep it and they were like 'sure yeah just take it from here'. We spent a good month just playing with it, taking out everything, then trying to put it back together. Aside from the physical keys, nothing was salvageable but it was a very fun experience.


Did you have a good look at the hammer/keyboard sensors? Those are works of art.


I did but didn't know how good they were until pretty much now that I read your comment :D. I remember I was overall impressed by the quality of everything, even on things that nobody would ever see.

Your comment sent me into a rabbit hole where I didn't knew the Disklaviers were capable of measuring and recording release velocity. That made me look up which MIDI controllers do the same and turns out I have one that does (Axiom Pro), and since I'm a music nerd now I'm using that on some software synths (and want to learn the proper technique for playing with it, which will take me months probably).

Thanks!


Totally amazing. The work you did seems tortuous but its looks like its paid off! What a brilliant machine you have now, with so many possibilities, on top of sounding really really good.


Woah, this is great! When I read the title I thought you'd just be putting sensors under the keys to record your playing, or stripping out a really old piano, putting speakers in the guts of it, and turning it into a digital piano inside an acoustic shell (a cool project idea in itself really). But this is something else entirely!


And if you get something wrong then you are going to have to fix your mistake as many times as you have keys

If I was doing a project like this, I'd definitely do one key first and test it thoroughly before moving on with the rest.


Of course I did just that. And that worked flawlessly. Which totally suckered me in. After that I built up the bar on that principle and found out that the variability resulting from very small errors in cutting and drilling was enough to cause some of the solenoids to bind. Re-doing that took a lot of time but the end result is much better.

The essential dimensions are: hole: 6.05 mm (drill 6 mm, it drills a tiny bit larger), pushrods about 5.72 mm. That gives minimum friction. But you can't buy 5.72 mm rods so you end up buying 6 mm rod and then sanding that down for every key to the right diameter. This is not the most precise process so you'll end up with 5.72 +- a few 100th of a mm. And then there is the humidity to deal with.

In the end I simply took a slightly larger bite out of the back of the action so it would have some more room between the edge there and the row of pushrods, that took care of any precision issues with where the holes were drilled and I matched each hole to it's rod individually based on how much play there was at the top, which is fairly easy to measure (deflection left/right).

The failure modes are: action not far enough back, pushrod will push the key up and then go right by it jamming the stick, pushrod can slip into the space between the plunjer and the wall jamming the stick and front row pushrods binding against the action. And because this only comes out when you have assembled everything it takes some time to analyze and fix.

What did not help is that the action itself is highly irregular, both in force required for a key to activate and in dimensions per key (especially horizontally), this made each key a unique item and my test key ended up not being representative enough.


This reminds me of Linus Åkesson's chipophone:

https://www.linusakesson.net/chipophone/making.php


Very neat project! I did something similar to an old Heyligers organ from the 70's. It was an absolute monster, 2.45 m tall, 1.5 meter wide, double manual and full pedal. I have it working with 'GrandOrgue', an open source organ simulator and it sounds and plays fantastic. Organs are a bit easier than pianos though because the outputs are binary rather than touch sensitive.

This:

http://forum.pianoworld.com/ubbthreads.php/ubb/printthread/B...

Two year project is the same thing but then for a grand piano action -> MIDI. It is super impressive but gives me the unspecified feeling that it should be possible to do this in a simpler way.


Nice! I have an old Wurlitzer electric that I have been wanting to restore and MIDIfy. This gives me hope that the requisite modifications to a Disklavier or Pianodisk setup might actually be possible.


That should not be too hard, the thing to look for would be an Arduino based MIDI project that you could adapt for your purposes.


Grats on the cheap grand! I bought a similarly inexpensive piano in a similarly decrepit condition before Covid, I've been meaning to MIDI-fy it as well. Thanks for the inspiration!


Cool, let me know if I can help somehow. I've learned a lot that I would do better on another run.


This is some serious commitment to the cause. Hats off, sir.


Incredible work!


this is just incredible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: