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

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

MMD > Archives > March 1996 > 1996.03.17 > 01Prev  Next


Introduction and Decoding Encapsulated MIDI Files
By Ron Yost

- - - - - - -

Jody,

If this is too long, feel free to snip it. These are my experiences and may not be of much help to anyone else? Or, maybe you could snip the Wincode instructions and put them on your ftp as wncdins.txt or something similar. If anyone has problems getting Wincode, I'd be happy to snail-mail them a disk containing it.

P.S. Yes, I do know Mike Ames and Dave Wasson. And, I got the address
     for the list from a post by Dick Beery. Thanks a bunch!

 [ Ron, Thanks for the long, detailed message below.  I'm including
 [ all of it, and will excerpt it for the "not yet written" FAQ.
 [ Thanks for taking the time to write it.
 [ Jody

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Hello all,

I'm Ron Yost and this is my introduction. I'm from Paso Robles, California, and while I appreciate all automatic musical instruments, my true love is Fairground Organs. I've built a unique optical reader for producing MIDI files from any organ music book (thru 96 'positions'), keyed or keyless, which I'll discuss more if anyone's interested. <Or, just send me your books if you want them transferred to MIDI :-)  >

I'm also working on my own MIDIed Fair Organ, and have experience building pipes and electro chests (using Peterson pipe valves - a tale in itself).

For now, here are some items about uudecoding, MIDI and MIDI files.

For the most complete info on uudecoding, if you have usenet access, go to the group <news.answers> and get any of the several FAQ's on PICTURE decoding (JPEG FAQ, etc). They cover everything necessary concerning uudecoding on any platform and where to get the programs.

I use Win for Workgroups 3.11 and have found 'Wincode' to be an excellent coder/decoder. It's relatively 'smart' and can sort through a uue file until it finds what it needs (as opposed to dumb DOS decoders, which usually require you to manually strip out all extraneous stuff). Wincode can sort through a complete 'edition' of these lists and ignore everything until it finds the uu file Jody tacks on the end. It does require a little bit of configuration so it knows what to look for among the various formats, though. If you haven't set its 'filter' properly, it will return a 'Nothing to decode' error message (but it won't crash!).. Then, just pick another format and try again.  And, it's FREEware!

- - - - - - - - - - - - - - - - - - - - - - - -

Some ftp sources for Wincode:

ftp://ftp.mindspring.com/pub/software/windows/decode/wncod261.zip ftp://ftp.computek.net/pub/ibm/uucode/wncode26.exe

(Version 261 is slightly newer than 26, but both work well. I don't know if they work on Win95 though. Also, the vers. above don't come with a help file! You have to send in $5.00 to get that, but there's a text file included that will tell all about Wincode, so it's a minor nuisance.)

- - - - - - - - - - - - - - - - - - - - - - - -

Configuring 'Wincode' for Jody's BASE64 MIME MIDI's:

    1.  Save the ENTIRE automatic music digest containing the .mid (or .zip)
        as a text file. I use Eudora Lite for e-mail, and it saves e-mail
        with an .mbx extension, which is a text file. <It also automatically
        decodes MIME's when I retrieve the digest from the server, so I
        usually don't have to bother with much of what follows.>

        --> Important: You can use almost any extension, but DON'T save the
            file with the same extension it will have after decoding! If it
            will be a .mid file, don't use .mid as the extension on your
            un-decoded text file!

    2.  Open Wincode.

    3.  Choose 'Options-Configuration' from the menu.

    4.  Choose the 'Decode' tab.

    5.  In the box titled 'Decode Extensions' enter whatever extension you
        save the automatic music digest file to. (.txt, or whatever you chose).

    6.  Select a 'Decoded File Directory' so Wincode knows where to put the
        decoded file. < I just save it to my 'automus' folder in Eudora, where
        I stash all the digests.>

    7.  In the 'Code Type' selection box, click on 'BASE64 (MIME). <It
        works better than 'Auto Detect'>

    8.  Click, and a dialog box will appear asking you to choose either
        'MIME Compliant' or RAW BASE64'. Choose 'MIME Compliant'.

    9.  Click the 'OK' box to save your configuration and get back to
        Wincode.

    10. Click on the 2nd icon 'Decode a Data File' and choose the path to
        your file. <While your at it, if it will be a .zip file, you can check
        the little box 'UNZIP After' and it will be decoded AND un-zipped all
        at once! VERY handy!>

    11. When you find it, click on 'ok' and bingo, in a flash Wincode will
        search out and decode the file from within the digest. And that's it!

- - - - - - - - - - - - - - - - - - - - - -

BTW, for a nice search engine of all of the world-wide shareware file archives, I like:

     http://www.acs.oakland.edu/cgi-bin/vsl-front/QuickForm

It will find most anything and give you several options to ftp from, including reliability of the sites. Mind you, I live on the West Coast of the U.S., and that's where this site is, so it may not be as speedy for you.

- - - - - - - - - - - - - - - - - - - - -

Some musings on MIDI and MIDI files:

If you want to learn all about the nuts-and-bolts of MIDI and the MIDI spec, go to:
               http://www.servtech.com/public/jglatt

Be prepared to spend some time at this site! I downloaded everything and wound up with over 100 pages of very good information, all explained in very understandable terms. Jeff Glatt (like Jody) knows MIDI!

- - - - - - - - - - - - - - -

About MIDI files: A lot of confusion over MIDI files happens because certain platforms and programs don't *strictly* adhere to the IMA MIDI file specification. Especially onerous are Macintosh sequencer programs. Most of them PREpend a 128-byte 'Mac Binary Header' to the file, thus making it incompatible with PC's. If you know what you're doing, you can use a hex-editor to strip off the 'extra' 128 bytes at the beginning and you'll have a Standard MIDI file.

BTW: In Windows, you can load a MIDI file into 'Windows Write' to inspect it to see if there's anything before MThd. You can't edit it in write, and *don't save it* from Write or you'll *ruin it* because MIDI files are *binary files* and you have to use a hex-editor to fiddle with them.

A standard MIDI file MUST begin with the ASCII characters "MThd" (without the quotes). Anything before that is useless and non-standard. Added to that, many sequencer programs don't even SAVE MIDI files properly! This applies to all platforms, but, again, seems worse in Macintosh sequencer programs - and these are usually high-end 'professional' programs.

Cakewalk Pro Windows does funny things to MIDI files, too. It sometimes doesn't save the song-length chunk properly, and when loaded into another program it's seen as a 0-length song with no measures! All the track information is loaded, but you have to reset the song length to however many measures it contains. If you're transferring a Cakewalk MIDI file (not a .WRK file, which, of course, is useless outside Cake) to another platform, jot down the total number of measures in the song *while* you have it loaded in Cakewalk (plus 5 measures or so to make sure the end doesn't get chopped off); it will be too late later and you'll have to guess! Cakewalk doesn't save lyrics properly, either (sometimes not at all). And, if you save a file with some muted tracks and re-load it all tracks appear un-muted! It does this sporadically, which I don't understand at all.

These programs all seem to do well with their own, proprietary format (of course) but do strange things to supposedly 'Standard' MIDI files. So watch out! You may have to get pretty good at hex-editing if you intend to swap MIDI files across-platforms. It's a shame, and we shouldn't have to deal with this when we're paying top-dollar for programs, but there it is.

Well, I've used up enough bandwidth for now. Many thanks to all of you for all the useful information you've contributed to this list in the past, and many thanks to Jody for maintaining it!!!!  'Till later.

Ron Yost <ryost@fix.net>
646 Bolen Dr.
Paso Robles, CA 93446-2760

 [ Ron, Great stuff.  I checked out Jeff Glatt's Web page, and the
 [ stuff there is quite detailed and on quick glance looks like its
 [ "correct".  I say that because when I started getting interested in
 [ MIDI (about 5 years ago) there was a lot of mis-information on the
 [ Internet along with the correct stuff.
 [
 [ Its interesting that you point out that some MIDI Sequencers don't
 [ load and save "Standard MIDI Files" correctly.  When I started writing
 [ MIDI programs (on a NeXT '040 Cube), I quickly discovered that there
 [ was a lot of broken stuff out there.  Mike Ames also built a book reader
 [ and I set off to write a "Mortier Emulator".  The book music was recorded
 [ with each "position" generating a note-on or note-off event whether that
 [ position represented a note or a "stop" change.  I'd convert the files
 [ to something that could be sent to a Roland Sound Canvas.  The Sound Canvas
 [ doesn't make a lot of sounds that sound like Mortier pipes, but its wasn't
 [ bad (and I can't afford my own Mortier).  The output stream to the
 [ Sound Canvas was very "thick", and it often crashed my NeXT.  I was given
 [ an advance (Beta) release of NeXT's new operating system because I had
 [ found a way to break the old driver.
 [
 [ Over the last 5 years I have written a bunch of MIDI processing programs
 [ for Mike and David.  I've seen lots of corrupt MIDI files and its still not
 [ unusual for David to call me up and say "I just uploaded a broken MIDI file
 [ to foxtail, can you tell me whats wrong with it?"  I can tell you that
 [ a number of the products out there were written with disregard to the
 [ principal of "defensive programming".  To my embarrassment, David has
 [ found a file or two that broke _MY_ MIDI file parser.  Test.  Test.  Test.
 [ Pay attention to things that don't work as expected NOW, while you still
 [ have a test case!  We have a "laboratory" of self-contained disk players,
 [ MIDI sequencer software, PC's, PC MIDI interfaces, and gizmos that process
 [ MIDI signals.  The end result is generally to drive an antique musical
 [ instrument.  We continue to have "fun" with incomplete implementations,
 [ inconsistent or irreproducible results, hung notes, etc.  Clearly
 [ we are doing more thorough testing than some of the equipment vendors.
 [ If the software in avionics was this bad...  Hmmm...  there _IS_ a
 [ certain twin-engine European fly-by-wire aircraft I will not fly in.
 [
 [ Ron, welcome to the group.
 [
 [ Jody

(Message sent Mon 18 Mar 1996, 00:03:03 GMT, from time zone GMT.)

Key Words in Subject:  Decoding, Encapsulated, Files, Introduction, MIDI

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