Completely recoded from scratch, I present the newest incarnation of the MML Editing Tool. It is a major upgrade from the old MML Editing Tool, and now doesn't take any (okay, nearly as many)
shortcuts when it comes to editing. In particular, the old tool was sloppy and used the single most basic form of parsing imaginable, which led to great things like the drum fixer not working if you dared to specify a note length with '=' or other stupid stuff like that. No more!
(For those of you who don't know, the MML Editing Tool is a tool I made some time back to make some of the tedious parts of porting a bit less tedious by simplifying commonly carried-out commands)
This keeps nearly all the features of the old MML Editing Tool, fixes all the dumb bugs it had, and adds on a ton of new features:
1. Label looping is now many times more powerful, and is no longer a text-based search and replace. This caused many problems, such as white space and new lines getting in the way as well as octaves. Consider, for example:
If you tried to loop "c16c16" using the old tool, you would fail, as there is a new line separating the last two (gasp!). This will no longer happen; in fact, you could select the bottom two notes and loop those if you wanted to. Regarding octaves,
will now be looped correctly regardless of what octave changers you select; you no longer have to worry about balancing octaves when label looping.
Another problem with the old system could be caused by something like this:
Because those two notes are completely different, it should not be possible to loop them. This version fixes this by paying attention to a note's octave. Also consider:
By the fourth line, the octave should be set to o2, not o3. The old parsing system would loop this as such:
Which results in the final b16 being on octave 3, not octave 2 (Addmusic only parses what is in a label once, so the octave down directive does not change the octave in any loop calls). The new system corrects this, automatically correcting any octave errors that result from looping or transposition. Speaking of which...
2) Transposition got a major upgrade as well. The old tool was only able to increase or decrease notes by steps of 12, by which I mean it searched for every instance of o# and just increased or decreased the #. Now, notes can be increased or decreased by any number of semitones, and the program will automatically adjust everything else to compensate.
3) The Drum Fixer now cares about octaves. Before, "o2 c16 o3 c16" would, like the Label Looper, have both c16s be treated the same. Constructions such as this are now differentiated, and the program will ask you for a different instrument for each one.
4) Volume adjustment got a minor, but much-needed tweak. Now instead of adding or subtracting a value to every volume command, you specify a scaling value and every volume command is multiplied by that. This will keep volumes consistent.
5) As a minor change, the program now detects TinyMM-generated files and automatically converts them without needing to be prompted to for every file.
From here on out it's going to get a bit wordy. But read it all; this is going to have to serve as your readme for now.
So now for the totally new stuff. First of all, the text is now separated by channel instead of all being lumped together. Just select the channel you want to work with, and you'll no longer find yourself distracted by all the other text you don't want to be worrying about (the Label Looper still searches for matches on every channel, however). From the Edit menu, you can select Copy All or Paste All to quickly copy an entire song to or from somewhere else. You can also select HTML-Safe Copy All to copy text that won't mess with HTML parsing to the clipboard (though text like that will be invalid most everywhere else).
Because this tool actually parses the text files, it can warn you about potential errors that may occur when you go to insert it into Addmusic. Any time the View File Errors button flashes red, you can click on it for a list of potential errors. Note, however, that while the program tries to be as forgiving as possible, things that cannot be parsed, such as malformed commands (things like y&,^ or something) will simply be dropped (though an error will be produced telling you about it).
One of the biggest new features, however, is a comprehensive guide that will appear when you place your cursor before a command. When you do this, the right side of the window will display all of the command's parameters, their names, and, as tool tips, what they do. You can even edit those parameters simply by typing them in. This also works with hex commands, so there's no need to bring out the calculator every time you want to insert some ADSR or echo into your song, you can't remember what the order to command X is, or whatever. Just place the cursor before any command and, with the exception of note, channel, and octave commands, you can edit anything there you see fit. Note that you must be in Token Editing Mode, not Text Editing Mode, for this to work.
The program can be in any one of two basic modes at any time: Token Editing Mode and Text Editing Mode. Token Editing Mode edits everything based on their individual components, whereas Text Editing Mode edits things based on just their raw text representations. You'll usually want to be in Token Editing Mode most of the time, as the vast majority of features are disabled in Text Editing Mode. The latter, however, is useful if you're going to be inserting large amounts of text, as typing in Token Editing Mode can be a bit cumbersome (also note that Text Editing Mode must be on in order to edit note data). Note that when you attempt to type anything in Token Editing Mode, your text will be intercepted and placed into a text box at the top of the window. When you are done typing, hit ENTER, and the program will parse what you typed and insert it (if there were errors, you will be notified just like normal parsing). Note that you cannot copy, cut, or paste in Token Editing Mode; you must be in Text Editing Mode for that.
As you move the cursor around, the bar at the bottom of the window will tell you how far you are into the song, measured in ticks (a generic measurement. A whole note is 0xC0 (192) ticks.) You can use this to determine where in a song an intro goes, or how long the longest channel is. Note that this is guaranteed to be inaccurate if there are any loops before the cursor position; this will hopefully see a fix shortly. If you select multiple tokens, this will change into a measurement of how many times the selected tokens appear in the song. Use this to determine how beneficial a label loop that uses this data would be (as reference, a loop call takes 4 bytes and a note usually takes 2 bytes, so it is almost always beneficial to loop).
Finally, if you right click in the text box and select Insert Hex Command, a window will appear that gives you a list of all available hex commands. Double click one to insert it, and then edit its parameters.
Those are the big things, anyway. Screenshot time!
Note that there are likely to be many, many bugs, as I haven't had nearly as much time to test this as I would like. So if you happen to find any, please report them to me, and I'll get on fixing them. Similarly, if you have any new ideas for features, I'd be glad to hear them.
Thank you, and enjoy C3!