From 85df25b1592f2f0d56da8e7042f4b63be66f5c00 Mon Sep 17 00:00:00 2001 From: David Rubinstein Date: Tue, 16 Apr 2024 12:45:43 -0400 Subject: [PATCH 1/3] Use newer scipy gaussian window fn --- basic_pitch/note_creation.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basic_pitch/note_creation.py b/basic_pitch/note_creation.py index 5a8072ca..0338b6fa 100644 --- a/basic_pitch/note_creation.py +++ b/basic_pitch/note_creation.py @@ -190,7 +190,7 @@ def get_pitch_bends( note events with pitch bends """ window_length = n_bins_tolerance * 2 + 1 - freq_gaussian = scipy.signal.gaussian(window_length, std=5) + freq_gaussian = scipy.signal.windows.gaussian(window_length, std=5) note_events_with_pitch_bends = [] for start_idx, end_idx, pitch_midi, amplitude in note_events: freq_idx = int(np.round(midi_pitch_to_contour_bin(pitch_midi))) diff --git a/pyproject.toml b/pyproject.toml index 24698370..51bb5a99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "basic-pitch" -version = "0.3.0" +version = "0.3.1" description = "Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection." keywords = [] classifiers = [ From 04030e91f40aec60181e5a54ea7ce0dc6665cf50 Mon Sep 17 00:00:00 2001 From: David Rubinstein Date: Tue, 16 Apr 2024 13:19:58 -0400 Subject: [PATCH 2/3] Fix ML Libs version pins --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 51bb5a99..f6486b4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", ] dependencies = [ - "coremltools; platform_system == 'Darwin' and python_version < '3.11'", + "coremltools; platform_system == 'Darwin'", "librosa>=0.8.0", "mir_eval>=0.6", "numpy>=1.18", @@ -27,7 +27,7 @@ dependencies = [ "scikit-learn", "scipy>=1.4.1", "tensorflow>=2.4.1,<2.16; platform_system != 'Darwin' and python_version >= '3.11'", - "tensorflow-macos>=2.4.1; platform_system == 'Darwin' and python_version >= '3.11'", + "tensorflow-macos>=2.4.1,<2.16; platform_system == 'Darwin'", "tflite-runtime; platform_system == 'Linux' and python_version < '3.11'", "typing_extensions", ] From 0edd6ce1531e49d019bb6c901ff10a04ff99fcb1 Mon Sep 17 00:00:00 2001 From: David Rubinstein Date: Tue, 16 Apr 2024 13:52:46 -0400 Subject: [PATCH 3/3] tf pin --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f6486b4c..75bdb4ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,8 @@ dependencies = [ "resampy>=0.2.2,<0.4.3", "scikit-learn", "scipy>=1.4.1", - "tensorflow>=2.4.1,<2.16; platform_system != 'Darwin' and python_version >= '3.11'", - "tensorflow-macos>=2.4.1,<2.16; platform_system == 'Darwin'", + "tensorflow>=2.4.1,<2.15.1; platform_system != 'Darwin' and python_version >= '3.11'", + "tensorflow-macos>=2.4.1,<2.15.1; platform_system == 'Darwin'", "tflite-runtime; platform_system == 'Linux' and python_version < '3.11'", "typing_extensions", ] @@ -56,8 +56,8 @@ test = [ "pytest-mock", ] tf = [ - "tensorflow>=2.4.1,<2.16; platform_system != 'Darwin'", - "tensorflow-macos>=2.4.1,<2.16; platform_system == 'Darwin' and python_version > '3.7'", + "tensorflow>=2.4.1,<2.15.1; platform_system != 'Darwin'", + "tensorflow-macos>=2.4.1,<2.15.1; platform_system == 'Darwin' and python_version > '3.7'", ] coreml = ["coremltools"] onnx = ["onnxruntime"]