From d401dcb65295c151a2652ab45618826c05e864d4 Mon Sep 17 00:00:00 2001 From: fosfrancesco Date: Mon, 16 Sep 2024 12:37:04 +0200 Subject: [PATCH] estimate_voice_info now default to false --- partitura/io/importmidi.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/partitura/io/importmidi.py b/partitura/io/importmidi.py index 96ee2756..6bfcfe05 100644 --- a/partitura/io/importmidi.py +++ b/partitura/io/importmidi.py @@ -306,7 +306,7 @@ def load_score_midi( filename: Union[PathLike, mido.MidiFile], part_voice_assign_mode: Optional[int] = 0, quantization_unit: Optional[int] = None, - estimate_voice_info: bool = True, + estimate_voice_info: bool = False, estimate_key: bool = False, assign_note_ids: bool = True, ) -> score.Score: @@ -363,10 +363,8 @@ def load_score_midi( the MIDI file. estimate_voice_info : bool, optional When True use Chew and Wu's voice separation algorithm [2]_ to - estimate voice information. This option is ignored for - part/voice assignment modes that infer voice information from - the track/channel info (i.e. `part_voice_assign_mode` equals - 1, 3, 4, or 5). Defaults to True. + estimate voice information. If the voice information was imported + from the file, it will be overridden. Defaults to False. Returns ------- @@ -524,6 +522,8 @@ def load_score_midi( warnings.warn("pitch spelling") spelling_global = analysis.estimate_spelling(note_array) + + if estimate_voice_info: warnings.warn("voice estimation", stacklevel=2) # TODO: deal with zero duration notes in note_array.