Jump to content

[mml_thing] An mml automation and conversion tool


Recommended Posts

A simple tool to automate repetitive and tedious 3mle tasks.

download latest (v1.5.2)

This is a command prompt app. You cannot open it by double-clicking on the exe. You must launch it from your command prompt.


Features

  • propagate_t Propagate Tempo : Adds all tempos from track 1 to all other tracks. Splits notes if necessary.
  • propagate_p Propagate Performance Tempo: Adds performance tempo to tempos on track 1.
  • propagate_v Propagate Volume : Copies starting volume from track 1 to other tracks that don't have a start volume. If no volume is found, adds v15 to tracks without starting volume. Loud is good!
  • compress When importing midi files with velocity, the velocity steps are often really wide and noticeable. Fixes this by narrowing the gap between velocity "steps" and makes everything louder.
  • max_velocity Boosts or lowers velocities to match provided maximuim velocity. Keeps relative distance between velocities.
  • min_velocity Boosts or lowers velocities to match provided minimum velocity. Keeps relative distance between velocities.
  • add_sustain_track Adds a basic sustain track with sustain off/on every beat.
  • clean Currently only removes endlines.
  • kick_track Converts selected track to a kick track. All notes are converted to C2, so they work with new 3mle.
  • snare_track Converts selected track to a snare track. All notes are converted to D2, so they work with new 3mle.
  • cymbal_track Converts selected track to a cymbal track. All notes are converted to C3, so they work with new 3mle.
  • ms2mml Outputs the file in Maple Story 2 format so you can "Open File" in the game's sequencer.
  • batch mode By specifying a folder as input, the tool will process all '.mml' files in the specified folder non-recursively. All options currently work in batch mode.


How to use

  • Import your midi files in 3mle, optimize all tracks, do things, go outside and get some fresh air (lol), save when finished.
  • Use this tool to post-process and convert your mml file to Maple Story 2 format (no copypasta required).


Examples

The following applies all processes and outputs to "glou.ms2mml".

mml_thing.exe turkey.mml glou.ms2mml -e --ms2mml

The following converts track 1 to kick track.

mml_thing.exe harambe.mml dedmeme.ms2mml --kick_track 1 --ms2mml

The following will output the final file "C:\gud beats\sandstorm.out.ms2mml". You can import that file in Maple Story 2.

mml_thing.exe "C:\gud beats\sandstorm.mml" --propagate --compress --clean --ms2mml

You can also use short options to help your tendinitis.

mml_thing.exe "C:\gud beats\sandstorm.mml" -pvc --ms2mml

This will apply propagate and clean on all '.mml' files in folder "gud beats" and output the files as '.out.ms2mml' in "C:\gud beats\out\".

mml_thing.exe "C:\gud beats\" --propagate --clean --ms2mml

This will convert all '.mml' files in folder "my song" to '.ms2mml' format. The files will be output in the current working directory and named song1.ms2mml, song2.ms2mml, etc. If the current working folder is "my song", the ms2mml files will be output in "out/" subfolder.

mml_thing.exe "C:\my song\" song.ms2mml --ms2mml


Setup

The tool doesn't require any special installation to be used, but if you use it often, the following might be nice.

  • To be able to launch the tool from any folder you are working in, add the tool folder to your user 'Path' environment variable : 'System > Advanced System Settings > Environment Variables...' Edit or create user variable 'Path' and add the mml_thing folder to it. When downloading new versions, overwrite the exe in there.
  • To launch a command prompt from your current directory in File Explorer, type 'cmd' in the top path bar.
  • To easily copy the path of a file or folder, shift + right click a file and select 'Copy as path'.
  • If you don't like command prompts gtfo scrub.


Bugs

Please report bugs to [email protected]
I need to be able to reproduce issues, so please attach required mml files if they are needed. I can guarantee your files will solely be used for bugfixing and deleted afterwards.


Updates

v1.5.2

  • Change tempo propagation order. Adds tempos to the end of other notes. Fixes issues like t100t110 becoming t110t100.
  • Keep 3mle track ordering. This would also cause 3mle track names to be erased, which we don't like so much.

v1.5.1

  • Revert changes to ties, which broke propagate tempo. [queue sad violins] Thanks to ST for the bug report!

v1.5.0

  • Added 'max_velocity' and 'min_velocity' to give more control over velocity operations. Max/min velocity will boost or lower the maximum/minimum volume. Steps between velocities are kept as much as possible, which helps when you have tracks with big velocity gaps. You can think of this as an expander.
  • Added comment support, though the output isn't always very pretty. At least we don't explode anymore.
  • Optimize propagate_t to merge small denominations together (less verbose output). Shouldn't output 2 million r16& anymore.
  • Changed how mml_thing handles ties and endlines to match 3mle behavior more closely.
  • Fix a compress bug where it would skip some velocities.

