Author Topic: Batch converting midi to module?  (Read 232 times)

Offline O. Inha

  • Shy artist
  • Posts: 2
Batch converting midi to module?
« on: May 09, 2022, 17:22:55 »
OpenMPT imo does the best job in midi 2 module conversion.

Any ideas if any tools/features exist -- in OpenMPT, its libraries or other tools based on this engine -- that can be easily utilized to batch-convert a large bunch of midi files into a large bunch of modules (e.g. mptm)? I have some expertize in programming, but C/C++ is entirely unknown turf to me and I have no idea where I would even start to look into building this tool myself.

Any other tips for tools to batch-convert midis to modules are welcome as well. Preferably command-line based that run on Linux, but anything really is a start. I'm asking here because OpenMPT takes the cake in accuracy and I'd prefer to use this engine.

This is how it is: I am in current project programmatically generating dozens or even hundreds of midis on a daily basis. But I need them as modules! Opening/Saving one by one in OpenMPT is highly impractical, basically impossible.

Thanks a lot for any help!
« Last Edit: May 09, 2022, 18:07:38 by O. Inha »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,491
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Batch converting midi to module?
« Reply #1 on: May 09, 2022, 20:17:18 »
I'm not aware of any other up-to-date tool that has an accuracy comparable to OpenMPT's, and that on top of all would allow for batch conversion. The easiest way might be to just add a few calls to the OpenMPT code that immediately save the module file after a MIDI file has been loaded successfully (and then maybe also automatically close that file again because you won't be able to have more than ~60 module windows open at a time). All the newly required code is probably less than 10 lines in total.
« Last Edit: May 10, 2022, 08:48:11 by Saga Musix »
ยป No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline O. Inha

  • Shy artist
  • Posts: 2
Re: Batch converting midi to module?
« Reply #2 on: May 09, 2022, 21:10:30 »
That's a good idea, I'll look into it! Thanks!