Comparing frescobaldi:master...hexbold:master · frescobaldi/python-ly
Commits on Mar 5, 2026
-
Fix staff numbering reset and init _chord_bar
Reset self.staff to 0 in new_part() to prevent chord notes from inheriting stale staff numbers from a previous part. Also initialize _chord_bar attribute used by chord bar boundary fix.
-
Fix chord staff assignment and bar boundary tracking
- Save bar reference before increase_bar_dura() which may trigger new_bar(), so chord notes are added to the correct bar - Assign staff number to chord notes in piano/multi-staff parts - Add FIX comments for repeated chord duration bar boundaries
-
Fix check_simultan removing unnecessary guard
Remove the outer 'if self.sections' guard which prevented merge_voice and sections.pop() from executing when sections list was unexpectedly empty, masking errors instead of letting them surface.
-
Simplify iterate_part: use barlist[-1] instead of last_bar()
Replace last_bar() method (which iterated in reverse looking for Bar instances) with direct barlist[-1] access. The barlist only contains Bar objects, so the type check was unnecessary. Remove the now-unused last_bar() method from ScorePart.
-
Add midi-program support and fix sound map entries
- Add <midi-program> tags to MusicXML part definitions, mapping MIDI instrument names to General MIDI program numbers - Add midi_program_map dictionary with full GM instrument mappings - Fix sound map: cello -> strings.cello, choir aahs -> voice.vocals, acoustic grand -> keyboard.piano - Add missing entries: bass drum, crash cymbals
-
Add documentation for known upstream tempo bugs
Document two unfixed upstream bugs with workarounds: - Tempo + chords in first bar causes corrupt MusicXML - Tempo + slurs in first bar causes IndexError crash Both are worked around by stripping \tempo before conversion and injecting it into the MusicXML afterwards.