Skip to content

Command line tool

donmai-me edited this page Aug 14, 2021 · 2 revisions

Command-line tool

Introduction

The command-line tool is installed as part of MaiConverter. The tool leverages the underlying library in an easy to use manner without the user understanding Python syntax.

To invoke the command-line tool in your terminal, the following format is used:

maiconverter OPERATION /PATH/TO/INPUT/FILE

Where OPERATION is one of the following:

  • ma2tosdt
  • ma2tosimai
  • sdttoma2
  • sdttosimai
  • simaitoma2
  • simaitosdt
  • simaifiletoma2
  • simaifiletosdt
  • encrypt
  • decrypt

ma2tosdt

Converts a Ma2 chart to an Sdt. Since Ma2 is the successor to Sdt with new notes and features not in Sdt, some information will be lost during conversion. Such as touch notes, ex notes, BPM change markers, etc.

BPM changes are compensated during conversion by flattening all BPM events and adjusting the notes' timing to fit the new BPM. The output is an Sdt written in the initial BPM of the source Ma2.

The following is the typical format for invoking ma2tosdt: maiconverter ma2tosdt INPUTPATH

Where "INPUTPATH" is the path to a Ma2 file or a directory containing Ma2 files. All output is stored, by default, in a folder named "output" in "INPUTPATH".

The following are optional arguments for ma2tosdt:

  • -o, --output is used to override the default output folder location.
  • -e, --encoding is used to specify the source file's encoding. Defaults to utf-8.
  • -ct, --convert_touch is used to make the converter (naively) convert touch notes. Useful when you want to manually tweak the placement of a converted tap or hold note without worrying about its timing.

ma2tosimai

TODO

Clone this wiki locally