-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Audio Alignment for Harmonix Set\n", | ||
"\n", | ||
"This notebook tries to align purchased audio with original audio from Harmonix. \n", | ||
"\n", | ||
"More specifically, for each pair of audio files:\n", | ||
"- Load both audio files\n", | ||
"- Use DTW to find the correct start and end points of alignment\n", | ||
"- Produce the new aligned mp3s from the purchased audio" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from __future__ import print_function\n", | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"\n", | ||
"import librosa\n", | ||
"from librosa import display\n", | ||
"\n", | ||
"ORIG_MP3_PATH = \"/home/uri/Projects/\"\n", | ||
"PURC_MP3_PATH = \"/home/uri/Dropbox/drop/HarmonixMP3_YouTube/\"\n", | ||
"SR = 22050\n", | ||
"\n", | ||
"%matplotlib inline" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Load audio\n", | ||
"_1, fs = librosa.load('audio/sir_duke_slow.mp3')\n", | ||
"plt.figure(figsize=(16, 4))\n", | ||
"librosa.display.waveplot(x_1, sr=fs)\n", | ||
"plt.title('Slower Version $X_1$')\n", | ||
"plt.tight_layout()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |