From e284952d110f17f1f02b933801f6baf329f1fd7f Mon Sep 17 00:00:00 2001 From: yiitozer Date: Mon, 4 Dec 2023 12:47:44 +0100 Subject: [PATCH] update python version to 3.11 --- environment.yml | 4 ++-- ...sing_the_synctoolbox_for_an_experiment.ipynb | 10 +++++----- setup.py | 4 ++-- sync_audio_audio_full.ipynb | 13 ++++++------- sync_audio_audio_simple.ipynb | 8 ++++---- sync_audio_score_full.ipynb | 17 +++++++---------- synctoolbox/feature/novelty.py | 2 +- 7 files changed, 27 insertions(+), 31 deletions(-) diff --git a/environment.yml b/environment.yml index 305daf7..fea1fb0 100644 --- a/environment.yml +++ b/environment.yml @@ -6,8 +6,8 @@ channels: dependencies: - python>=3.8.0, <4.0.0 - - ipython=7.8.* - - jupyter=1.0.* + - ipython + - jupyter - pip: - synctoolbox==1.2.* diff --git a/ismir2021lbd_using_the_synctoolbox_for_an_experiment.ipynb b/ismir2021lbd_using_the_synctoolbox_for_an_experiment.ipynb index be72181..36eba41 100644 --- a/ismir2021lbd_using_the_synctoolbox_for_an_experiment.ipynb +++ b/ismir2021lbd_using_the_synctoolbox_for_an_experiment.ipynb @@ -171,8 +171,8 @@ " print(f\"\\nRunning for the Song ID {song_id} in SWD.\")\n", " \n", " # read audio\n", - " audio_1, _ = librosa.load(os.path.join(AUDIO_DIR, filename_1 + '.wav'), Fs)\n", - " audio_2, _ = librosa.load(os.path.join(AUDIO_DIR, filename_2 + '.wav'), Fs)\n", + " audio_1, _ = librosa.load(os.path.join(AUDIO_DIR, filename_1 + '.wav'), sr=Fs)\n", + " audio_2, _ = librosa.load(os.path.join(AUDIO_DIR, filename_2 + '.wav'), sr=Fs)\n", " \n", " # estimate tuning\n", " tuning_offset_1 = estimate_tuning(audio_1, Fs)\n", @@ -722,7 +722,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -736,9 +736,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.10" + "version": "3.11.5" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/setup.py b/setup.py index 76ab85c..61a2ee3 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='synctoolbox', - version='1.3.1', + version='1.3.2', description='Python Package for Efficient, Robust, and Accurate Music Synchronization (SyncToolbox)', author='Meinard Müller, Yigitcan Özer, Michael Krause, Thomas Prätzlich and Jonathan Driedger', author_email='meinard.mueller@audiolabs-erlangen.de', @@ -24,7 +24,7 @@ ], keywords='audio music sound synchronization dtw mrmsdtw', license='MIT', - install_requires=['ipython >= 7.8.0, < 8.0.0', + install_requires=['ipython >= 7.10.0, < 8.0.0', 'librosa >= 0.8.0, < 1.0.0', 'matplotlib >= 3.1.0, < 4.0.0', 'music21 >= 5.7.0, < 6.0.0', diff --git a/sync_audio_audio_full.ipynb b/sync_audio_audio_full.ipynb index d697670..2d1ab70 100644 --- a/sync_audio_audio_full.ipynb +++ b/sync_audio_audio_full.ipynb @@ -75,7 +75,7 @@ }, "outputs": [], "source": [ - "audio_1, _ = librosa.load('data_music/Schubert_D911-03_HU33.wav', Fs)\n", + "audio_1, _ = librosa.load('data_music/Schubert_D911-03_HU33.wav', sr=Fs)\n", "\n", "plot_signal(audio_1, Fs=Fs, ylabel='Amplitude', title='Version 1', figsize=figsize)\n", "ipd.display(ipd.Audio(audio_1, rate=Fs))" @@ -98,7 +98,7 @@ }, "outputs": [], "source": [ - "audio_2, _ = librosa.load('data_music/Schubert_D911-03_SC06.wav', Fs)\n", + "audio_2, _ = librosa.load('data_music/Schubert_D911-03_SC06.wav', sr=Fs)\n", "\n", "plot_signal(audio_2, Fs=Fs, ylabel='Amplitude', title='Version 2', figsize=figsize)\n", "ipd.display(ipd.Audio(audio_2, rate=Fs))" @@ -151,8 +151,7 @@ "metadata": { "pycharm": { "name": "#%%\n" - }, - "scrolled": false + } }, "outputs": [], "source": [ @@ -383,7 +382,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -397,9 +396,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.5" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/sync_audio_audio_simple.ipynb b/sync_audio_audio_simple.ipynb index 81d18be..7fe0573 100644 --- a/sync_audio_audio_simple.ipynb +++ b/sync_audio_audio_simple.ipynb @@ -67,7 +67,7 @@ }, "outputs": [], "source": [ - "audio_1, _ = librosa.load('data_music/Schubert_D911-01_HU33.wav', Fs)\n", + "audio_1, _ = librosa.load('data_music/Schubert_D911-01_HU33.wav', sr=Fs)\n", "\n", "plot_signal(audio_1, Fs=Fs, ylabel='Amplitude', title='Version 1', figsize=figsize)\n", "ipd.display(ipd.Audio(audio_1, rate=Fs))" @@ -228,7 +228,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -242,9 +242,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.5" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/sync_audio_score_full.ipynb b/sync_audio_score_full.ipynb index b39e244..31fd576 100644 --- a/sync_audio_score_full.ipynb +++ b/sync_audio_score_full.ipynb @@ -72,7 +72,7 @@ }, "outputs": [], "source": [ - "audio, _ = librosa.load('data_music/Chopin_Op010-03-Measures1-8_Igoshina.wav', Fs)\n", + "audio, _ = librosa.load('data_music/Chopin_Op010-03-Measures1-8_Igoshina.wav', sr=Fs)\n", "\n", "plot_signal(x=audio, Fs=Fs, figsize=(9,3))\n", "plt.title('Etude Op.10 No.3 in E Major by Frederic Chopin\\n Performer: Valentina Igoshina')\n", @@ -146,8 +146,7 @@ "metadata": { "pycharm": { "name": "#%%\n" - }, - "scrolled": false + } }, "outputs": [], "source": [ @@ -169,9 +168,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "def get_features_from_annotation(df_annotation, feature_rate, visualize=True):\n", @@ -340,7 +337,7 @@ " second, duration, pitch, velocity = row\n", " freq = 2 ** ((pitch - 69) / 12) * 440\n", " for harmonic_num, harmonic_weight in enumerate(harmonics):\n", - " x_peaks += velocity / 128 * harmonic_weight * librosa.clicks(second, \n", + " x_peaks += velocity / 128 * harmonic_weight * librosa.clicks(times=second, \n", " sr=Fs,\n", " click_freq=(harmonic_num+1)*freq,\n", " length=len(audio),\n", @@ -389,7 +386,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -403,9 +400,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.5" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/synctoolbox/feature/novelty.py b/synctoolbox/feature/novelty.py index 890a1a4..df8cd32 100644 --- a/synctoolbox/feature/novelty.py +++ b/synctoolbox/feature/novelty.py @@ -46,7 +46,7 @@ def spectral_flux(f_audio: np.ndarray, n_fft=window_size, hop_length=hop_size, win_length=window_size, - window='hanning') + window='hann') Y = np.log(1 + gamma * np.abs(X)) Y_diff = np.diff(Y, n=1)