quinta-feira, 18 de outubro de 2018

Midi2PLAY - Convert MIDI files to BASIC language




   I made this post to tell about "Midi2PLAY" (for Windows 32/64, binaries source code available here), a program I developed that assists in the process of converting MIDI files (.mid) to the syntax accepted by the PLAY command of MSX-BASIC

As I will explain below, Midi2PLAY does not do the conversion alone, it depends on another program (3ML Editor) to intermediate the process. But it's all very simple and in the end you will have a BASIC music program practically ready to run on MSX.

About Midi2PLAY

The main purpose was to develop a converter parser that generates code compatible with all versions of MSX (from MSX1), without the need for additional hardware such as MSX-Audio, MSX-Music or FM-Pac. That is, the syntax generated by "Midi2PLAY" can be executed on any MSX.
The program is still in development but I already offer the executable and the code (in C++) for those who want to use it. Follow the download link:

https://github.com/rodrivas78/Midi2PLAY


 I will now make a quick summary of how the program works:

 Following up on what I said earlier, Midi2PLAY does not directly convert MIDI files (.mid). For this it depends on another program: the 3ML Editor.

The 3ML Editor is free and can be downloaded at: http://3ml.jp/download.html

See below how the conversion process works and what the function of each application is:

 MIDI file -> 3ML Editor -> MML file (.txt) -> Midi2PLAY -> .BAS file

Step by step:

  • Import the MIDI file into the 3ML Editor.
  • Still in the 3ML Editor: export the MML file. (Save as "mml.txt")
  • Run the "Midi2PLAY" (with the "mml.txt" properly formatted in your folder)
  • The "play.txt" file will be generated. Just save it as ".BAS" and use it in MSX.


What we see above is a summary, for the correct use of the program it is necessary to read the Midi2PLAY manual, since there are some non-automated processes. In the program folder, along with the manual, there are images and sample files that will help you to quickly understand what should be done to make everything work correctly.

 Addendum

   It is understood that Midi2PLAY could (or should!) be called mml2play, but as the "MML" format is not so well known and for the program function to become self explanatory, I chose the current name.

  As I mentioned earlier, the program still needs some improvement. For example: the user needs to perform a few steps manually, so that the document (mml) is properly formatted so that the conversion is correct. I intend to automate some of these steps in future releases.
    
  If you used the program I will be happy to hear your feedback.

 I have not had time to perform all the necessary tests, so if possible help by reporting any bug. Reviews and suggestions are also welcomed!


keywords: Midi2Basic, MIDI to BASIC


Nenhum comentário:

Postar um comentário

BASIC 10-Liners Contest 2020