From db77157d663898b51e2a76b9c6ddfda9030580bc Mon Sep 17 00:00:00 2001 From: Nathan Fradet <56734983+Natooz@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:45:23 +0100 Subject: [PATCH] Update miditoolkit/midi/containers.py Co-authored-by: Aarni Koskela --- miditoolkit/midi/containers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miditoolkit/midi/containers.py b/miditoolkit/midi/containers.py index 5fefec3..c0c4a99 100755 --- a/miditoolkit/midi/containers.py +++ b/miditoolkit/midi/containers.py @@ -284,7 +284,11 @@ def __init__( self.control_changes = [] if control_changes is None else control_changes self.pedals = [] if pedals is None else pedals - def remove_notes_with_no_duration(self): + def remove_invalid_notes(self, verbose: bool = True) -> None: + warnings.warn("Call remove_notes_with_no_duration() instead.", DeprecationWarning) + return self.remove_notes_with_no_duration() + + def remove_notes_with_no_duration(self) -> None: """Removes (inplace) notes whose end time is before or at their start time.""" for i in range(self.nb_notes - 1, -1, -1): if self.notes[i].start >= self.notes[i].end: