Deskmate Music to .HDS syntax converter.

This program will let you convert most .SNG files created using Tandy's Deskmate Music program, to a text syntax called '.HDS'.  Then, you can download and use my 'Virtual piano, guitar, multi-instrument simulator/note mapper' (see below for link) to play them using the richer instrument sounds of today's soundcard midi capabilities.

This was written by W. Baldwin, with help from tvdog (J. Hayes).

Installation:
This is a Visual Basic program.  Visual Basic programs require that certain files be present in the user's Windows\System directory for them to run properly.  These are called 'Run Time' files.  In most cases, these files are already present on the user's system, and so no further action is necessary.  In a very few cases, however, some users may find that they cannot run this program on their system, and may receive one of various error messages if they try to do so.  This is caused by the fact that either these files are *not* present on their system, or, the files are there, but the version #'s are old.  This can be solved by downloading and installing the latest 'Run Time' files from Microsoft (currently at Service Pack 5), at: http://www.microsoft.com/downloads/release.asp?releaseid=28337 .  It's not a large download.

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

There are many .SNG files that you can download and convert from tvdog's site: http://www.oldskool.org/guides/tvdog/deskmate.html

The limitations are the same as Deskmate, including that you can have nested Repeated sections (up to 10), *except* that a nested Repeat section cannot have any alternate endings.  Only the lowest level Repeat section can have alternate endings.  I don't think any Deskmate songs even *have* nested Repeat sections with alternate endings, so this is probably no big deal.  The workaround, in case you *do* happen to find one, is just to remove the nested [Repeat Xx] line and copy and paste that section, substituting each alternate ending.

My 'Virtual piano, guitar, multi-instrument simulator/note mapper' will play the converted files through your soundcard, using rich grand piano, or 127 other instruments.  Hey, I'm a big fan of Tandy's 3-voice sound, but it's no match for today's Soundcard Midi capabilities.  You really should hear these songs after they're converted, including 'Bridge Over Troubled Water', 'Desperado', and all the classical, ragtime, pop, and other pieces originally created in Deskmate.  The link for the player is http://members.fortunecity.com/whb11/Midi/MyMidiPlayer.htm.  Make sure you read the readme.txt for that program before using it.  The latest version of *this* program is also on that same site, towards the bottom.

Addenda:
According to the Deskmate manual, the # of Alternate endings in a Repeat section has to equal the # of times the section is repeated, however, I found that the following 3 songs each had a Repeat 2x section, but only 1 Alternate ending for each.  You have to do the following, after converting from .SNG to .HDS, in order to play the songs in my Instrument simulator/player (You can open and edit them in Notepad):

In AllaTurk.hds, insert [Ending 2] after the [Repeat End] in Bar 64
In Minuet_G.hds, insert [Ending 2] after the [Repeat End] in Bar 16
In Polonaze.hds, put a semicolon in front of  [Repeat 2x], [Ending 1], [Repeat End], and copy and paste all note lines from the beginning to the [Bar 16] line, to the end of the song.

(Actually, those 3 songs are already fixed and bundled with my Instrument simulator/mapper, so you don't really need to fix them.)

If you're familiar with those pieces, you may have different ideas about how to fix them, but I believe these are correct.

Then, the songs will play correctly in my player.  There may be other songs that have this anomaly, that I haven't yet tested, but if you download and play them in my latest player, version 5.3 or better, it will warn you and then you can fix them the same way.

Also, a [Repeat Xx] line can't follow right after another [Repeat Xx] line.  In this case, you have to just remove the 2nd [Repeat Xx] line and copy and paste that section as many times as needed.  I noticed this when converting Xmas.sng.

Version history:

1.04 was changed to also write out the other .SNG data that previous versions ignored.  The additional data is:
1) Instrument changes.  These are numeric and can range from 1 to 32 I think.  The first version of Music.pdm (bundled with Personal Deskmate 2 on the 1000HX) assigned these instruments to the numbers: 1 - Wood flute, 2 - Jazz piano, 3 - Fantatone, 4 - Banjo, 5 - Cello.  The 2nd version of Music.pdm, which was bundled with later computers assigned these numbers: 1 - clarinet, 2 - piano, 3 - bells, 4 - cello, 5 - baritone (horn), 6 - banjo, but #6 thru 32 can be re-assigned to other instruments using .SND files.

2) Instrument dynamic changes.  These will be pp, p, mp, mf, f, ff

3) Score markers.  These are markers that the person could add to the score for their own purpose and can range from the characters A to Z.

1.03 changed how the song tempo is handled.  Previously, it would read thru the file until it found a 'Tempo' message, and then set the 'Pace=' field in the heading of the output .HDS file accordingly.  This wasn't really a very good method, because some songs start with the Deskmate 'default' tempo of 100 quarter notes per minute, but then change to a different tempo later in the song.  But, I had done it this way because previously, my Instrument simulator/player could only play a song at one tempo.  But now, starting at version 5.4, my Instrument simulator/player *can* change tempo's during a song, so *this* program was then changed to, instead, always make Pace = 100 in the header, and then the simulator/player will change to a different tempo as it's playing, when it sees tempo changes (such as '[Tempo= 1/4 = 85]') under the '[Notes]' section (In this case, it's saying that the *new* tempo is equivalent to 85 quarter notes played per minute).

(At the beginning of the song, the 'Pace=' field means that the beginning tempo is equivalent to that many 'Single Beat Note=' notes played per minute.  The Deskmate default is 100 quarter notes.)

For the same reason as above, this program will also always set the header fields 'Beats Per Measure' and 'Single Beat Note' (Time signature) equal to 4 each, because those are Deskmate's defaults, and can also change during the song.

Of course, because of these changes, songs converted with this version, 1.03, can only be expected to play at the correct tempo if you use version 5.4 or higher of the simulator/player.  So, you need to download that to play them.

By the way, you can change the song speed to anything you like by editing the .HDS file in notepad.

1.02 fixed several problems.  When the user selected the 'Convert all files in directory' checkbox, previously, when looping and creating each output file, the program wasn't properly initializing some variables.  Also, the default tempo that was used before was 60 quarter notes per minute, but it should have been 100 per minute.  Also, the Key and Time signatures and tempo changes are now added to the output .HDS files.  Also, a new function was added to let you raise or lower the entire song by one or more octaves.  Since the key signature of each song can now be known, there is no more need for the 'Use sharps' and 'Use flats' option buttons, so those were removed.

If you've converted songs before, you should re-convert them with this new version.

1.01 added a comment to the .hds file that specifies the original .SNG file name.  For instance, when converting Bach.sng to, say, 'Two Part Invention in F Major.hds', it would add this comment:
;Converted from BACH.SNG
