diff options
| author | Houyhnhnm <hykusb@bitmai.la> | 2018-06-02 21:51:53 +0200 |
|---|---|---|
| committer | Houyhnhnm <hykusb@bitmai.la> | 2018-06-02 21:51:53 +0200 |
| commit | 8f2251a175d8d52edd12d62168c7c0e795be6146 (patch) | |
| tree | faedd791aa3dac3cc7480dade27c0165ee233b91 /main.py | |
| parent | 69eb369f73f0a64898246677d40abd2f604bcb7c (diff) | |
add phonology, syntax stubs
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -0,0 +1,44 @@ +from phonology import * +from diagram import * + + +''' +modules: + +cadence.py define musical morphemes +diagram.py define binary tree structures +phonology.py distribution of cadential features for given lexicon +lexicon.py repository of lexemes w/ weighted dependency correlations +passage.py cadences from lexicon mapped to tree diagram + spellout() sequence of unified cadences in passage (for each voice) +score.py list of n passages rendered to music21 score object + export() to xml, midi, ly + +''' + +phonology = Phonology() + +phonology.addFootprintRule([{ + 'span': [2], + 'gait': ['double','triple'], + 'foot': [[-1/2, 0, 1/2]], + 'step': [[0, 1/2], [0, 1/2], [0, 1/2]], +}]) + +phonology.addFunctionRule({ + 'address': ['A1','B1'], + 'transposition': [-1,0,1], +}) + +phonology.addPathRule({ + 'range': [2,3,4], + 'figure': ['rampUp', 'rampDown'], + 'tilt': ['float', 'dive'], +}) + +lex = phonology.makeCadence() +lex.print() + +syntax = Diagram() +syntax.print() + |