[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: musicxml2ly: Emit bar checks for all voices (issue 553620043 by addr
jonas . hahnfeld
Re: musicxml2ly: Emit bar checks for all voices (issue 553620043 by address@hidden)
Tue, 10 Mar 2020 02:18:11 -0700
Reviewers: Dan Eble,
File scripts/musicxml2ly.py (right):
scripts/musicxml2ly.py:2287: if n._measure_position == Rational(0) and n
On 2020/03/10 00:20:12, Dan Eble wrote:
> Is the purpose of n != voice._elements to avoid printing a bar
check at the
> beginning of the first measure? If so, I would have been less puzzled
> comment were "print a bar check at the beginning of every measure
> first" or simply "print bar checks between measures".
I really have no idea. This condition was the way to fix the problem at
hand, but I'm not really into what the script is doing in detail. I tend
to agree with your analysis though. I'm going with "print bar checks
between measures", thanks for the suggestion.
musicxml2ly: Emit bar checks for all voices
The script only added them for the first voice, without explanation.
As this change doesn't seem to cause any problems, it's probably fine
to lift this restriction and make the generated code easier to read.
Suggested privately by Kai Ruemmler.
Please review this at https://codereview.appspot.com/553620043/
Affected files (+1, -1 lines):
diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py
@@ -2284,7 +2284,7 @@ def musicxml_voice_to_lily_voice(voice):
# print a bar check at the beginning of each measure!
- if n.is_first() and n._measure_position == Rational(0) and n !=
+ if n._measure_position == Rational(0) and n != voice._elements:
num = int(n.get_parent().number)