Commit c7736283 authored by Owen Campbell's avatar Owen Campbell

getting up to date

parents eb58c7aa bbfdda7b
{ {
"metadata": { "metadata": {
"name": "", "name": "",
"signature": "sha256:c2091c83f372205a4ebcdce326aec16d3effc143ec24d63e1026df692ec4f383" "signature": "sha256:5c2d491824e04ce0a7278e04803f3c8f56c68362ad164e1fa1330afd9cc674f6"
}, },
"nbformat": 3, "nbformat": 3,
"nbformat_minor": 0, "nbformat_minor": 0,
...@@ -66,19 +66,16 @@ ...@@ -66,19 +66,16 @@
"level": 2, "level": 2,
"metadata": {}, "metadata": {},
"source": [ "source": [
"Feature Extraction (work in progress)" "Spectral Feature Extraction and Classification"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"1. [Feature Extraction](notebooks/feature_extraction.ipynb)\n",
"1. [Spectral Features](notebooks/spectral_features.ipynb)\n", "1. [Spectral Features](notebooks/spectral_features.ipynb)\n",
"1. [Tonal Descriptors: Pitch and Chroma](notebooks/)\n",
"1. [Beat Tracking](notebooks/beat_tracking.ipynb)\n",
"1. [Tempo Estimation](notebooks/tempo_estimation.ipynb)\n",
"1. [Mel-Frequency Ceptral Coefficients](notebooks/mfcc.ipynb)\n", "1. [Mel-Frequency Ceptral Coefficients](notebooks/mfcc.ipynb)\n",
"1. [K-Nearest Neighbor](notebooks/knn.ipynb)\n",
"1. [Exercise: Instrument Classification using K-NN](exercises/knn_instrument_classification.ipynb)" "1. [Exercise: Instrument Classification using K-NN](exercises/knn_instrument_classification.ipynb)"
] ]
}, },
...@@ -87,20 +84,31 @@ ...@@ -87,20 +84,31 @@
"level": 2, "level": 2,
"metadata": {}, "metadata": {},
"source": [ "source": [
"Machine Learning (work in progress)" "More (work in progress)"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"1. [K-Nearest Neighbor](notebooks/knn.ipynb)\n", "1. [Tonal Descriptors: Pitch and Chroma](notebooks/)\n",
"1. [Feature Extraction](notebooks/feature_extraction.ipynb)\n",
"1. [Beat Tracking](notebooks/beat_tracking.ipynb)\n",
"1. [Tempo Estimation](notebooks/tempo_estimation.ipynb)\n",
"1. [K-Means Clustering](notebooks/kmeans.ipynb)\n", "1. [K-Means Clustering](notebooks/kmeans.ipynb)\n",
"1. [Nonnegative Matrix Factorization](notebooks/nmf.ipynb)\n", "1. [Nonnegative Matrix Factorization](notebooks/nmf.ipynb)\n",
"1. [Cross Validation](notebooks/cross_validation.ipynb)\n", "1. [Cross Validation](notebooks/cross_validation.ipynb)\n",
"1. [Exercise: Unsupervised Instrument Classification using K-Means](exercises/)\n", "1. [Exercise: Unsupervised Instrument Classification using K-Means](exercises/)\n",
"1. [Exercise: Source Separation using NMF](exercises/nmf_source_separation.ipynb)" "1. [Exercise: Source Separation using NMF](exercises/nmf_source_separation.ipynb)"
] ]
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
} }
], ],
"metadata": {} "metadata": {}
......
{ {
"metadata": { "metadata": {
"name": "", "name": "",
"signature": "sha256:acdbb21211e509f92197f1505242fdab716b14fe5434b6af6ac4f453c4e7606c" "signature": "sha256:c18acfb58e847f8024390a467d0b4ecd17445242efddf05612ef24a19c90e563"
}, },
"nbformat": 3, "nbformat": 3,
"nbformat_minor": 0, "nbformat_minor": 0,
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 16 "prompt_number": 2
}, },
{ {
"cell_type": "code", "cell_type": "code",
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 17 "prompt_number": 3
}, },
{ {
"cell_type": "code", "cell_type": "code",
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 18 "prompt_number": 4
}, },
{ {
"cell_type": "heading", "cell_type": "heading",
...@@ -166,21 +166,21 @@ ...@@ -166,21 +166,21 @@
{ {
"metadata": {}, "metadata": {},
"output_type": "pyout", "output_type": "pyout",
"prompt_number": 15, "prompt_number": 5,
"text": [ "text": [
"<matplotlib.text.Text at 0x3968210>" "<matplotlib.text.Text at 0x47e3150>"
] ]
}, },
{ {
"metadata": {}, "metadata": {},
"output_type": "display_data", "output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVHUeP/D3ARGTm3ckwaUkVGCCAYI0L5SCoeGjJrp4\nw9R0c1erbfupuz3PkuVP2iyVXDfTBDXTVTeVxPypraBJeEVttdRISrwgRshN4+L39wcxOsI4zOHM\nmYPzfj3PPM/MmTPfz8fjPPPhnO/5fr+SEEKAiIjsjoOtEyAiIttgASAislMsAEREdooFgIjITrEA\nEBHZqVa2TqCeJEm2ToGIqEWSezOnZgoAACSK5bZO4YFxIikDIUnDbJ3GA4HHUlk8nspaI82U/Vle\nAiIislMsAEREdooF4AHVNeoxW6fwwOCxVBaPp3awADygukb52zqFBwaPpbJ4PLVD8QIwZcoUeHp6\nQqfTGba9/vrr6N27N4KDgzFq1CjcuHFD6bBERGQhxQvACy+8gF27dhlti4mJwenTp3Hy5En4+/tj\n4cKFSoclIiILKV4A+vfvj/bt2xtti46OhoNDXajIyEgUFBQoHZaIiCyk+jiA1atXIyEhodH3TiRl\nGJ53jXqM1wqJiO5xNfMcrmaeV6QtVQvAggUL0Lp1a4wbN67R9zk4hIjo/rpG+Rv9cXzyzYz77H1/\nqhWAtLQ07Ny5E19++aVaIYmI6D5UKQC7du3Cu+++i6ysLLRp00aNkEREZIbincAJCQno27cvzp49\nCx8fH6xevRqzZs1CeXk5oqOjodfrMXOm/LkriIhI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meffZZaLValJeXw93dHUDDfSbufl73evXq1fjk\nk08QHBzzF1kxAAAAxElEQVSMwMBAbN682eB3ACAoKAj29vYIDg5udBC47nOG9rno2rUrkpKS0Ldv\nX/Tv3x8BAQH691JTU3H48GEEBQUhICAAy5YtQ2VlJWbMmIG0tDR4enri7bffxtSpU00/uUR34WJw\n1OKVlZXB2dkZAJCcnIyCggK8++67Vs6KSP04BkAtXkZGBhYtWoTq6mr4+PggPT3d2ikRtQi8AiAi\nslEcAyAislEsAERENooFgIjIRrEAEBHZKBYAIiIbxQJARGSj/h9z+8JSUmho6gAAAABJRU5ErkJg\ngg==\n",
"text": [ "text": [
"<matplotlib.figure.Figure at 0x395f350>" "<matplotlib.figure.Figure at 0x47ddd50>"
] ]
} }
], ],
"prompt_number": 15 "prompt_number": 5
}, },
{ {
"cell_type": "heading", "cell_type": "heading",
...@@ -191,114 +191,13 @@ ...@@ -191,114 +191,13 @@
] ]
}, },
{ {
"cell_type": "code", "cell_type": "markdown",
"collapsed": false,
"input": [
"from urlparse import urljoin\n",
"\n",
"kick_files = ['Bass_Drum_%02d_V01.WAV' % n\n",
" for n in range(1,11)]\n",
"\n",
"\n",
"snare_files = ['Bass_Drum_%02d_V01.WAV' % n\n",
" for n in range(1,11)]\n",
"\n",
"\n",
"for kick_file in kick_files:\n",
" url = urljoin('https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/', kick_file)\n",
" urllib.urlretrieve(url, filename=kick_file)\n",
"#kicks = [MonoLoader(filename=filename) for filename in kick_files]\n",
"#snares = [MonoLoader(filename=filename) for filename in kick_files]\n",
"\n",
"%ls"
],
"language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "source": [
{ "For training, see [Training Data](#Training-Data) below.\n",
"output_type": "stream", "\n",
"stream": "stdout", "For more on K-NN, see the [notebook on K-NN](../notebooks/knn.ipynb)."
"text": [ ]
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_01_V01.WAV\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_02_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_03_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_04_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_05_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_06_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_07_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_08_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_09_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/Bass_Drum_10_V01.WAV"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Bass_Drum_01_V01.WAV Bass_Drum_04_V01.WAV Bass_Drum_07_V01.WAV Bass_Drum_10_V01.WAV nmf_source_separation.ipynb\r\n",
"Bass_Drum_02_V01.WAV Bass_Drum_05_V01.WAV Bass_Drum_08_V01.WAV feature_sonification.ipynb\r\n",
"Bass_Drum_03_V01.WAV Bass_Drum_06_V01.WAV Bass_Drum_09_V01.WAV knn_instrument_classification.ipynb\r\n"
]
}
],
"prompt_number": 32
}, },
{ {
"cell_type": "heading", "cell_type": "heading",
...@@ -308,11 +207,6 @@ ...@@ -308,11 +207,6 @@
"Step 4: Run the Classifier" "Step 4: Run the Classifier"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{ {
"cell_type": "heading", "cell_type": "heading",
"level": 2, "level": 2,
...@@ -359,19 +253,6 @@ ...@@ -359,19 +253,6 @@
"outputs": [], "outputs": [],
"prompt_number": 7 "prompt_number": 7
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read a training set of drum samples. For each test signal, extract MFCCs, and use `mean` to obtain one MFCC vector per signal.\n",
"\n",
"Train a K-NN classifier using test signals. When training, discard the 0th MFCC coefficient, because it only represents the energy in the frame and does not add any discriminative power. \n",
"\n",
"\n",
"\n",
"For each segment in the test audio signal, feed it into the trained K-NN classifier, and save the label."
]
},
{ {
"cell_type": "heading", "cell_type": "heading",
"level": 2, "level": 2,
...@@ -402,7 +283,7 @@ ...@@ -402,7 +283,7 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 3 "prompt_number": 8
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
...@@ -428,7 +309,228 @@ ...@@ -428,7 +309,228 @@
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"prompt_number": 2 "prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Training Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we want to analyze and feature extract a small collection of audio samples - storing their feature data as our \"training data\". The commands below read all of the drum example .wav files from the MIR web site into an array, `snare_file_list`. \n",
"\n",
"Let's define a function to retrieve a list of URLs from a text file."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import urllib2\n",
"\n",
"def process_corpus(corpus_URL):\n",
" \"\"\"Read a list of files to process from the text file at corpusURL. Return a list of URLs\"\"\" \n",
" # Open and read each line\n",
" url_list_text_data = urllib2.urlopen(corpus_URL) # it's a file like object and works just like a file\n",
" for file_URL in url_list_text_data: # files are iterable\n",
" yield file_URL.rstrip()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 10
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use these commands to read in a list of filenames (samples) in a directory, replacing the URL with a URL to a list of URLs (one per line) indicating where the audio / drum samples are stored."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"snares_URL = \"https://ccrma.stanford.edu/workshops/mir2014/SnareCorpus.txt\"\n",
"snare_file_list = [audio_file_URL for audio_file_URL in process_corpus(snares_URL)]"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 11
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"kicks_URL = \"https://ccrma.stanford.edu/workshops/mir2014/KickCorpus.txt\"\n",
"kick_file_list = [audio_file_URL for audio_file_URL in process_corpus(kicks_URL)]"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 12
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To access the filenames contained in the array, use the square brackets [ ] to get to the element that you want to access. For example, to access the text URL file name of the first file in the list, you would type:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"snare_URL = snare_file_list[0]\n",
"snare_URL"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 13,
"text": [
"'https://ccrma.stanford.edu/workshops/mir2014/audio/drum%20samples/snares/SNARE_01_01.WAV'"
]
}
],
"prompt_number": 13
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we feature extract a sample collection, we need to sequentially access audio files, segment them (or not), and feature extract them. Loading a lot of audio files into memory is not always a feasible or desirable operation, so you will create a loop which loads an audio file, feature extracts it, and closes the audio file. Note that the only information that we retain in memory are the features that are extracted.\n",
"\n",
"Create a loop which reads in an audio file, extracts the zero crossing rate, and some spectral statistics. You can use the \"in\" operator to retrieve each audio file URL from process_corpus(), as used above. The feature information for each audio file (the \"feature vector\") should be stored as a feature array, with columns being the features and rows for each file. For example:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np\n",
"\n",
"number_of_files = 20\n",
"number_of_features = 5\n",
"features_snare = np.zeros([number_of_files, number_of_features])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 14
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" For example, when populated, features_snare might look like:\n",
" \n",
" features_snare =\n",
"\n",
" 0.5730 1.9183 2.9713 0.0004 0.0002\n",
" 0.4750 1.4834 2.4463 0.0004 0.0012\n",
" 0.5900 2.2857 3.1788 0.0003 0.0041\n",
" 0.5090 1.6622 2.6369 0.0004 0.0051\n",
" 0.4860 1.4758 2.2085 0.0004 0.0021\n",
" 0.6060 2.2119 3.2798 0.0004 0.0651\n",
" 0.4990 2.0607 2.7654 0.0004 0.0721\n",
" 0.6360 2.3153 3.0256 0.0003 0.0221\n",
" 0.5490 2.0137 3.0342 0.0004 0.0016\n",
" 0.5900 2.2857 3.1788 0.0003 0.0012\n",
" \n",
" Within your loop, here's a reminder how to read in your wav files, using an array of audio file URLs:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import urllib\n",
"from essentia.standard import MonoLoader\n",
"\n",
"sample_rate = 44100\n",
"urllib.urlretrieve(snare_URL, filename='/tmp/localfile.wav')\n",
"audio = MonoLoader(filename = '/tmp/localfile.wav', sampleRate = sample_rate)()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Appendix"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from urlparse import urljoin\n",
"\n",
"kick_files = ['Bass_Drum_%02d_V01.WAV' % n\n",
" for n in range(1,11)]\n",
"\n",
"snare_files = ['Bass_Drum_%02d_V01.WAV' % n\n",
" for n in range(1,11)]\n",
"\n",
"for kick_file in kick_files:\n",
" url = urljoin('https://ccrma.stanford.edu/workshops/mir2014/audio/drum%%20samples/kicks/', kick_file)\n",
" urllib.urlretrieve(url, filename=kick_file)\n",
"#kicks = [MonoLoader(filename=filename) for filename in kick_files]\n",
"#snares = [MonoLoader(filename=filename) for filename in kick_files]\n",
"\n",
"%ls"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Bass_Drum_01_V01.WAV Bass_Drum_04_V01.WAV Bass_Drum_07_V01.WAV Bass_Drum_10_V01.WAV nmf_source_separation.ipynb\r\n",
"Bass_Drum_02_V01.WAV Bass_Drum_05_V01.WAV Bass_Drum_08_V01.WAV feature_sonification.ipynb\r\n",
"Bass_Drum_03_V01.WAV Bass_Drum_06_V01.WAV Bass_Drum_09_V01.WAV knn_instrument_classification.ipynb\r\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Archived material:\n",
"\n",
"Read a training set of drum samples. For each test signal, extract MFCCs, and use `mean` to obtain one MFCC vector per signal.\n",
"\n",
"Train a K-NN classifier using test signals. When training, discard the 0th MFCC coefficient, because it only represents the energy in the frame and does not add any discriminative power. \n",
"\n",
"\n",
"\n",
"For each segment in the test audio signal, feed it into the trained K-NN classifier, and save the label.\n",
"\n",
"4. First, extract all of the feature data for the kick drums and store it in a feature array. (For my example, above, I'd put it in \"features_kick\")\n",
"\n",
"5. Next, extract all of the feature data for the snares, storing them in a different array. \n",
"Again, the kick and snare features should be separated in two different arrays!\n",
" \n",
"OK, no more help. The rest is up to you!"
]
} }
], ],
"metadata": {} "metadata": {}
......
...@@ -78,11 +78,11 @@ ...@@ -78,11 +78,11 @@
"source": [ "source": [
"- 2009 [[full list](https://ccrma.stanford.edu/wiki/MIR_workshop_2009/Participants)]: Luke Dahl, Mike Gao, Craig Hanson, Jorge Herrera, Denis Lebel, Sang Won Lee, Gautham Mysore, Jeremy Sawruk, Hwan Shim, Diana Siwiak, Steve Tjoa, Elie Noune, James Hughes, Stefan Tomic, Lisa Lim, Fred Barrett\n", "- 2009 [[full list](https://ccrma.stanford.edu/wiki/MIR_workshop_2009/Participants)]: Luke Dahl, Mike Gao, Craig Hanson, Jorge Herrera, Denis Lebel, Sang Won Lee, Gautham Mysore, Jeremy Sawruk, Hwan Shim, Diana Siwiak, Steve Tjoa, Elie Noune, James Hughes, Stefan Tomic, Lisa Lim, Fred Barrett\n",
"- 2011: Chris Colatos, Jeff Albert, Kamlesh Lakshminarayanan, Sean Zhang, Eli Stine, David Bird, Gina Collecchia, Dekun Zou, Bill Paseman, John Amuedo\n", "- 2011: Chris Colatos, Jeff Albert, Kamlesh Lakshminarayanan, Sean Zhang, Eli Stine, David Bird, Gina Collecchia, Dekun Zou, Bill Paseman, John Amuedo\n",
"- 2014: Owen Campbell, (Add your name here! Fork this repo on GitHub, and send a pull request.)" "- 2014: (Krishna Kumar, ... Add your name here! Fork this repo on GitHub, and send a pull request.)"
] ]
} }
], ],
"metadata": {} "metadata": {}
} }
] ]
} }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"metadata": { "metadata": {
"name": "", "name": "",
"signature": "sha256:3e21fdc85c366449b7dce6c5e6e1aedf32f06eb49d2a03663f8375eaccbea6e3" "signature": "sha256:319b465b5be6a89b194af42e27ece8ad415727e2aab733ccd86cd4378d4f6a86"
}, },
"nbformat": 3, "nbformat": 3,
"nbformat_minor": 0, "nbformat_minor": 0,
...@@ -23,190 +23,73 @@ ...@@ -23,190 +23,73 @@
"For classification, we're going to be using the new features in our arsenal: cherishing those \"spectral moments\" (centroid, bandwidth, skewness, kurtosis) and also examining other spectral statistics." "For classification, we're going to be using the new features in our arsenal: cherishing those \"spectral moments\" (centroid, bandwidth, skewness, kurtosis) and also examining other spectral statistics."
] ]
}, },
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Training Data"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"First, we want to analyze and feature extract a small collection of audio samples - storing their feature data as our \"training data\". The commands below read all of the drum example .wav files from the MIR web site into an array, `snare_file_list`. \n", "*Moments* is a term used in physics and statistics. There are raw moments and central moments. The first raw moment is known as the mean. The second central moment is known as the variance."
"\n",
"Let's define a function to retrieve a list of URLs from a text file."
] ]
}, },
{ {
"cell_type": "code", "cell_type": "heading",
"collapsed": false, "level": 2,
"input": [
"import urllib2\n",
"\n",
"def process_corpus(corpus_URL):\n",
" \"\"\"Read a list of files to process from the text file at corpusURL. Return a list of URLs\"\"\" \n",
" # Open and read each line\n",
" url_list_text_data = urllib2.urlopen(corpus_URL) # it's a file like object and works just like a file\n",
" for file_URL in url_list_text_data: # files are iterable\n",
" yield file_URL.rstrip()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Use these commands to read in a list of filenames (samples) in a directory, replacing the URL with a URL to a list of URLs (one per line) indicating where the audio / drum samples are stored." "`essentia.standard.Centroid`"
] ]
}, },
{
"cell_type": "code",
"collapsed": false,
"input": [
"snares_URL = \"https://ccrma.stanford.edu/workshops/mir2014/SnareCorpus.txt\"\n",
"snare_file_list = [audio_file_URL for audio_file_URL in process_corpus(snares_URL)]"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"kicks_URL = \"https://ccrma.stanford.edu/workshops/mir2014/KickCorpus.txt\"\n",
"kick_file_list = [audio_file_URL for audio_file_URL in process_corpus(kicks_URL)]"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 6
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"To access the filenames contained in the array, use the square brackets [ ] to get to the element that you want to access. For example, to access the text URL file name of the first file in the list, you would type:" "To compute the spectral centroid, we will use [`essentia.standard.Centroid`](http://essentia.upf.edu/documentation/reference/std_Centroid.html):"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"collapsed": false, "collapsed": false,
"input": [ "input": [
"snare_URL = snare_file_list[0]\n", "import essentia\n",
"snare_URL" "from essentia.standard import Spectrum, Centroid\n",
"spectrum = Spectrum()\n",
"centroid = Centroid()\n",
"x = essentia.array(randn(1024))\n",
"X = spectrum(x)\n",
"spectral_centroid = centroid(X)\n",
"print spectral_centroid"
], ],
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"metadata": {}, "output_type": "stream",
"output_type": "pyout", "stream": "stdout",
"prompt_number": 7,
"text": [ "text": [
"'https://ccrma.stanford.edu/workshops/mir2014/audio/drum%20samples/snares/SNARE_01_01.WAV'" "0.510950088501\n"
] ]
} }
], ],
"prompt_number": 7 "prompt_number": 46
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we feature extract a sample collection, we need to sequentially access audio files, segment them (or not), and feature extract them. Loading a lot of audio files into memory is not always a feasible or desirable operation, so you will create a loop which loads an audio file, feature extracts it, and closes the audio file. Note that the only information that we retain in memory are the features that are extracted.\n",
"\n",
"Create a loop which reads in an audio file, extracts the zero crossing rate, and some spectral statistics. You can use the \"in\" operator to retrieve each audio file URL from process_corpus(), as used above. The feature information for each audio file (the \"feature vector\") should be stored as a feature array, with columns being the features and rows for each file. For example:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np\n",
"\n",
"number_of_files = 20\n",
"number_of_features = 5\n",
"features_snare = np.zeros([number_of_files, number_of_features])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
" For example, when populated, features_snare might look like:\n", "This value is normalized between 0 and 1. If 0, then the centroid is at zero. If 1, then the centroid is all the way to the \"right\", i.e., equal to `fs/2`, the Nyquist frequency, or the highest frequency a digital signal can possibly have."
" \n",
" features_snare =\n",
"\n",
" 0.5730 1.9183 2.9713 0.0004 0.0002\n",
" 0.4750 1.4834 2.4463 0.0004 0.0012\n",
" 0.5900 2.2857 3.1788 0.0003 0.0041\n",
" 0.5090 1.6622 2.6369 0.0004 0.0051\n",
" 0.4860 1.4758 2.2085 0.0004 0.0021\n",
" 0.6060 2.2119 3.2798 0.0004 0.0651\n",
" 0.4990 2.0607 2.7654 0.0004 0.0721\n",
" 0.6360 2.3153 3.0256 0.0003 0.0221\n",
" 0.5490 2.0137 3.0342 0.0004 0.0016\n",
" 0.5900 2.2857 3.1788 0.0003 0.0012\n",
" \n",
" Within your loop, here's a reminder how to read in your wav files, using an array of audio file URLs:"
] ]
}, },
{
"cell_type": "code",
"collapsed": false,
"input": [
"import urllib\n",
"from essentia.standard import MonoLoader\n",
"\n",
"sample_rate = 44100\n",
"urllib.urlretrieve(snare_URL, filename='/tmp/localfile.wav')\n",
"audio = MonoLoader(filename = '/tmp/localfile.wav', sampleRate = sample_rate)()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 9
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Here's an example of how to feature extract the first frame from the current audio file, using Essentia's [ZeroCrossingRate](http://essentia.upf.edu/documentation/reference/streaming_ZeroCrossingRate.html) and [CentralMoments](http://essentia.upf.edu/documentation/reference/std_CentralMoments.html) classes..." "Here is a sanity check:"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"collapsed": false, "collapsed": false,
"input": [ "input": [
"from essentia.standard import ZeroCrossingRate, CentralMoments, Spectrum, Windowing, Centroid\n", "sum((X/sum(X))*linspace(0, 1, len(X)))"
"zcr = ZeroCrossingRate()\n",
"hamming_window = Windowing(type = 'hamming') # we need to window the frame to avoid FFT artifacts.\n",
"spectrum = Spectrum()\n",
"central_moments = CentralMoments()\n",
"spectral_centroid = Centroid()\n",
"\n",
"frame_size = 0.100 * sample_rate # 100ms\n",
"file_index = 0 # to process a single file, this will be your file loop iteration\n",
"\n",
"current_frame = audio[0 : frame_size]\n",
"features_snare[file_index, 0] = zcr(current_frame)\n",
"spectral_magnitude = spectrum(hamming_window(current_frame))\n",
"centroid = spectral_centroid(spectral_magnitude)\n",
"\n",
"# Spectral centroid in normalised bandwidth (i.e fraction of Nyquist frequency).\n",
"centroid"
], ],
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
...@@ -214,130 +97,87 @@ ...@@ -214,130 +97,87 @@
{ {
"metadata": {}, "metadata": {},
"output_type": "pyout", "output_type": "pyout",
"prompt_number": 10, "prompt_number": 47,
"text": [ "text": [
"0.22001729905605316" "0.51095009882361531"
] ]
} }
], ],
"prompt_number": 10 "prompt_number": 47
}, },
{ {
"cell_type": "code", "cell_type": "heading",
"collapsed": false, "level": 2,
"input": [
"# Centroid in spectral coefficient indices.\n",
"centroid * spectral_magnitude.shape[0]"
],
"language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "source": [
{ "`essentia.standard.CentralMoments`"
"metadata": {}, ]
"output_type": "pyout",
"prompt_number": 11,
"text": [
"485.3581617176533"
]
}
],
"prompt_number": 11
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Essentia can make things seem a little magical, here is how the centroid would be calculated:" "The first step to computing the other three spectral moments (spread, skewness, and kurtosis) is to compute the central moments of a spectrum:"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"collapsed": false, "collapsed": false,
"input": [ "input": [
"# Normalize the spectral magnitude\n", "from essentia.standard import CentralMoments\n",
"norm_spectral_mag = spectral_magnitude / np.sum(spectral_magnitude)\n", "central_moments = CentralMoments()\n",
"# Make index vector\n", "print central_moments(X)"
"indices = np.arange(norm_spectral_mag.shape[0])\n",
"\n",
"# Centroid, in spectral coefficient indices.\n",
"my_centroid = np.sum(norm_spectral_mag * indices)\n",
"my_centroid"
], ],
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"metadata": {}, "output_type": "stream",
"output_type": "pyout", "stream": "stdout",
"prompt_number": 12,
"text": [ "text": [
"485.13728477961195" "[ 1.00000000e+00 0.00000000e+00 8.45586956e-02 -9.95449489e-04\n",
" 1.29118226e-02]\n"
] ]
} }
], ],
"prompt_number": 12 "prompt_number": 48
}, },
{ {
"cell_type": "code", "cell_type": "heading",
"collapsed": false, "level": 2,
"input": [
"# Now we use the magnitude of the spectrum to compute a 5 element array, corresponding to:\n",
"# zeroth central moment (1.0)\n",
"# first central moment (Not the centroid, which is the first moment!)\n",
"# bandwidth\n",
"# skew\n",
"# kurtosis.\n",
"spectral_moments = central_moments(spectral_magnitude)\n",
"spectral_moments"
],
"language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "source": [
{ "`essentia.standard.DistributionShape`"
"metadata": {}, ]
"output_type": "pyout", },
"prompt_number": 13, {
"text": [ "cell_type": "markdown",
"array([ 1. , 0. , 0.04079479, 0.00723291, 0.00497805], dtype=float32)" "metadata": {},
] "source": [
} "To compute the spectral spread, skewness, and kurtosis, we use [`essentia.standard.DistributionShape`](http://essentia.upf.edu/documentation/reference/std_DistributionShape.html):"
], ]
"prompt_number": 13
}, },
{ {
"cell_type": "code", "cell_type": "code",
"collapsed": false, "collapsed": false,
"input": [ "input": [
"# Remember the zeroth column of features_snare is the ZCR.\n", "from essentia.standard import DistributionShape\n",
"features_snare[file_index, 1] = centroid\n", "distributionshape = DistributionShape()\n",
"features_snare[file_index, 2:5] = spectral_moments[2:5]\n", "spectral_moments = distributionshape(central_moments(X))\n",
"features_snare[file_index]" "print spectral_moments"
], ],
"language": "python", "language": "python",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"metadata": {}, "output_type": "stream",
"output_type": "pyout", "stream": "stdout",
"prompt_number": 14,
"text": [ "text": [
"array([ 0.1292517 , 0.2200173 , 0.04079479, 0.00723291, 0.00497805])" "(0.08455869555473328, -0.04048385098576546, -1.1941944360733032)\n"
] ]
} }
], ],
"prompt_number": 14 "prompt_number": 49
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"4. First, extract all of the feature data for the kick drums and store it in a feature array. (For my example, above, I'd put it in \"features_kick\")\n",
"\n",
"5. Next, extract all of the feature data for the snares, storing them in a different array. \n",
"Again, the kick and snare features should be separated in two different arrays!\n",
" \n",
"OK, no more help. The rest is up to you!"
]
} }
], ],
"metadata": {} "metadata": {}
......
...@@ -9,6 +9,9 @@ from sklearn import cross_validation ...@@ -9,6 +9,9 @@ from sklearn import cross_validation
from sklearn.neighbors import KNeighborsClassifier from sklearn.neighbors import KNeighborsClassifier
from sklearn import preprocessing from sklearn import preprocessing
import urllib2 # the lib that handles the url stuff import urllib2 # the lib that handles the url stuff
import urllib
from essentia.standard import MonoLoader
from essentia.standard import ZeroCrossingRate, CentralMoments, Spectrum, Windowing, Centroid
# Here are examples of how scaling functions would be written, however nowdays SciKit # Here are examples of how scaling functions would be written, however nowdays SciKit
# Learn will do it for you with the MinMaxScaler! # Learn will do it for you with the MinMaxScaler!
...@@ -86,9 +89,10 @@ def crossValidateKNN(features, labels): ...@@ -86,9 +89,10 @@ def crossValidateKNN(features, labels):
errors[foldIndex] = matches.mean() errors[foldIndex] = matches.mean()
print('cross validation error: %f' % errors.mean()) print('cross validation error: %f' % errors.mean())
print('cross validation accuracy: %f' % (1.0 - errors.mean())) print('cross validation accuracy: %f' % (1.0 - errors.mean()))
return errors
def processCorpus(corpusURL): def process_corpus(corpusURL):
"""Read a list of files to process from the text file at corpusURL. Return a list of URLs""" """Read a list of files to process from the text file at corpusURL. Return a list of URLs"""
# Open and read each line # Open and read each line
urlListTextData = urllib2.urlopen(corpusURL) # it's a file like object and works just like a file urlListTextData = urllib2.urlopen(corpusURL) # it's a file like object and works just like a file
...@@ -96,6 +100,39 @@ def processCorpus(corpusURL): ...@@ -96,6 +100,39 @@ def processCorpus(corpusURL):
yield fileURL.rstrip() yield fileURL.rstrip()
# return [fileURL.rstrip() for fileURL in urlListTextData] # return [fileURL.rstrip() for fileURL in urlListTextData]
# audioFileURLs = processCorpus("https://ccrma.stanford.edu/workshops/mir2014/SmallCorpus.txt") # audioFileURLs = process_corpus("https://ccrma.stanford.edu/workshops/mir2014/SmallCorpus.txt")
# for audioFileURL in processCorpus("https://ccrma.stanford.edu/workshops/mir2014/SmallCorpus.txt"): # for audioFileURL in process_corpus("https://ccrma.stanford.edu/workshops/mir2014/SmallCorpus.txt"):
# print audioFileURL # print audioFileURL
def spectral_features(filelist):
"""
Given a list of files, retrieve them, analyse the first 100mS of each file and return
a feature table.
"""
number_of_files = len(filelist)
number_of_features = 5
features = np.zeros([number_of_files, number_of_features])
sample_rate = 44100
for file_index, url in enumerate(filelist):
print url
urllib.urlretrieve(url, filename='/tmp/localfile.wav')
audio = MonoLoader(filename = '/tmp/localfile.wav', sampleRate = sample_rate)()
zcr = ZeroCrossingRate()
hamming_window = Windowing(type = 'hamming') # we need to window the frame to avoid FFT artifacts.
spectrum = Spectrum()
central_moments = CentralMoments()
spectral_centroid = Centroid()
frame_size = int(round(0.100 * sample_rate)) # 100ms
# Only do the first frame for now.
# TODO we should generate values for the entire file, probably by averaging the features.
current_frame = audio[0 : frame_size]
features[file_index, 0] = zcr(current_frame)
spectral_magnitude = spectrum(hamming_window(current_frame))
centroid = spectral_centroid(spectral_magnitude)
spectral_moments = central_moments(spectral_magnitude)
features[file_index, 1] = centroid
features[file_index, 2:5] = spectral_moments[2:5]
return features
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment