mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-10-03 03:27:52 +00:00
Add staff attribute to note representation
Par tof the LH/RH seperation future schema (cherry picked from commit 56ad235a1ad4875527abb69836bcace79fdadfdc)
This commit is contained in:
@@ -69,6 +69,7 @@ class RsNote:
|
||||
tremolo: bool = False
|
||||
tap: bool = False
|
||||
link_next: bool = False
|
||||
staff: int = -1 # Piano staff: -1=absent, 0=LH/bass clef, 1=RH/treble clef
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -1021,6 +1022,8 @@ def _build_xml(
|
||||
"tap": "1" if n.tap else "0",
|
||||
"ignore": "0",
|
||||
}
|
||||
if getattr(n, 'staff', -1) != -1:
|
||||
attrs["staff"] = str(n.staff)
|
||||
ET.SubElement(notes_el, "note", **attrs)
|
||||
|
||||
# Chords
|
||||
|
||||
Reference in New Issue
Block a user