Skip to content

Commit

Permalink
update python version to 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
yiitozer committed Dec 4, 2023
1 parent e680928 commit e284952
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 31 deletions.
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
10 changes: 5 additions & 5 deletions ismir2021lbd_using_the_synctoolbox_for_an_experiment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -722,7 +722,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
13 changes: 6 additions & 7 deletions sync_audio_audio_full.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
Expand All @@ -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))"
Expand Down Expand Up @@ -151,8 +151,7 @@
"metadata": {
"pycharm": {
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -383,7 +382,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
8 changes: 4 additions & 4 deletions sync_audio_audio_simple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
Expand Down Expand Up @@ -228,7 +228,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
17 changes: 7 additions & 10 deletions sync_audio_score_full.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -146,8 +146,7 @@
"metadata": {
"pycharm": {
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -389,7 +386,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
2 changes: 1 addition & 1 deletion synctoolbox/feature/novelty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e284952

Please sign in to comment.