Re: NWCCONVERTOR
Reply #90 –
Hi Flurmy,
The 'Batteria' staff of the input file contains, in a number of measures, chords of 2 notes with same position and same duration (but with different instruments), see example in code snippet below. This is impossible in NWC: each element in a chord must have different position or different duration. So the Warnings frame shows a 'InvalidChordError' in these cases. But this is no 'fatal error', nwcconvertor just removes the double position. (And in this case with 2 instrument change objects, but of course the second overrules the first one.
So, because it's not a fatal error, you can click 'SAVE' and get a valid nwctxt file.
Maybe I should not call it 'error' in the warnings frame (and print it in black instead of red)?
But then there were two other things I noticed in the output file:
1) The bars in the piano staves didn't line up correctly after measure 45. The reason was the presence of rests and notes with a duration of a 128th (see 2nd code snippet), which is not possible for NWC (nor for many pianists I guess). NWC removes the duration part in the nwctxt line, which results in a quarter note or rest.
2) The calculation of the positions for a percussion clef was wrong (12 positions to high).
<note dynamics="92.22">
<unpitched>
<display-step>F</display-step>
<display-octave>5</display-octave>
</unpitched>
<duration>48</duration>
<instrument id="P5-I25"/>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<beam number="1">begin</beam>
</note>
<note dynamics="64.44">
<chord/>
<unpitched>
<display-step>F</display-step>
<display-octave>5</display-octave>
</unpitched>
<duration>48</duration>
<instrument id="P5-I70"/>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
</note>
<note>
<rest/>
<duration>3</duration>
<voice>5</voice>
<type>128th</type>
<staff>2</staff>
</note>
<note dynamics="84.44">
<pitch>
<step>B</step>
<octave>3</octave>
</pitch>
<duration>3</duration>
<tie type="start"/>
<voice>5</voice>
<type>128th</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">begin</beam>
<beam number="2">begin</beam>
<beam number="3">forward hook</beam>
<beam number="4">forward hook</beam>
<beam number="5">forward hook</beam>
<notations>
<tied type="start"/>
</notations>
</note>
Conclusion:
I will soon publish a new version with:
- corrected positions for the percussion clef
- text 'InvalidChordError' replaced by 'Chord with duplicate positions ans same duration'
- warnings printed in black instead of red.
- print a warning in case of a 128th duration.