Disklaviers Archives - Alex's Piano Service

How to Make the Disklavier play the Piano Part of Any Song

The Yamaha Disklavier is a sophisticated piece of technology, but typically, you’re limited to Yamaha’s song library. Many Yamaha songs include both a piano part for the Disklavier and an accompanying music track, though the Disklavier piano part might differ dramatically from the original piano part in the song. In many cases, the piano tracks are recorded as accompaniments by artists, and are either added to songs that didn’t have piano originally, or that are designed to augment rather than to replace the piano in the original recording.

I recently had a customer ask if I could figure out a way for the Disklavier to play the piano portion of a particular song that was important to him.

To achieve this, I used four programs: first, Spleeter by Deezer to isolate the piano and separate it from the other components of the song, and then Audacity, a powerful open-source tool, to edit and combine the non-piano tracks. I chose to use the service Ivory to convert the piano audio to MIDI. Finally, I used Ardour to adjust the timing in the MIDI to perfectly sync it with the audio.

As an alternative to Ivory, Onset and Frames can be locally installed. This software is dated (2018), and there are many frustrations with attempting to run such an old Python program, so I opted not to use this solution. However, if you have a high-end system with a powerful GPU and the free time to get it running, it’s a free option. You’ll also need to train your own model, with was estimated to take several days on my GeForce RTX 4080.

Separating the Tracks

I used the 5stems model in Spleeter, which allows you to individually separate the piano. See the instruction below.

spleeter separate -o ./tmp -p spleeter:5stems "sample.wav"

The output of Spleeter.
Here’s a six-second excerpt from Norah Jones’s “The Nearness of You” with the piano.
Here’s the same six-second clip without the piano.

Recombining the Tracks

After reviewing each track, I found only the bottom vocals track had usable audio; the others were filled with artifacts, so I simply removed them. However, in songs with more instrumentation, this would be an important step. Review the tracks, listen to them individually, and remove any artifacts you can, applying filters as necessary.

This is what the isolated tracks look like without the piano.

Next, I used the Ivory App to transcribe the piano audio track. Ivory is an AI-driven piano transcription tool that converts piano audio into sheet music or into MIDI files. Utilizing advanced deep neural networks, it offers high transcription accuracy. I converted my piano.wav file (produced by Spleeter) into an mp3, and then uploaded it to Ivory.

Transcribing songs on Ivory.
The resulting MIDI file, as displayed in Ardour.

Syncing the Audio

After downloading the MIDI file, I found that the MIDI file did not properly sync with the audio. In order to solve this, I synthesized the audio (using FluidSynth with Yamaha C7 samples). I then imported this into Audacity, and played the isolated piano alongside the original audio. After a few attempts, I then moved the audio back and forth until I determined exactly how much time had to be added to properly sync the two pieces.

fluidsynth -a alsa -g 1.3 -m alsa_seq -i /usr/share/sounds/sf2/Yamaha_C7__SMB_.sf2 ~/DownloadedMIDI.mid -F ~/IsolatedPiano.mp3

The isolated piano comes in much too early!
The isolated piano is perfectly in sync with the original.

After carefully adjusting the audio which I’d synthesized from the MIDI file in Audacity, I determined that the MIDI file needed a total of 1.150 seconds added to it. This is a decimal fraction, rather than seconds in 60ths of a second, which is how Ardour determines time.

Seconds in 60ths = Integer Part + (Decimal Fraction × 60)

Just take the decimal component of the number (.150, in this case), and multiply it by 60. In this case, we end up with 1:09 seconds. Now we have a number we can use in Ardour.

I’ve now carefully moved the track to 1:09 seconds (or 1.150 seconds, according to my measurement in Audacity).
I’ve now extended the MIDI track, and can export it!

Once the MIDI file is downloaded, name the MIDI file from Ivory and the piano-free audio from Audacity identically, and transfer them onto a USB stick. The properly named files will look something like this:

01MySong.mid
01MySong.mp3

Provided the filenames are identical (excepting the extension), the two files will be recognized as the same song by the Disklavier.

Your Disklavier is now ready to play both files in sync! The keys will move to the isolated piano track, and the audio will play alongside it without any competing piano sounds.

Synthesized audio from the MIDI file (using FluidSynth with C7 sampling) along with the vocals.

Free Music Collection for the Nalbantov-Equipped Disklavier