v1.4.0

  • Added 'add_sustain_track' option, which creates a basic track with sustain toggling on beats. Only works when outputting to ms2mml.
  • Added 'kick_track', 'snare_track' and 'cymbal_track' options. This will convert all notes of the selected track to the correct kick, snare, cymbal (C2, D2, C3). Nothing else is changed on the track. You will need to provide the track number. Thanks to Yasuno for the idea!
  • Renamed a bunch of options again. Sorry about that, names will stop to change once I'm out of beta. 'Propagate' is split into 'propagate_t' and 'propagate_p', for tempo and performance tempo respectively. 'start_volume' renamed to 'propagate_v'. Remember you can use short-options to apply all of the propagates : '-pPv'.
  • Sneakily add triplet support. Nobody seems to have noticed they were missing. Triplets are sad.
  • Updated 3mle backend to new data model. Fixes some parsing issues like '&l4c' or out of range tempos.
  • Removed deprecated 'propagate'.

v1.3.0

  • Added experimental 'propagate2', a rewrite of propagate. The new version will copy all tempos from the first track to the others. It will split notes appropriately. Volume propagation moved to its own option. Propagate2 will replace propagate in next major version.
  • Moved propagate volume to new 'start_volume' option. Grabs the first volume from track 1 and copies it to other tracks.
  • Deprecated 'propagate' (will be removed in next major version).
  • Renamed 'normalize_velocity' to 'compress'. Changed its short option to '-C'.

v1.2.0

  • Added short options and "everything" option.
  • Fix some path bugs.

v1.1.0

  • Added batch mode.

Help

Usage: mml_thing.exe in_file out_file [options]
	Arguments:
 in_file     MML input file or folder.
             Using a folder enters batch mode, which will process all '.mml' files in the specified folder.
 out_file    MML output file.
             Optional, outputs to 'in_file.out.mml' if no argument is provided.
             Outputs to 'out/' subfolder if using batch mode and no argument is provided.
	Options:
 -p, --propagate_t           Propagate Tempo : Adds all tempos from track 1 to all other tracks.
 -P, --propagate_p           Propagate Performance Tempo : Adds performance tempos to all tempos on track 1.
 -v, --propagate_v           Propagate Volume : If track 1 has a starting volume, copies it to other tracks.
                             If not, adds v15 to beginning of tracks without volume.
 -C, --compress              Narrows the gap between velocity steps. Make everything louder.
 -M, --max_velocity <value>  Boosts or lowers velocities to match provided maximuim velocity.
                             Keeps relative distance between velocities.
 -m, --min_velocity <value>  Boosts or lowers velocities to match provided minimum velocity.
                             Keeps relative distance between velocities.
 -s, --add_sustain_track     Adds a basic sustain track with sustain on/off on beats.
                             Currently only works when exporting ms2mml.
 -c, --clean                 Additional optimizations. Currently, only removes line endings.
 -e, --everything            Apply almost all post-process operations :
                             propagate_t, propagate_p, propagate_v, compress, add_sustain_track, clean.
     --kick_track <value>    Converts selected track to a kick track. Must provide track number.
     --snare_track <value>   Converts selected track to a snare track. Must provide track number.
     --cymbal_track <value>  Converts selected track to a cymbal track. Must provide track number.
     --ms2mml                Outputs in 'ms2mml' format.
 -h, --help                  Print this help

mml_thing
version : 1.5.2 beta
author : OffendedV <[email protected]>
Edited by OffendedV
Link to comment
On 11/17/2018 at 11:07 AM, OffendedV said:

@Yasuno Haha yeah I'm guessing many coders have the same idea. Let me know how it works for you.

Seems to be working fine so far, I have used it on a few songs.  I think I saw this in the to-do list already but an easy way of being able to output every mml file in a folder, to ms2mml would be useful in our case. (For Ensembles).

Link to comment

v1.3.0 is hot off the press. It adds a major rewrite to the propagate option (temporarily named propagate2 while testing). mml_thing will now propagate all tempos from your first track to other tracks. It will split notes appropriately so you don't have to. This required a major effort behind the hood, but now I should be set to add other cool features. I also renamed some stuff and juggled a few options here and there. Why? Who knows!

I am 100% sure I've missed some weird cases when rewriting propagate, please please please listen to your song before pressing compose and send me bug reports. ❤️

