MFCC based audio grain sorting
- Global parameters:
- number of MFCCs used,
- size of the FFT used in calculating MFCCs,
- length of the frame,
- 0th MFCC toggle,
- onset detection toggle,
- windowing toggle,
- smoothing toggle,
- smoothing window width,
- sigma parameter of the Gauss filter,
- segmentation hop length.
- Loading a file using GUI. [ipyfilechooser] / [google.colab]
- Segmentation:
- Windowing of signal in each frame using Hamming Function. [numpy]
- Calculation of MFCCs for each frame without centering [librosa]
- Example frame sorting using MFCC values via as folllows,
- using a k-d tree structure: [scipy.spatial]
- by querying for all the neighbours of frame[0], sorted by distance in ascending order,
- by finding the shortest path that traverses the entire tree starting from frame[0],
- using correlation clustering represented as hierarchy dendrogram, sorted by distance in ascending order. [scipy.cluster]
- Output construction via concatenation of frames in arrangements calculated in step 6., optionally smoothing out signal discontinuities between them using a 1-Dimensional Gaussian filter. [scipy.ndimage]
All results displayed are plotted using matplotlib.
This project references online resources which elaborate further on the concepts of audio feature extraction and math-based workflows in Python, such as musicinformationretrieval.com as well as documentation of matplotlib, numpy, librosa and scipy libraries.