diff options
| author | Houyhnhnm <hykusb@bitmai.la> | 2018-06-07 14:16:34 +0200 |
|---|---|---|
| committer | Houyhnhnm <hykusb@bitmai.la> | 2018-06-07 14:16:34 +0200 |
| commit | 789e7c10bc8765d498ba9f1e4c3eac35b64b41e7 (patch) | |
| tree | 0872e3b8b3c26753579392743789c160d0def095 /cadence.py | |
| parent | 2be56d2f3541cedd0c4e872aeb5b7da110d9b260 (diff) | |
render rhythms to score
Diffstat (limited to 'cadence.py')
| -rw-r--r-- | cadence.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -20,15 +20,15 @@ Cadence class Cadence(object): """a musical morpheme bundling rhythmic, gestural and harmonic features""" - def __init__(self, footprint=None, function=None, path=None): - self.footprint = footprint + def __init__(self, ligature=None, function=None, path=None): + self.ligature = ligature self.function = function self.path = path # string represention of cadence - note list ? def __str__(self): features = { - 'footprint': self.footprint, + 'ligature': self.ligature, 'function': self.function, 'path': self.path, } @@ -37,15 +37,15 @@ class Cadence(object): @property def features(self): features = { - 'footprint': self.footprint, + 'ligature': self.ligature, 'function': self.function, 'path': self.path, } return features def update(featureDict): - if 'footprint' in featureDict: - self.footprint = featureDict['footprint'] + if 'ligature' in featureDict: + self.ligature = featureDict['ligature'] if 'function' in featureDict: self.function.update(featureDict['function']) if 'path' in featureDict: @@ -53,7 +53,7 @@ class Cadence(object): def print(self): features = { - 'footprint': self.footprint, + 'ligature': self.ligature, 'function': self.function, 'path': self.path, } @@ -63,7 +63,7 @@ class Cadence(object): # example cad = Cadence() -cad.footprint = [{ +cad.ligature = [{ 'span': 2, 'gait': 'double', # Gait.double or Gait['double']... 'foot': [-1/2, -1/4, 0, 1/2], |