120
Well, it seems I did kwew it back in 2021 .
Here's what I found in the coding I wrote for the musicxml to Noteworthy convertor:
def convert_tag_direction_end(element):
object_line = {
'dynamic': '|Dynamic|Style:mp|Pos:7',
'dynamic_variance-sfz': '|DynamicVariance|Style:Sforzando|Pos:7',
'dynamic_variance-rfz': '|DynamicVariance|Style:Rinforzando|Pos:7',
'dynamic_variance_text': '|Text|Text:sfp|Pos:7',
'segno': '|Flow|Style:Segno|Pos:8',
'coda': '|Flow|Style:Coda|Pos:8',
'D.C. al Fine': '|Flow|Style:DCalFine|Pos:8|Justify:Right',
'D.S. al Fine': '|Flow|Style:DSalFine|Pos:8|Justify:Right',
'D.C. al Coda': '|Flow|Style:DCalCoda|Pos:8|Justify:Right',
'D.S. al Coda': '|Flow|Style:DSalCoda|Pos:8|Justify:Right',
'To Coda': '|Flow|Style:ToCoda|Pos:8|Justify:Right',
'D.C.': '|Flow|Style:DaCapo|Pos:8|Justify:Right',
'fine': '|Flow|Style:Fine|Pos:8',
'pedal': '|SustainPedal|Pos:-11|Wide:Y'
}
...
127
Hi Heinrich,
I got this error when I ran the user tool:
When I removed the '.Text' at the end of line 142, the error didn't occur any more.
But I think it has to do with the version of nwc (mine is 2.8 beta 1).
So maybe this is the best solution:
local staffName = staff.AddStaff.Opts.Name.Text
if staffname == nil then staffname = staff.AddStaff.Opts.Name
That works for me.
132
The error is caused by these elements in part 'P1':
<measure number="36" width="187.79">
<attributes>
<clef>
<sign>F</sign>
<line>5</line>
</clef>
</attributes>
The 'sign' and 'line' elements are used to determine a key for this dictionary in my program :
CLEF_SIGNS = {
'G,2': 'Treble',
'F,4': 'Bass',
'C,3': 'Alto',
'C,4': 'Tenor',
'percussion,None': 'Percussion'
}is
So 'F,5' is an invalid key.
IMHO this can be caused by:
- The score has a bass clef positioned one line above the 'normal' bass clef. NWC does not support it, neither does my program.
- Or: Audiveris incorrectly read the position. (In part 'P2', measure number "0", I found a normal 'F,4' clef)
So maybe I could change my program to ignore the line number (except for the 'C' clefs) and print a warning if the line number differs from the 'normal' one?
137
Hi Rich,
As I said, I'm working on the next version.
I think it's not too difficult to include a 'look ahead' and search for a divisions element further in a staff, before starting to process the first measure.
That should solve the problem.
I hope to publish the next version soon.
In the meanwhile, if you have the same problem in another xml file:
- Open the file in a text editor and look for the first occurence of '<attributes>'
- Before that you'll find a preceding line with '<measure number =...'
- If it's the same error situation, that measure number will be > 1.
- Then copy all the lines from '<attributes>' to '</attributes>', as in your file:
<attributes>
<divisions>2</divisions>
<key>
<fifths>-4</fifths>
</key>
<clef>
<sign>G</sign>
<line>2</line>
</clef>
</attributes>
- Now look higher in the file for a line with '<measure number="1">'
- Paste the copied lines after that line
- Save the file with another name.