Instructional notebooks on music information retrieval.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
audio
img
.gitignore
CNAME
LICENSE
README.md
about.html
about.ipynb
about_ccrma_workshop.html
about_ccrma_workshop.ipynb
about_fmp.html
about_fmp.ipynb
adtlib.html
adtlib.ipynb
alphabetical_index.html
alphabetical_index.ipynb
audio_representation.html
audio_representation.ipynb
autocorrelation.html
autocorrelation.ipynb
basic_feature_extraction.html
basic_feature_extraction.ipynb
basic_mir.html
basic_mir.ipynb
beat_tracking.html
beat_tracking.ipynb
chroma.html
chroma.ipynb
crossValidationTemplate.py
custom.css
dp.html
dp.ipynb
dtw.html
dtw.ipynb
dtw_example.html
dtw_example.ipynb
energy.html
energy.ipynb
evaluation_beat.ipynb
evaluation_chord.ipynb
evaluation_onset.html
evaluation_onset.ipynb
exercise_genre_recognition.html
exercise_genre_recognition.ipynb
feature_sonification.html
feature_sonification.ipynb
ffmpeg.py
fourier_transform.html
fourier_transform.ipynb
genre_recognition.html
genre_recognition.ipynb
get_good_at_ipython.html
get_good_at_ipython.ipynb
hpss.html
hpss.ipynb
index.html
index.ipynb
intro_mir_eval.html
intro_mir_eval.ipynb
ipython_audio.html
ipython_audio.ipynb
kmeans.html
kmeans.ipynb
kmeans_instrument_classification.html
kmeans_instrument_classification.ipynb
lcs.html
lcs.ipynb
lsh_fingerprinting.html
lsh_fingerprinting.ipynb
magnitude_scaling.html
magnitude_scaling.ipynb
mfcc.html
mfcc.ipynb
midi_conversion_table.html
midi_conversion_table.ipynb
neural_networks.html
neural_networks.ipynb
nmf.html
nmf.ipynb
nmf_audio_mosaic.ipynb
novelty_functions.html
novelty_functions.ipynb
numpy_basics.html
numpy_basics.ipynb
onset_detection.html
onset_detection.ipynb
onset_segmentation.html
onset_segmentation.ipynb
pca.html
pca.ipynb
peak_picking.html
peak_picking.ipynb
pitch_transcription_exercise.html
pitch_transcription_exercise.ipynb
python_basics.html
python_basics.ipynb
realtime_spectrogram.html
realtime_spectrogram.ipynb
realtime_spectrogram.py
segmentation.html
segmentation.ipynb
sheet_music_representations.html
sheet_music_representations.ipynb
sox_and_ffmpeg.html
sox_and_ffmpeg.ipynb
spectral_features.html
spectral_features.ipynb
stanford_mir.py
stft.html
stft.ipynb
structure_analysis.ipynb
symbolic_representations.html
symbolic_representations.ipynb
template.ipynb
tempo_estimation.html
tempo_estimation.ipynb
thx_logo_theme.html
thx_logo_theme.ipynb
tuning_systems.html
tuning_systems.ipynb
video_chroma.html
video_chroma.ipynb
video_tempo_beat_tracking.html
video_tempo_beat_tracking.ipynb
why_mir.html
why_mir.ipynb
zcr.html
zcr.ipynb

README.md

musicinformationretrieval.com

stanford-mir is now musicinformationretrieval.com.

This repository contains instructional Jupyter notebooks related to music information retrieval (MIR). Inside these notebooks are Python code snippets that illustrate basic MIR systems.

The simplest way to use this repository is to (1) browse a read-only version of this repo at musicinformationretrieval.com, and (2) follow along using a blank Jupyter notebook of your own.

Installation

  1. Download and install Anaconda for Python 3.x.

  2. Install librosa and ffmpeg:

    conda install -c conda-forge librosa ffmpeg
    

    To upgrade:

    conda upgrade -c conda-forge librosa ffmpeg
    

[2018 June 24] These notebooks reflect the following package versions:

  • ipython 6.2.1
  • joblib 0.11
  • jupyter 1.0.0
  • librosa 0.6.1
  • matplotlib 2.2.0
  • numpy 1.14.2
  • pandas 0.22.0
  • scikit-learn 0.19.1
  • scipy 1.0.0

Usage

  1. Start the Jupyter notebook server on your local machine. For Mac users, at the Terminal:

    your-local-machine:~$ jupyter notebook
    

    For Windows users, open the application "Jupyter Notebook". Alternatively for Windows: open the application "Anaconda Prompt" and type in jupyter notebook.

    Jupyter should automatically open a new window in your web browser that resembles a directory tree.

  2. To open a new notebook, in the new window of your web browser, click on New near the top right to open a new notebook.

    • To rename the notebook, click on "Untitled" in the top left, and choose a different name.
    • Inside a cell, run 1+2. Press <Shift-Enter> on a cell to run that cell. Hopefully you get the output 3.
    • Inside a cell, run import scipy, sklearn, pandas, librosa. Press <Shift-Enter> to run the cell. If that runs without error, congratulations, you have the necessary libraries installed properly.
    • Try executing the content from https://musicinformationretrieval.com inside this blank notebook.
  3. To close the Jupyter notebook,

    • Save the notebook. (Either use keyboard shortcut s, or "File | Save" in the top menu.)
    • Close the browser window.
    • If you opened the notebook from a prompt/shell as indicated in Step 1 above, from that shell, press <Ctrl-C> twice to return to the prompt.

Congratulations, you are now running a Jupyter notebook, and you can get started with the notebooks in this repository.

After installing, if something doesn’t work, try closing the terminal or restarting the OS. Sometimes that can reset the necessary configurations.

Troubleshooting

Issue #729: import librosa causes TypeError: expected string or buffer

  • Workaround: downgrade joblib to v0.11:

    pip install joblib==0.11
    

Contributions

Your contributions are welcome! You can contribute in two ways:

  1. Submit an issue. Click on "Issues" in the right navigation bar, then "New Issue". Issues can include Python bugs, spelling mistakes, broken links, requests for new content, and more.

  2. Submit changes to source code or documentation. Fork this repo, make edits, then submit a pull request.

This repo is statically hosted using GitHub Pages. Any changes to HTML files in the gh-pages branch will be seen on musicinformationretrieval.com.

To edit musicinformationretrieval.com:

  1. Edit a notebook, e.g.:

    $ jupyter notebook kmeans.ipynb
    
  2. Convert notebook to HTML:

    $ jupyter nbconvert kmeans.ipynb
    
  3. Commit the notebook and the HTML:

    $ git add kmeans.ipynb kmeans.html
    $ git commit
    $ git push
    

    You may need to wait 1-2 minutes before the changes are live on GitHub Pages.