Converts MIDI files into music box scores that are ready to print.
- Mono (
dotnetmight work but is untested)
- Mono (
- Visual Studio (the free version is fine - it's just the developer command prompt you need)
- All operating systems:
- Git (
sudo apt install giton apt-based systems)
- Git (
- For printing:
This program is written in C♯. To get started, first clone this repository and compile it:
git clone https://git.starbeamrainbowlabs.com/sbrl/MusicBoxConverter.git cd MusicBoxConverter msbuild
This should work regardless of whether you're on Linux or Windows.
If you're on Windows, you'll either need to use a Visual Studio Developer Command Prompt or open the solution file in Visual Studio itself and hit the build button.
Once the build is complete, the binary (and associated libraries) can be found in
MusicBoxConverter/bin/Release if you did a release build).
If you're having trouble building it, please get in touch and I'll send you a build.
- Export the MuseScore file to a MIDI file
- Run the MIDI file through this program.
- Open the resulting SVG in Inkscape
- Print the SVG to PDF (or
inkscape --export-pdf output.pdf input.svg)
- Open the resulting PDF in LibreOffice Draw
- Print to your actual printer - tiling over multiple pages if required.
This somewhat convoluted process prevents anyone from automatically rescaling it along the way, and thus misaligning the green lines in the SVG file generated by the program.
If the above doesn't work, it's probably LibreOffice Draw scaling it even though you've told it not to. In that case, try this:
# Convert MIDI -> SVG ./MusicBoxConverter.exe --input song.midi --output score.svg # Convert SVG → PNG inkscape -o score.png score.svg # Convert the PNG to PDF, rotating by 90 degrees (for portrait printing) convert score.png -rotate 90 score.pdf # Split the PDF up into multiple pages for the printer # -s1 Don't scale the output # -m Sets the output paper size. Defaults to A4 (21x29.7cm) if unspecified, but may need to reduce by a cm or 2 on each side (as below) if things get cut off. pdfposter -s1 -m 20x27.7cm score.pdf print.pdf
....if that cuts things off at the edges, try doing it like this:
convert score.svg score.pdf pdfposter -s1 score.pdf print.pdf
This project is released under the Mozilla Public License 2.0. The full license text is included in the
LICENSE file in this repository. Tldr legal have a great summary of the license if you're interested.