[HN Gopher] Restoring and MIDI-Fying a Baby Grand Piano
       ___________________________________________________________________
        
       Restoring and MIDI-Fying a Baby Grand Piano
        
       Author : jacquesm
       Score  : 172 points
       Date   : 2020-06-18 13:17 UTC (1 days ago)
        
 (HTM) web link (jacquesmattheij.com)
 (TXT) w3m dump (jacquesmattheij.com)
        
       | dheera wrote:
       | 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.
        
         | jacquesm wrote:
         | 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.
        
           | dheera wrote:
           | 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.
        
             | jacquesm wrote:
             | 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.
        
       | 29athrowaway wrote:
       | 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".
        
         | jacquesm wrote:
         | 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.
        
           | 29athrowaway wrote:
           | 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.
        
             | jacquesm wrote:
             | > 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.
        
       | caiobegotti wrote:
       | 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!
        
         | jacquesm wrote:
         | 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.
        
           | caiobegotti wrote:
           | Thanks for the detailed follow-up!
        
             | jacquesm wrote:
             | 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.
        
       | [deleted]
        
       | js2 wrote:
       | 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?
        
         | jacquesm wrote:
         | 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 ;)
        
       | dharma1 wrote:
       | 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 PS4k, 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.
        
         | jacquesm wrote:
         | 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.
        
       | qrv3w wrote:
       | 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.
        
       | moralestapia wrote:
       | 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.
        
         | jacquesm wrote:
         | Did you have a good look at the hammer/keyboard sensors? Those
         | are works of art.
        
       | [deleted]
        
       | cs702 wrote:
       | 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!
        
         | sixothree wrote:
         | 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.
        
         | jacquesm wrote:
         | > 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.
        
       | tpurves wrote:
       | 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?
        
         | jacquesm wrote:
         | 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.
        
         | DonHopkins wrote:
         | Q: What do you get when you drop a piano down a mine shaft?
         | 
         | A: A flat minor.
        
         | ogre_codes wrote:
         | 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!".
        
       | jmportilla wrote:
       | Incredible work!
        
       | bsimpson wrote:
       | 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.
        
         | necrotic_comp wrote:
         | 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....
        
         | dharma1 wrote:
         | 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.
        
           | jacquesm wrote:
           | This whole 'software as a service' thing has really gone too
           | far when things like drivers are being sold on a subscription
           | base.
        
         | jacquesm wrote:
         | 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.
        
       | DenisM wrote:
       | This is some serious commitment to the cause. Hats off, sir.
        
       | inetsee wrote:
       | 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.
        
         | jacquesm wrote:
         | 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.
        
           | bluGill wrote:
           | 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)
        
             | jacquesm wrote:
             | 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.
        
       | FatalLogic wrote:
       | 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)
        
         | jacquesm wrote:
         | 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.
        
           | FatalLogic wrote:
           | 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
        
             | rzzzt wrote:
             | 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.
        
               | davio wrote:
               | 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.
        
               | jacquesm wrote:
               | Do you know which software this was?
        
               | DonHopkins wrote:
               | 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/0827
               | 896...
               | 
               | >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 a Mac app called "Harmony Grid", and
               | a visual programming language called "Hookup" for
               | programming 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 another MIDI-driven visual programming language
               | developed at VPL, Body Electric aka Bounce.
               | 
               | 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
               | 
               | I posted a link to old photo of David in this comment:
               | 
               | https://news.ycombinator.com/item?id=8860722
               | 
               | More about Hookup and Bounce:
               | 
               | https://news.ycombinator.com/item?id=22788773
        
               | rzzzt wrote:
               | 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.
        
               | jacquesm wrote:
               | Thank you!
        
               | catblast wrote:
               | There's a relatively old FOSS "band-in-a-box" program:
               | https://www.mellowood.ca/mma/
        
               | jacquesm wrote:
               | Neat example of this (someone posted this as a response
               | on Twitter):
               | 
               | https://www.youtube.com/watch?v=bvMW71BJofc
        
             | jacquesm wrote:
             | 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.
        
             | bondarchuk wrote:
             | https://www.youtube.com/watch?v=oPG-VhU6Kiw
             | 
             | You might like this.
        
       | nitrogen wrote:
       | 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.
        
         | jacquesm wrote:
         | 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.
        
       | mkl wrote:
       | 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...
        
         | jacquesm wrote:
         | 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.
        
       | jancsika wrote:
       | 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."
        
       | cdelsolar wrote:
       | this is just incredible.
        
       | yc-kraln wrote:
       | 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!
        
         | jacquesm wrote:
         | Cool, let me know if I can help somehow. I've learned a lot
         | that I would do better on another run.
        
       ___________________________________________________________________
       (page generated 2020-06-19 23:00 UTC)