Language…
11 users online: Cristian Cardoso, howardadam1126, Isikoro, marvisjj, masl, Oskise, RenkoV2,  Segment1Zone2, SpacePea,  Telinc1, Zavok - Guests: 252 - Bots: 319
Users: 64,795 (2,377 active)
Latest user: mathew

a little tip to help porters listen to mml more quickly

Hi all,
Not sure if this qualifies as a tutorial/doc or not, so I'm posting it here so that porters can see it.

In this post I will outline a cool way to listen to your spc while working on a port. I don't know how much more efficient it is than amkgui; I used to have trouble with it in porter mode for some reason. It works now, but I still prefer the methods I am about to share, especially the second one, as it allows you to listen to your spc from the comfort of your text file with a single keystroke! If you're curious, keep reading!

Note: This guide assumes you are already comfortable with AddmusicK and its file structure.

To start, you will need a small batch file called mkspc.bat. This is responsible for deleting the old spc of your port and running AddmusicK to generate a new spc file. An optional secondary batch file, 00startcmd.bat, is also here. All it does is start a command prompt from wherever the batch file is run from, and for a while is what I used in place of amkgui.

First, download the batch files here, and place them in the same folder as AddmusicK.exe.

From this point, you can pick one of two methods.
First method:
This method is a bit easier to set up, but isn't as efficient. You'll need both batch files.
1. Ensure the music txt you want to compile is in the music folder of AddmusicK.
2. Run 00startcmd.bat. A command prompt window should appear.
3. Simply type mkspc "textfile.txt" into the command prompt.
For example if my song was called test.txt, I would write:
mkspc "test.txt"
You can leave the quotes out if the name of your text file doesn't have spaces, but if there are spaces, the quotes will be necessary.
You can use folders here too, for instance:
mkspc originals\14 Boss.txt"
4. Press enter. If all went well, you'll see the compilation flash by, and if no errors occurred, the spc will open in your default player and play!
5. To repeat the compilation, go back into the command prompt window and press up arrow. From here, you can either edit the command or just press enter again to repeat.

Second method:
This method only requires mkspc.bat.
Using this method, you can connect AddmusicK to the popular text editor Notepad++, allowing you to listen to spcs with a single keystroke! This will likely work in other editors too, but Notepad++ is the one I'll be covering here, as it's the only one I've used thus far which can do this.
1. Ensure the music txt you want to compile is in the music folder of AddmusicK.
2. In Notepad++, go to the run menu and hit the run... option or press F5.
3. In the dialog which comes up, click the browse button and browse to the mkspc.bat file in your AddmusicK directory.
4. The program path field should now contain the path to the batch file. Put quotes around it. Not sure if this is truly necessary, but it doesn't hurt.
5. Next to the path, type "$(FILE_NAME)"
For example, my path looks like this:
"D:\downloads\AddmusicK_1.0.8\mkspc.bat" "$(FILE_NAME)"
6. Hit the save... button. You will be taken to the shortcut dialog where you can name your shortcut and assign a hotkey. I've simply named mine AddmusicK and assigned mine to ctrl+f5, but you can make yours whatever you like.
7. Press OK and close the run... dialog, and you've finished setup. Now, AddmusicK will always run when you press your assigned keystroke.
8. To test it, open a txt/mml file in Notepad++.
9. When you're ready to hear it, press control S to save changes, then press the hotkey you set up. It should work like magic!
FYI, you could go to the run menu and select your AddmusicK shortcut there, but where's the fun in that?

Some notes about the Notepad++ method:
This method only works as advertised if your txt/mml is in the music folder. It won't work if it's in a subdirectory i.e. you can't compile something like "originals\14 boss.txt" this way. If you try, the originals folder won't be seen; it will be looking for boss.txt in the music folder instead. A workaround, all be it an annoying one, is to modify the shortcut path in Notepad++. Specifically, you have to type the folder before the file name, like so: "originals\$(FILE_NAME)"

This caveat exists because Notepad++ cannot specify a path relative to the music folder, which is what AddmusicK expects. Using absolute paths would get around this, but to my knowledge, AddmusicK can't do absolute paths, which is probably for the better since it relies on a set structure of relative paths anyway.

Well, that's it. I hope you've found this useful! If you have any questions about how to tweak this, feel free to ask. I can't promise to have all the answers, but I'll do my best! And suggestions and criticisms are always welcome too.
Edit: used to have weird troubles with amkgui, but now it works fine. Updated post to reflect this.
Make more of less, that way you won't make less of more!
tested second method, works like a charm. this really helps my lazy ass who usually puts off porting solely because of not feeling like navigating to my addmusick folder. thanks a lot!
LINKS Twitter | YouTube | SoundCloud | Fortaleza Reznor
to hear birds and see none.
Originally posted by Maxodex
tested second method, works like a charm. this really helps my lazy ass who usually puts off porting solely because of not feeling like navigating to my addmusick folder. thanks a lot!


same lol; will probably take a while to get used to tho since I've used the porter mode for so long that I kind of forgot how slow and somewhat inconvenient the process actually is, but yeah, this is definitely much faster haha
Layout by Mathos