pumpp.task.BeatTransformer

class pumpp.task.BeatTransformer(name='beat', sr=22050, hop_length=512, p_self_beat=None, p_init_beat=None, p_state_beat=None, p_self_down=None, p_init_down=None, p_state_down=None)[source]

Task transformation for beat tracking

Attributes:
name : str

The name of this transformer

sr : number > 0

The audio sampling rate

hop_length : int > 0

The hop length for annotation frames

p_self_beat : None, float in (0, 1), or np.ndarray [shape=(2,)]

Optional self-loop probability(ies), used for Viterbi decoding

p_state_beat : None or float in (0, 1)

Optional marginal probability for beat state

p_init_beat : None or float in (0, 1)

Optional initial probability for beat state

p_self_down : None, float in (0, 1), or np.ndarray [shape=(2,)]

Optional self-loop probability(ies), used for Viterbi decoding

p_state_down : None or float in (0, 1)

Optional marginal probability for downbeat state

p_init_down : None or float in (0, 1)

Optional initial probability for downbeat state

__init__(name='beat', sr=22050, hop_length=512, p_self_beat=None, p_init_beat=None, p_state_beat=None, p_self_down=None, p_init_down=None, p_state_down=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([name, sr, hop_length, …]) Initialize self.
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) Create an empty jams.Annotation for this task.
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(encoded[, downbeat, duration]) Inverse transformation for beats and optional downbeats
merge(data) Merge an array of output dictionaries into a single dictionary with properly scoped names.
pop(field)
register(field, shape, dtype) Register a field as a tensor with specified shape and type.
scope(key) Apply the name scope to a key
set_transition_beat(p_self) Set the beat-tracking transition matrix according to self-loop probabilities.
set_transition_down(p_self) Set the downbeat-tracking transition matrix according to self-loop probabilities.
transform(jam[, query]) Transform jam object to make data for this task
transform_annotation(ann, duration) Apply the beat transformer