Customers often ask where they can get songs for their Nalbantov-equipped Disklavier. If you’ve explored the other pages on my website, you know I’ve managed to cobble together a very large inventory of public domain music. For those using Nalbantov drives in older Disklaviers, I’ve preassembled a 108 disk selection, formatted using the ESEQ format compatible with those older systems.

I’ve put together a 108 Disk collection for the Nalbantov-equipped Disklavier, relying on the above selection of public songs (mirrored at https://mega.nz/folder/o4Zx0LxI#qLimb9LXm3vobvF-tspF_g). This is an excellent start for anybody who has recently upgraded their Disklavier, and is looking for some songs!

Using External Speakers with the Disklavier

I have a customer who recently upgraded his Mark IV to a DKC-900, and wanted to add larger Bluetooth enabled speakers. We used Rockville TM150B 10″ Speakers. Although the speakers are powered, and amplify signal quite well, we nonetheless found the audio output from the Disklavier was a bit low. I added an RCA preamp to amplify the signal going into the speakers. The RCA preamp is zip tied in place using 24″ zip ties. These work wonderfully for strapping components to the beams.

The speakers underneath the piano are present, but are no longer powered or connected.

An RCA preamp installed between the control center RCA output and the speaker.
The piano alongside its powered Rockville speakers, overlooking the ocean.
This piano connects to his network using a Powerline adapter, as discussed in my Connecting Yamaha Disklaviers to a Network article.

Combining CD Audio and MusicSoft Floppy Disks from Mark IV for the Enspire / DKC-900

Here’s a basic outline of the steps involved:

  1. Copy MIDI tracks from Floppy Disks using Player Piano Floppy Backup Utility.
  2. Rip Audio tracks from CD as MP3 files.
  3. Put resulting files in the same directory, making sure the MP3 files and MID files for a given song have the same names.
  4. Put the collection of files in a folder with the album name.
  5. Put the folder onto a USB stick.
  6. Insert the USB stick into your Enspire and enjoy!

Copy MIDI tracks from Floppy Disks

First, you’ll need copies of the MIDI files from the floppy disks. The best tool for this is Player Piano Floppy Backup Utility, created by Mark Fontana. It’s freeware, but he requests donations. You can download it from him, or you can download ppfbu_v1.4_setup.exe from my MEGA drive. You can read more about this process on the Disklavier Floppy Disk Backups, ESEQ and MIDI Formats page.

The most important part of this step is that you write the files as “Renamed MIDI files.” I typically name each one with the name of the track, and make sure each name starts with the track number (00, 01, 02…). This makes it much easier to keep track of which MIDI file goes with which MP3 later on.

Using PPFBU to extract the files, and then export them as Renamed MIDI files. I’m using a dedicated Windows XP box that I keep just for this purpose. You can rename the files in PPFBU before you export them, or you can rename the MIDI files after (like I did in this case).

Rip the Audio tracks from CD

You’ll need to rip the audio off of the corresponding audio CD. You can rip CD audio natively on Windows using Windows Media Player. In the Linux environment, I used Asunder. In the Mac environment, you can actually use the Music App. The main point is just to extract mp3 files for each track on the CD.

Ripping an Audio CD using Asunder on a Linux system.

Name and Organize the Files

Below, you can see the files listed after ripping the audio CD, and after backing up the floppy disk drive using Player Piano Floppy Backup Utility. The floppy disk tracks are MIDI files and have a .mid extension. These contain the instructions to operate the piano. The CD tracks have been ripped as MP3 files and therefore have a .mp3 extension—these contain the audio.

'01 - Kingston Trio - Tom Dooley.mp3'
'01 - Tom Dooley.mid'
'02 - Greenback Dollar.mid'
'02 - Kingston Trio - Greenback Dollar.mp3'
...
'12 - Kingston Trio - (Sinking of the) Reuben James.mp3'
'12 Reuben James.mid'

All the files are present, but they will not yet play correctly in the Disklavier, as the filenames do not match.

I wrote a short Python script to automatically rewrite all the filenames to match. Using the numbers at the beginning of each filename, it pairs together matching MIDI and MP3 files and names them whatever the name of the MIDI file is, but without spaces or symbols. This appears to be the same formatting of downloadable Disklavier albums.

Whether you use the script or not, the before and after directory listings indicate how you must rename the files.The script is called using the following syntax:

python merge.py /path/to/your/directory "Album Name"

$ python merge.py . "Kingston Trio"

Copied and Renamed: 01 - Tom Dooley.mid -> 01TomDooley.mid

Copied and Renamed: 01 - Kingston Trio - Tom Dooley.mp3 -> 01TomDooley.mp3

Copied and Renamed: 02 - Greenback Dollar.mid -> 02GreenbackDollar.mid

Copied and Renamed: 02 - Kingston Trio - Greenback Dollar.mp3 -> 02GreenbackDollar.mp3

...

Copied and Renamed: 12 Reuben James.mid -> 12ReubenJames.mid

Copied and Renamed: 12 - Kingston Trio - (Sinking of the) Reuben James.mp3 -> 12ReubenJames.mp3

Listing of resulting directory, “Kingston Trio”:

01TomDooley.mid
01TomDooley.mp3
02GreenbackDollar.mid
02GreenbackDollar.mp3
...
12ReubenJames.mid
12ReubenJames.mp3

Note that now the MP3 and MIDI files have identical names for each song, identical capitalization, and that all spaces and symbols have been removed. In the ENSPIRE, unlike earlier iterations of the Disklavier, filename length does not seem to matter. Here’s a graphical representation of the last folder, ready to move:

The filenames match! It’s ready to be put on a USB stick and played in your ENSPIRE.

It’s Time to Play!

At this point, you can move the complete folder (in this case, Kingston Trio) onto a USB stick, and insert it into the front of your ENSPIRE controller.

Once your USB is inserted, you’ll see the My Songs (5) option appear in the ENSPIRE controller app. (This image is copied from the ENSPIRE Controller Operation Manual created by Yamaha, which is available from them.) Just open up the “Album” (which is the folder you created for all of your files on your USB stick), and select a song! It’ll play the piano parts, and the audio will accompany it.

Mark IV Disklavier SSD Conversion Or Hard Disk Replacement

This article was contributed by Richard Zajac.

The Mark IV utilized a spinning hard disk, which was more than sufficient for the technology of its time. Even advanced systems like the Yamaha Disklavier don’t demand exceptionally fast read speeds, as piano notes aren’t played within microseconds of each other. However, spinning hard disks do come with inherent drawbacks. Being mechanical, they are prone to eventual failure, and are noisy. Additionally, during system updates, the limitations of their read and write speeds become evident, resulting in updates that can take nearly an hour to complete.

Whether you’ve chosen to upgrade because of the improved read/write speed, or you’ve simply arrived here because the hard drive has failed, or an update has been interrupted, read on!

First, you’ll need a new solid state drive with a minimum of 80 GB of storage capacity, as well as an IDE to SATA adapter. The 120 GB OWC Mercury Pro Legacy comes with all necessary components. (Note that, although Richard used this, and it fit neatly into the system, I installed mine using a 120 GB Patriot Burst drive and Kingwin SATA to IDE adapter, so my pictures differ. His OWC product is a neat, all-in-one solution.)

Installation

  1. Remove the control unit from the piano by first unscrewing the parallel port connector using the two flat blade nuts on the sides of the port.
  2. Unplug all the cables and then carefully unscrew the control unit from the piano. It is very heavy, so carefully lift it down and turn it over.
  3. Unscrew all the black screws on the top face of the control unit that would normally be against your piano. This surface is the unpainted, silver surface.
  4. Carefully remove the two plugs from the hard drive. Unscrew the drive underneath using a Phillips screwdriver with lots of pressure taking care not to strip the screws.

The original spinning disk, at rest

At this point, you’ll need to copy the contents of the old hard drive into an image file. If your old hard disk does not work, please contact me for a fully updated v4.26 Mark IV hard disk image, and include your serial number.

To create your own backup on Linux or Mac, you can use the dd instruction in a terminal. Note that you’ll need to adjust /dev/sdX to be whatever the location of your hard disk is! On Mac, this will be similar to /dev/rdiskX.

sudo dd if=/dev/sdX of=bckup.img status=progress

Specifications for the original disk

Take your new SSD drive and plug it into your computer using a USB adapter such as this one. Unplug the red adapter on the back of the hard drive and then plug the following cables into the hard drive itself.

The drive should mount to your Macintosh or Linux computer.

Using the terminal, type in “diskutil list” command shown as below, then press “Enter” to list all the disks in your Mac computer. Take down the number of your USB drive. Here assume that the USB drive number is “2”.

Type in the following command, replacing “#” with your USB drive number. diskutil unmountDisk /dev/disk#

Then press “Enter” to unmount it.

Type in the following command. On Mac, replace “/path/to/your.img” by dragging the image file from the Finder into terminal. On Linux, type the path. Then press “Enter” to burn the IMG image file to the USB drive.

sudo dd if=/path/to/your.img of=/dev/rdisk2 bs=4k status=progress

Note that, on Windows, you can burn ISO files over USB using Rufus.

Unmount your USB drive, put the red adapter back on, and screw it into your Disklavier top assembly. You will need to use the middle screws to give it enough room to be able to have the cable attached and close it. Voilà! You have now updated your system and changed your drive to solid state!

My Patriot Burst SSD, mounted directly to the top plate.

I was able to line up the Patriot Burst drive with the cooling holes on the upper plate such that I could screw it directly in place

Conveniently Rename all ESEQ Files for use with EEXPLORE and PIANODIR.FIL

This Java program will recursively rename .fil files in the specified directory, ensuring they follow the naming convention described, and convert all filenames to uppercase. If, for instance, you have twenty albums, direct this program to run in their parent directory, and all the albums in subdirectories will be corrected.

This script renames all files to be all-caps, and to have names exactly eight characters long. It will add filler characters if necessary. It will make sure they’re unique by incrementing a counter. These appear to be the most important factors in making files identifiable to early Disklaviers, based on my experience and those of commenters.

At this point, you’re ready to use EEXPLORE.EXE to move through each directory and prepare your PIANODIR.FIL. At a future date, I’d like to automate this.

Make certain to back up all files before running this! I can’t guarantee perfect results for all combinations of names and strings of characters.

After you run RenameForDisklavier, you’ll see this box. Select the folder containing all of your .fil files, and it will do the rest.
The renamed .fil files, demonstrating proper length, numbering, and capitalization.

Nalbantov Drive Bay Insert

I recently installed a Nalbantov USB drive using an updated version of the insert and mount that I designed.

You can see based on the pictures below that the Nalbantov slim is slightly too small to fill the entire cavity left by the original floppy disk drive. Additionally, there are no mounts of any kind to hold the Nalbantov in place. This insert solves both problems: The drive screws into the insert at just the right distance and depth, and the insert also buffers the area around the outside of the drive.

I’ve included several pictures of how it fits into the case below. If you’d like to 3D print your own, I can provide the CAD file in 3mf format, gcode format, and STL format. If you’d prefer to order one from me, ready printed, you can order a Nalbantov Drive Bay Insert ready-made here.

The insert installed over the screw positions of the original floppy disk drive.
I 3D printed the spacers at 50% infill so they’d be fairly solid. These spacers allow you to use the original machine screws that hold down the OEM floppy disk drive, which is a huge advantage. No visits to the hardware store!

Disklavier HQ100/MX100II Solenoid Failure

I have a customer who recently experienced an issue with his Yamaha Disklavier HQ100. The HQ100 is the Japanese version of the MX100II. He primarily uses this instrument over MIDI, and finds the Disklavier quite useful.

This discussion should apply to other models of Yamaha Disklavier. The Yamaha MX100A and MX100B use different solenoids, but the designs are similar.

The symptom was that, when started, the Disklavier would play a single key at maximum velocity. It would sustain it for several seconds before releasing. Additionally, the system emitted a noisy whine while powered on. This noise turned out to be a failed power supply, and a replacement resolved that particular symptom. However, despite this, the system would still play one single key after powering on and then fail to respond to any subsequent commands.

The key that was playing was a low D (specifically, D1). I disassembled the instrument and inspected the solenoid for that key. The solenoid assembly was exuding an enormous amount of heat. The burned coil can be seen below.

There was also considerable damage to the inside of the coil assembly. The solenoid was unable to move fully back down into the rest position, as the assembly was badly melted.

I replaced the solenoid; however, this did not solve the problem. The new solenoid would activate and rapidly heat up. At one point, F1 activated instead of D1, adding an interesting twist.

I disconnected CN201, meaning that the Drive C solenoid drive board was still receiving power from the Disklavier but wasn’t receiving a signal. This isolated the problem to the Drive C board. Replacing the solenoids made it clear that they weren’t the issue. Therefore, the problem had to be somewhere on the PCB below:

I traced the circuitry back from the solenoid. In the image above, the D1 key solenoid is plugged into CN207. I verified that diodes D213-D224 were all behaving correctly (between 400-600 mV forward, and 0 back). Eventually, I was able to trace the behavior to the transistor array. My current theory is that the transistor array failed, causing current to run to the solenoid continuously. The solenoid eventually melted the plastic sleeve. This would also explain why the F1 solenoid activated in place of the D1 during later tests—both key solenoids are attached to the same failing transistor array.

This is the failed component. In the MX100II, this transistor array (2NTH3L20 / Yamaha #VB293700) has been discontinued. However, the equivalent array is NX551020 available through Digikey.

DKC-850 Bracket

I’ve had a couple of people reach out over the years looking for the bracket that supports the Yamaha DKC-850, otherwise known as the “hanger assembly.” The part number for this is, according to Yamaha, WT79210. Unfortunately, it’s been discontinued. However, you can use the hanger assembly for the Yamaha DKC-800, which is a perfect fit for the DKC-850.

The part number for this hanger assembly is ZE383601, and it’s readily available.

Creating PIANODIR.FIL for ESEQ Files

Yamaha’s earlier floppy disks use the propriety ESEQ format. They also use a primitive form of copy protection, where the first sectors of the disks are missing. This means computers identify the disks as corrupt, requiring you to use specialized software to back up your Disklavier disks. In place of these sectors, Yamaha uses the PIANODIR.FIL file, which serves both as a file table and a song index.

Converting MIDI files to ESEQ

If you want to use MIDI files with your older Disklavier, you can, but you have to convert them to ESEQ first. There’s software to do this conversion. You can either get it from http://www.carolrpt.com/MIDItools.htm or you can download the whole DKVUTILS suite from my MEGA drive.

Once you download DKVUTILS.ZIP from my site or theirs, you’ll need to extract it. The program that converts MIDI files to ESEQ files is MID2ESEQ.EXE. This program runs only on Windows, and does not seem to run with emulators. Reach out to me and I can assist with conversion.

Using MID2ESEQ, just drag and drop MIDI files into the window.

If you have a Yamaha that’s capable of playing ESEQ only, you might also need to create a PIANODIR.FIL index. Continue scrolling down for instructions!

Creating a PIANODIR.FIL using ESEQ Explorer

If you are creating a floppy disk for use with an earlier ESEQ only Disklavier, or if you’re preparing ESEQ files for transfer to a Nalbantov USB stick, you might have to create your own PIANODIR.FIL.

Note: Please note that the filenames should be strictly eight characters long, have no spaces, and be entirely uppercase, including the FIL extension BEFORE following the process below. If you don’t do this, some pianos will be unable to read the files. I’ve created a program to conveniently rename all your .fil files at once, which is especially helpful if you have numerous albums.

You’ll need the DKVUTILS suite downloaded. You can download DKVUTILS from my MEGA drive or from http://www.carolrpt.com/MIDItools.htm.

First, put all the ESEQ files you’ve created in a folder together. The DKVUTILS suite includes a program called ESEQ Explorer. Once you open the program, select the directory you’ve stored your ESEQ files in (make sure they’re properly renamed according to the above instructions, or use my program to rename them for you). You’ll see a screen like the one below:

Note that, if you don’t currently have a PIANODIR.FIL, there will be a red X in front of it. That means it’s not present. Right-click on it and select Create Index. The contents of that folder are now ready to be added to a disk using the Nalbantov tools. If your file names are too long, you’ll see them renamed with ~ symbols. In my experience, this is a program, and indicates they likely won’t read in the piano. Make sure to rename them appropriately first.

I’ve also quoted the text file from the DKVUTILS.ZIP tool below, since they’re informative:

Yamaha Disklavier discs are always on Double Density (2DD) media, High Density (HD)discs, which are more common nowadays, will not work. Furthermore, they are formatted to 720 Kbytes not the default of 1.2 Mbytes. The original discs are copy protected. This has been achieved by placing invalid data on the first sector. As DOS and Windows always refer to this sector to check out a floppy, they will report that the discs are bad. The Yamaha machinery ignores the first sector, so it reads them normally.

The music files on a Disklavier disc have the extension .FIL. They are frequently identified with titles like PIANO001.FIL, but sometimes they have names similar to DOS like MUSIC1.FIL. In addition to the music files, there is an index file on the disc. This contains a list of the active music files on the disc, their titles, and pointers to their position on the disc. The index file is always called PIANODIR.FIL and always has a size of 6 Kbytes. In order to set up a Disklavier disc to function on a Disklavier, you must first copy the music files onto it in Disklavier format (ESEQ) and then run the ESEQ EXPLORER program to build the index file.