class pumpp.task.ChordTransformer(name='chord', sr=22050, hop_length=512, sparse=False)[source]

Chord annotation transformers.

This transformer uses a (pitch, root, bass) decomposition of chord annotations.

name : str

The name of the chord transformer

sr : number > 0

The sampling rate of audio

hop_length : int > 0

The number of samples between each annotation frame

sparse : bool

If True, root and bass values are sparsely encoded as integers in [0, 12]. If False, root and bass values are densely encoded as 13-dimensional booleans.

__init__(name='chord', sr=22050, hop_length=512, sparse=False)[source]

Initialize a chord task transformer


__init__([name, sr, hop_length, sparse]) Initialize a chord task transformer
decode_events(encoded[, transition, …]) Decode labeled events into (time, value) pairs
decode_intervals(encoded[, duration, multi, …]) Decode labeled intervals into (start, end, value) triples
empty(duration) Empty chord annotations
encode_events(duration, events, values[, dtype]) Encode labeled events as a time-series matrix.
encode_intervals(duration, intervals, values) Encode labeled intervals as a time-series matrix.
inverse(pitch, root, bass[, duration])
merge(data) Merge an array of output dictionaries into a single dictionary with properly scoped names.
register(field, shape, dtype) Register a field as a tensor with specified shape and type.
scope(key) Apply the name scope to a key
transform(jam[, query]) Transform jam object to make data for this task
transform_annotation(ann, duration) Apply the chord transformation.