Full release notes:

v1.3.0    - Added experimental 'propagate2', a rewrite of propagate. The new version will copy all tempos from the first track to the others. It will split notes appropriately. Volume propagation moved to its own option. Propagate2 will replace propagate in next major version.
        - Moved propagate volume to new 'start_volume' option. Grabs the first volume from track 1 and copies it to other tracks.
        - Deprecated 'propagate' (will be removed in next major version).
        - Renamed 'normalize_velocity' to 'compress'. Changed its short option to '-C'.

Link to comment
Guest Hisokai
On 11/17/2018 at 6:51 PM, OffendedV said:

If no volume is present, adds v15 (because loud is good!) 

Not true. Loud is not always better and in most cases makes it worse.

Edited by Hisokai
Link to comment
On 12/8/2018 at 7:39 PM, OffendedV said:

v1.3.0 is hot off the press. It adds a major rewrite to the propagate option (temporarily named propagate2 while testing). mml_thing will now propagate all tempos from your first track to other tracks. It will split notes appropriately so you don't have to. This required a major effort behind the hood, but now I should be set to add other cool features. I also renamed some stuff and juggled a few options here and there. Why? Who knows!

I am 100% sure I've missed some weird cases when rewriting propagate, please please please listen to your song before pressing compose and send me bug reports. ❤️

Full release notes:

v1.3.0    - Added experimental 'propagate2', a rewrite of propagate. The new version will copy all tempos from the first track to the others. It will split notes appropriately. Volume propagation moved to its own option. Propagate2 will replace propagate in next major version.
        - Moved propagate volume to new 'start_volume' option. Grabs the first volume from track 1 and copies it to other tracks.
        - Deprecated 'propagate' (will be removed in next major version).
        - Renamed 'normalize_velocity' to 'compress'. Changed its short option to '-C'.

Oo, will have to try this. Will let you know.

Link to comment

Aaaaand v1.4.0 is out. Another one bites the dust, dun, dun, dun.

I had to rename some things again, sorry.

This one adds a few new features, namely add_sustain_track which should help get you started when making sustain tracks. @Yasuno recommended I add a converter for kick, snare and cymbal tracks, which I did. These will make sure your percussion tracks work with the new 3mle sound bank.

Like all releases with new features, bugs may be creeping around ready to strike. Please do not through food at me for bugs, unless it is cake. Then its ok you can throw cakes at me. nomnom

I'm out of alpha and into beta. I've gathered enough feedback from different places that seem to indicate no cats were killed. Very happy about that.

Full release notes :

v1.4.0  - Added 'add_sustain_track' option, which creates a basic track with sustain toggling on beats. Only works when outputting to ms2mml.
             - Added 'kick_track', 'snare_track' and 'cymbal_track' options. This will convert all notes of the selected track to the correct kick, snare, cymbal (C2, D2, C3). Nothing else is changed on the track. You will need to provide the track number. Thanks to Yasuno for the idea!
             - Renamed a bunch of options again. Sorry about that, names will stop to change once I'm out of beta. 'Propagate' is split into 'propagate_t' and 'propagate_p', for tempo and performance tempo respectively. 'start_volume' renamed to 'propagate_v'. Remember you can use short-options to apply all of the propagates : '-pPv'.
             - Sneakily add triplet support. Nobody seems to have noticed they were missing. Triplets are sad.
             - Updated 3mle backend to new data model. Fixes some parsing issues like '&l4c' or out of range tempos.
             - Removed deprecated 'propagate'.

Link to comment

Ho Ho Ho, you've been bad boiis but I still got an update for you.

This update adds some more velocity tools, which should help when dealing with backup tracks or songs with large dynamic ranges. I also worked on propagate tempo so the split notes get collapsed to generate less verbose outputs. A few bugs were fixed and the tool doesn't die if you use an mml file with comments.

Merry christmas and happy RNGesus XD

v1.5.0

  • Added 'max_velocity' and 'min_velocity' to give more control over velocity operations. Max/min velocity will boost or lower the maximum/minimum volume. Steps between velocities are kept as much as possible, which helps when you have tracks with big velocity gaps. You can think of this as an expander.
  • Added comment support, though the output isn't always very pretty. At least we don't explode anymore.
  • Optimize propagate_t to merge small denominations together (less verbose output). Shouldn't output 2 million r16& anymore.
  • Changed how mml_thing handles ties and endlines to match 3mle behavior more closely.
  • Fix a compress bug where it would skip some velocities.
Edited by OffendedV
Link to comment
  • 7 months later...
×
×
  • Create New...