pumpp icon indicating copy to clipboard operation
pumpp copied to clipboard

Display linkage

Open bmcfee opened this issue 7 years ago • 0 comments

Description

Feature extractors and task transformers sometimes obscure certain parameters that are necessary for faithful visual reproduction of a transform. It wouldn't be hard to add a display method to each class which knows how to correctly render its own output and set parameters accordingly.

For example, spectral feature extractors could automatically call librosa.display.specshow with appropriate settings.

Similarly, task transformers could automatically call jams.display.display or the appropriate mir_eval.display function directly to plot their outputs (assuming inversion is possible). When inversion is not directly possible, they could have sensible default visualizations (eg as heatmaps with proper time axes).

Example

>>> T = pumpp.feature.Mel('mel')
>>> data = T.transform(filename='foo.mp3')
>>> T.display(data)

should plot the mel spectrogram contained in data.

bmcfee avatar Dec 01 '18 19:12 bmcfee