Skip to content

Commit

Permalink
Changed PerformedNote object to not directly inherit from a dict but …
Browse files Browse the repository at this point in the history
…to perform like one. This avoids internal recursions.
  • Loading branch information
manoskary committed Sep 25, 2023
1 parent c7e24ce commit b6bed0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions partitura/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ def _validate_values(self, key=None):
self._validate_sound_off()

def _validate_sound_off(self):
if self.get("note_off", -1) < 0:
return
if self.pnote_dict["sound_off"] < self.pnote_dict["note_off"]:
raise ValueError(f"sound_off must be greater or equal to note_off")

Expand Down

0 comments on commit b6bed0e

Please sign in to comment.