You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core functionality of AbCE is the transformation object.
At an abstract level, a transformer T accepts as input an audio signal y, and one or more annotations. The output of the transformer is a modified signal and correspondingly modified annotations.
Data payloads are encoded as nested dicts, eg:
data[i] = {'audio': y,
'chord_annotation': {'interval': chord_intervals,
'chord_label': chord_label},
...}
Each transformer then implements one or more keyed transformation functions. For instance, a pitch-shifting transformer should implement, at least an audio transformer and a chord_label transformer.
The top-level transformer logic simply walks over the data payload structure:
output = {}
for key, value in data.iteritems():
if key in [valid transformations]:
output[key] = self.transformations[key](value)
elif value is a dict:
output[key] = self.transform(value)
else:
output[key] = value