Banner
Views: 852,303,320
Time:
7 users online: Cheolpeoduck, Darolac, Ice Man, kamekku14, MegaMarioMan9, Triple P, YellowSwerve - Guests: 25 - Bots: 102 Users: 46,992 (2,532 active)
Latest: Gobi_SMW
Tip: Use Gopher Popcorn Stew to insert custom blocks into your hack.Not logged in.
MML Editing Tool 2.0
Forum Index - Sunken Ghost Ship - C3 Museum - Spring 2012 - MML Editing Tool 2.0
Pages: « 1 »
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:

Code
c16c16
c16
c16


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,

Code
o3c16>c16
<c16>c16


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:

Code
o3 c16
o4 c16


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:

Code
o3 c16<b16
o3 d16
   c16<b16
   b16


By the fourth line, the octave should be set to o2, not o3. The old parsing system would loop this as such:

Code
o3 (1)[c16<b16]
o3 d16
   (1)
   b16


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!
Great! I was actually looking forward for this, as I used the first MML Editing Tool pretty often. The new features seem to be very useful, although I'm not sure I'd actually use most of them, but the updated label looping is probably the most handy for me.
Ah yes. This is the tool I was hoping to see an update of this C3! I'll be using this when the bugs are all ironed out.

--------------------
REMOVED
And yet another tool which will make music production much easier. So far I haven't even tested the first, but then again it's been a while since I did some custom music, so I'll sure give this a try when I'm back at it again!

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

Cool tool, Kipernal! I often use your tool for my ports, but with this fixed version, things are going to be easier!#w{:>}
Oh god, I was waiting for this one!

The only bad thing is that has some errors:

- Detects the dot loop as an error.

'Line 76, channel #2: Unexpected character ".".'

Line 76:

Code
>cr16<c8>cr16<e8r2..


- This message appears when I select File → New:



Sorry if it's in spanish, I don't want to change the computer language just to take that screenshot.

Hope you fix those, this is an incredibly useful tool!
I'm happy to see people are finding use in this. I've made three minor bug fixes since I put it up (one regarding attempting to loop something at the end of a channel, one regarding the text box not resetting after creating a new file, and the second one Masterlink mentioned), so if you've downloaded the tool, you might want to consider doing so again.

Originally posted by Masterlink
The only bad thing is that has some errors:

- Detects the dot loop as an error.

'Line 76, channel #2: Unexpected character ".".'


The text you posted isn't giving me an error. Would you mind giving me more of the song so I can do some tests?

Originally posted by Masterlink
- This message appears when I select File → New:


Thank you; it's been fixed. It was a bug introduced when I fixed the second bug mentioned above.
I should get a new layout.

Probably won't, though.
Between this and the Addmusic player, this seems like as good a time as any to give music porting another try. Downloading right now.

--------------------
My YouTube channel
Get the official ASMT resource pack here!

Apparently only happens on that txt, it's comprensible since it's full of errors (like octaves for incorrect looping), I took the wrong one :P
So I got an error message and was asked to either continue or not. After clicking no it says there are unsaved changes and asks if you wish to close the program. That's normal, right? But if you click 'no', it still closes. I don't think that's supposed to be an included feature.

e: Oh, and also, why is CTRL+A disabled?

--------------------
soundcloud / bandcamp / twitter / battle of the bits / buy our album
Originally posted by MarioStarLuigi
So I got an error message and was asked to either continue or not. After clicking no it says there are unsaved changes and asks if you wish to close the program. That's normal, right? But if you click 'no', it still closes. I don't think that's supposed to be an included feature.


That's a case of the .NET error-handling overriding what I tell the program to do. If it says the program is going to quit, it's going to quit, regardless of if I program it not to.

More importantly, though, could you tell me how I could reproduce that error message?

Originally posted by MarioStarLuigi
e: Oh, and also, why is CTRL+A disabled?


Mostly because I forgot to enable it. I've gone ahead and done that, though due to a very dumb way in which Windows seems to handle text boxes the keyboard shortcut won't always work in Token Editing Mode.
I should get a new layout.

Probably won't, though.
Update:

- Added a feature that will change the song's time signature from the 4/4 that tinyMM outputs to whatever you choose; the result is that one line will equal one measure. The song must be entirely unlooped for this to work. Of note, if a note spans more than one measure, it will only be on one line (instead of put on two or more lines and joined by a tie), just like tinyMM. This is both to save space, as ties automatically result in two extra bytes per use, and because doing it this way simplifies looping (separating a tie with a loop results in the tie acting like a rest).

- Fixed a minor bug that would let you think you could edit channel numbers immediately after creating a new file. It wouldn't cause any problems; just give a generic error message.

- Made it so that creating a new file automatically puts the program into Text Editing Mode.

Again, if there are any other feature you guys want to see in this program, I'm all ears.
I should get a new layout.

Probably won't, though.
Hmm... how do I put the tempo of the song? when I open the mml file gets automatically converted but it doesn't asks for the tempo and volume values like the old one, just converts it and that's all... or I'm missing something...?
Originally posted by Masterlink
Hmm... how do I put the tempo of the song? when I open the mml file gets automatically converted but it doesn't asks for the tempo and volume values like the old one, just converts it and that's all... or I'm missing something...?


When I made the first one, my understanding of SMW's song format was very naïve, and I thought that all songs were required to have a header that consisted of certain things (the tempo, global volume, etc.), but that is not the case, so it no longer asks you for those things. Regardless, to enter a tempo, type "tXXX" (where XXX is some number. If you're in Token Editing Mode, press ENTER once you've finished). Then, in Token Editing Mode, you can use the editor on the right to edit the value in BPM.
I should get a new layout.

Probably won't, though.
Ohh I see, thanks!

Also, lol ASDF.
Originally posted by Masterlink
Also, lol ASDF.


Oh, what? I thought I removed that...

Originally I was going to use the enter key to update commands in the editor, and that was there just to make sure that capturing the key worked (the method required to do stuff like that .NET is really obtuse at times). When I scrapped it, I guess I forgot to remove that message. Fixed; thanks for pointing that out.
I should get a new layout.

Probably won't, though.
It doesn't seem to reduce the pitch of the mml. File, however for everything else, especially looping, it's extremly useful :)
Originally posted by Shog
It doesn't seem to reduce the pitch of the mml. File, however for everything else, especially looping, it's extremly useful :)


Make sure that you're selecting the notes you want to transpose. If that's still not working, please send me the file that's causing issues.
I should get a new layout.

Probably won't, though.
Pages: « 1 »
Forum Index - Sunken Ghost Ship - C3 Museum - Spring 2012 - MML Editing Tool 2.0

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy