Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	partitura/performance.py
  • Loading branch information
manoskary committed Sep 25, 2023
2 parents 6151ee9 + 2e58c9b commit f3ce4ef
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions partitura/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def __init__(
super().__init__()
self.id = id
self.part_name = part_name
self.notes = list(map(lambda n: n if isinstance(n, PerformedNote) else PerformedNote(n), notes))
self.notes = list(
map(
lambda n: n if isinstance(n, PerformedNote) else PerformedNote(n), notes
)
)
self.controls = controls or []
self.programs = programs or []
self.ppq = ppq
Expand Down Expand Up @@ -422,10 +426,7 @@ def _validate_note_on(self, value):
def _validate_note_off(self, value):
if self.pnote_dict.get("note_on", -1) < 0:
return
if (
value < 0
or value < self.pnote_dict["note_on"]
):
if value < 0 or value < self.pnote_dict["note_on"]:
raise ValueError(
f"Note off value provided is invalid, "
f"must be a positive value greater than or equal to 0 and greater or equal to note_on"
Expand All @@ -440,10 +441,7 @@ def _validate_note_on_tick(self, value):
def _validate_note_off_tick(self, value):
if self.pnote_dict.get("note_on_tick", -1) < 0:
return
if (
value < 0
or value < self.pnote_dict["note_on_tick"]
):
if value < 0 or value < self.pnote_dict["note_on_tick"]:
raise ValueError(
f"Note off tick value provided is invalid, "
f"must be a positive value greater than or equal to 0 and greater or equal to note_on_tick"
Expand Down

0 comments on commit f3ce4ef

Please sign in to comment.