Skip to content
bmcfee edited this page Nov 7, 2014 · 2 revisions

Design

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

Why AbCE?

A♭:aug, duh!

Clone this wiki locally