From 8f2251a175d8d52edd12d62168c7c0e795be6146 Mon Sep 17 00:00:00 2001 From: Houyhnhnm Date: Sat, 2 Jun 2018 21:51:53 +0200 Subject: add phonology, syntax stubs --- main.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index e69de29..52e8e2b 100644 --- a/main.py +++ b/main.py @@ -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() + -- cgit v1.2.3