berteh / BandInMuseScore

Accompaniment generator for MuseScore, something like Band-In-A-Box, auto-magically powered by MMA Musical Midi Accompaniment.
https://berteh.github.io/BandInMuseScore/
GNU General Public License v3.0
32 stars 5 forks source link

Issue with cmd command and XML files #6

Open Yazakk opened 3 years ago

Yazakk commented 3 years ago

First Issue: Using mscz files provided in example folder

When I am running the plugin through command prompt, I am using the following:

mma.bat -i BandInMuseScore.mscz

And this is what I am getting.

C:\WPython64\mma-bin-20.12>cd C:\WPython64\mma-bin-20.12\

C:\WPython64\mma-bin-20.12>..\PYTHON~1.AMD\python.exe mma.py -i BandInMuseScore.mscz Traceback (most recent call last): File "mma.py", line 91, in import MMA.main File "C:\WPython64\mma-bin-20.12\MMA\main.py", line 92, in MMA.paths.readRC() File "C:\WPython64\mma-bin-20.12\MMA\paths.py", line 155, in readRC MMA.parse.parseFile(f) File "C:\WPython64\mma-bin-20.12\MMA\parse.py", line 94, in parseFile f = MMA.file.ReadFile(n) File "C:\WPython64\mma-bin-20.12\MMA\file.py", line 144, in init l = inpath.readline() File "C:\WPython64\PYTHON~1.AMD\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 117: character maps to

When I use MuseScore software, everything works fine for the mscz files in your example folder.

So my first question would be, how can I use cmd to generate the mma and MIDI files?

Second Issue: Using my files

I downloaded the following file

This is the message I am getting when I am using the plugin from MuseScore software:

_MMA accompaniment is ready for you, but we could not generate the MIDI file from it. Please fix the following error:

C:\Program Files\MuseScore 3\bin>cd C:\WPython64\mma-bin-19.08\

C:\WPython64\mma-bin-19.08>..\PYTHON~1.AMD\python.exe mma.py -f C:/Users/YAZAN/AppData/Local/Temp/Nocturne_No.1_Op.2_MMA.mid C:/Users/YAZAN/AppData/Local/Temp/Nocturne_No.1_Op.2_MMA.mma
Error: <Line 10> <File:C:/Users/YAZAN/AppData/Local/Temp/Nocturne_No.1_Op.2_MMA.mma> Illegal/Unknown chord name: 'Legato'

The generated MMA file is nevertheless available at "C:/Users/YAZAN/AppData/Local/Temp/Nocturne_No.1_Op.2MMA.mma"

And this file , for example, is giving this error:

_MMA accompaniment is ready for you, but we could not generate the MIDI file from it. Please fix the following error:

C:\Program Files\MuseScore 3\bin>cd C:\WPython64\mma-bin-19.08\

C:\WPython64\mma-bin-19.08>..\PYTHON~1.AMD\python.exe mma.py -f C:/Users/YAZAN/AppData/Local/Temp/Fr_Elise_MMA.mid C:/Users/YAZAN/AppData/Local/Temp/Fr_Elise_MMA.mma
Error: <Line 21> <File:C:/Users/YAZAN/AppData/Local/Temp/Fr_Elise_MMA.mma> Repeatend/EndRepeat without Repeat

The generated MMA file is nevertheless available at "C:/Users/YAZAN/AppData/Local/Temp/Fr_EliseMMA.mma"

The files I need to work on mainly are musicxml files, and each file gives me a different error when I want to apply the plugin on MuseScore. So I attached two files in a zip file.

musicxml_files.zip

I want to know why can't I use these files.

berteh commented 3 years ago

Hello @Yazakk

Thanks for the feedback.

Your first issue: the plugin does not run from command line, only from MuseScore, to transform the chords and MMA annotations in your score in a .mma file.

This .mma file is then turned into a .mid (rich accompaniment) file (that is the purpose of the mma.bat file you tried to use), and then the generated .mid is opened back in MuseScore.

For the next issues: none of the files you used (Nocturne_No.1_Op.2 and Für_Elise) have chords... so there would be nothing for the plugin to generate accompaniment from. You need at least one chord at the beginning, or an MMA annotation mentioning the tune of the piece.

Aside from that, the end of the error messages you got are explicitly telling you the problem:

Kindly let me know if you do something about it in the plugin !

berteh commented 3 years ago

Did you manage to get it to run for you ?