practically universal music pre-processor
The goal of this package is to make it easy to convert pairs of (audio, jams)
into data that can
be easily consumed by statistical algorithms. Some desired features:
- Converting tags to sparse encoding vectors
- Sampling
(start, end, label)
to frame-level annotations at a specific sampling rate - Extracting first-level features (eg, Mel spectra or CQT) from audio
- Aligning and storing the results in a simple data structure (npz, hdf5)
- Converting between annotation spaces for a given task
- Helper variables for semi-supervised learning
>>> import jams
>>> import pumpp
>>> audio_f = '/path/to/audio/myfile.ogg'
>>> jams_f = '/path/to/annotations/myfile.jamz'
>>> # Set up sampling and frame rate parameters
>>> sr, hop_length = 44100, 512
>>> # Create a feature extraction object
>>> p_cqt = pumpp.feature.ConstantQ(name='cqt', sr=sr, hop_length=hop_length)
>>> # Create some annotation extractors
>>> p_beat = pumpp.task.BeatTransformer(sr=sr, hop_length=hop_length)
>>> p_chord = pumpp.task.SimpleChordTransformer(sr=sr, hop_length=hop_length)
>>> # Apply the extractors
>>> data = pumpp.apply(audio_f, jams_f, p_cqt, p_beat, b_chord)