Mechanical Music Digest  Archives
You Are Not Logged In Login/Get New Account
Please Log In. Accounts are free!
Logged In users are granted additional features including a more current version of the Archives and a simplified process for submitting articles.
Home Archives Calendar Gallery Store Links Info

Spring Fundraising Drive In Progress. Please visit our home page to see this and other announcements: https://www.mmdigest.com     Thank you. --Jody

MMD > Archives > July 1996 > 1996.07.21 > 03Prev  Next


MIDI to Pianocorder Software
By Mark Fontana

Subject: MIDI to Pianocorder software

In Digest 96.07.15, Shin Ohkura <ohkura@ti.com> wrote:

> One of the candidate projects I have is to build a reader for the QRS
> rolls which will drive directly my piano with Pianocorder equipped with
> cassette. I have not started that yet. Something you are working out
> with optical sensor is what I may be thinking of. The next step might
> be MIDI but I am not yet familiar nor ever tried that yet.

This is an interesting project. I did a search on the web using the search engine http://www.excite.com and found several descriptions of projects involving interfacing the Pianocorder system to a computer. Most were done in the early 80's towards "artistic" purposes (ie. the creation of non-traditional piano performances, etc.)

I have been working on a similar but software-based project: a DOS command-line utility for converting one or more MIDI files into a digital audio .WAV file suitable for playback on the Pianocorder. The program is called MID2PC.

The Pianocorder system is controlled by a series of 128-bit data frames recorded at a rate of approximately 35 frames per second on double-speed cassette tapes. MID2PC reads one or more standard MIDI files, generates a suitable encoding of Pianocorder data frames, and produces a .WAV file of the appropriate audio signal to drive the Pianocorder. If more than one MIDI file is specified, MID2PC creates a composite .WAV file containing each of the individual songs with two seconds of silence between songs.

By default, MID2PC produces a half-speed .WAV file. This makes it easy to record the .WAV file onto a cassette tape using a standard cassette deck. (Since the .WAV file is half-speed, recording it to tape at this speed will give the correct results when the Pianocorder plays the tape back at double speed.) MID2PC's half-speed .WAV files are 22050 Hz, 8-bit mono, requiring about 1.26 Mb of disk space per minute (since this is half speed, we need 2.52 Mb of space per minute of actual music). If we are recording onto a standard 90-minute tape (45 minutes per side, providing 45/2 = 22.5 minutes at the Pianocorder's speed), we need approximately 57 Mb of disk space to store the .WAV file.

MID2PC can also produce normal-speed .WAV files (44100 Hz, 8-bit mono). These files may be used for mastering new Pianocorder cassettes, and they are also suitable for playback directly on the Pianocorder.

In fact, it is possible to insert one of those CD-to-cassette adapters into the Pianocorder's tape deck, connect the adapter to a PC soundcard, and play the .WAV file directly to the Pianocorder (thanks to list member Steve Cole for trying this out!). This eliminates the step of recording to tape entirely. With a computer connected to the Pianocorder in this manner, it would not be difficult to write a batch file to play MIDI files on the Pianocorder directly.

I have also developed software to convert Pianocorder cassettes into DOS data files. Files in this format have the extension ".PCD" (no relation to PhotoCD), which stands for PianoCorder Data. MID2PC is capable of generating .WAV files from both .PCD files and MIDI files. This makes it possible to store one's entire Pianocorder library on a PC in the form of .PCD files (about 1 Mb per tape, only ~120k compressed with PKZIP), producing .WAV files to play directly on the Pianocorder using a CD-to-cassette adapter as described above.

Some original Pianocorder cassettes are nearly 20 years old and the magnetic tape is beginning to deteriorate. The computer-based solution described above will make it possible to continue using the Pianocorder system even after the original tapes have deteriorated beyond playability. A tape produced from a .PCD file using MID2PC will be an exact digital copy of the original Pianocorder cassette.

Since the Pianocorder is essentially a solenoid-driven version of a split-stack reproducing piano, the velocity information must be reduced to treble/bass intensities in converting from MIDI to Pianocorder format. However, this process is simplified considerably since the Pianocorder can immediately play any of 32 possible velocity levels (no need to worry about the intensity and slow/fast crescendo systems used in pneumatic reproducing pianos). The Pianocorder is limited to its 32 intensity levels, while MIDI has 128 levels and pneumatic reproducers have (in theory) an infinite number of levels.

In converting the polyphonic MIDI velocity levels to treble/bass Pianocorder intensities, MID2PC takes the average velocity of all notes striking in the treble/bass ranges during a particular Pianocorder frame. This is the simplest approach to this problem, but it gives surprisingly decent results (the frame rate is high enough that the number of notes striking during a given frame is usually very low). I may attempt to improve the expression translation in future versions of the software.

The Pianocorder has much coarser timing resolution (about 35 updates per second) than most MIDI files (which are often accurate to 1/200 of a second or better). MID2PC ensures that even very short notes in a MIDI file will strike on the Pianocorder. But there's no way to get around the Pianocorder's low timing resolution without substantially modifying the circuitry. MIDI files with rapid ornamentation may not translate well to the Pianocorder format.

Since I do not own an actual Pianocorder system to use with MID2PC, I developed the program by converting the new Pianocorder data back to MIDI (using my Pianocorder-to-MIDI software), playing the file on a Kurzweil MicroPiano sampled piano module, and comparing the quality of playback with that of a commercially-produced Pianocorder tape. During the past few weeks, MID2PC has been tested by several Pianocorder owners on the net, and the results are apparently quite good.

It appears that MID2PC is good enough for public release. Since I need to get back to work on my other projects, I've decided to release MID2PC as shareware, available for download at:

"http://www.cis.ohio-state.edu/~fontana/mid2pc/"

If anyone has comments or questions, do not hesitate to contact me.

I would like to thank the following list members for their help with my Pianocorder projects: Roger Stern for providing me with the necessary Pianocorder technical documentation; Will Dahlgren for his technical insight and description of the MC-2, the hardware MIDI-to-Pianocorder interface he developed; Joe Linn and Steve Cole for testing the software; and (last but not least) Jody for doing a superb job with the List, making this collaboration possible.

Mark Fontana fontana@cis.ohio-state.edu

[ Editor's Note:
[
[ Mark,
[ And _YOU_ are to be thanked for sharing your work with us.
[
[ Thanks,
[ Jody


(Message sent Mon 22 Jul 1996, 02:54:57 GMT, from time zone GMT-0400.)

Key Words in Subject:  MIDI, Pianocorder, Software

Home    Archives    Calendar    Gallery    Store    Links    Info   


Enter text below to search the MMD Website with Google



CONTACT FORM: Click HERE to write to the editor, or to post a message about Mechanical Musical Instruments to the MMD

Unless otherwise noted, all opinions are those of the individual authors and may not represent those of the editors. Compilation copyright 1995-2024 by Jody Kravitz.

Please read our Republication Policy before copying information from or creating links to this web site.

Click HERE to contact the webmaster regarding problems with the website.

Please support publication of the MMD by donating online

Please Support Publication of the MMD with your Generous Donation

Pay via PayPal

No PayPal account required

                                     
Translate This Page