pumpp.core.Pump¶
-
class
pumpp.core.
Pump
(*ops)[source]¶ Top-level pump object.
This class is used to collect feature and task transformers
See also
Examples
Create a CQT and chord transformer
>>> p_cqt = pumpp.feature.CQT('cqt', sr=44100, hop_length=1024) >>> p_chord = pumpp.task.ChordTagTransformer(sr=44100, hop_length=1024) >>> pump = pumpp.Pump(p_cqt, p_chord) >>> data = pump.transform('/my/audio/file.mp3', '/my/jams/annotation.jams')
Attributes
ops (list of (BaseTaskTransformer, FeatureExtractor)) The operations to apply Methods
__init__
(*ops)add
(op)Add an operation to this pump. sampler
(n_samples, duration)Construct a sampler object for this pump’s operators. transform
(audio_f[, jam])Apply the transformations to an audio file, and optionally JAMS object. Attributes
fields