BandInMuseScore
BandInMuseScore copied to clipboard
Issue with cmd command and XML files
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
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.2_MMA.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_Elise_MMA.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.
I want to know why can't I use these files.
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:
- Nocturne_No.1_Op.2_MMA.mma: Illegal/Unknown chord name: 'Legato' ... there is a text box (annotation) with the text "Legato" that has been written in a Harmony (chord) annotation. You can change it's type from the element properties, and I'll look at narrowing down the types of annotations that the plugin considers to be MMA annotations, as it seems there are new possibilities in the last API versions of MuseScore.
- Fr_Elise_MMA.mma: Repeatend/EndRepeat without Repeat ... MMA needs to know explicitly where a repeat bar should repeat to. I didn't handle the (common) case of a single repeat end bar without a repeat opening bar (by default at the beginning of the piece) yet. If you want to have a look at the code and improve please do ! Maybe putting a default "Repeat" command at the beginning of all songs works, cancelling it out with a "RepeatEnd 1" at the end if I understand correctly the MMA documentation at https://www.mellowood.ca/mma/online-docs/html/ref/node20.html.
Kindly let me know if you do something about it in the plugin !
Did you manage to get it to run for you ?