From dc5a3bd592f7dda585dc97aa0647b3326b20d8d2 Mon Sep 17 00:00:00 2001 From: Houyhnhnm Date: Sun, 3 Jun 2018 13:03:35 +0200 Subject: add generation methods to phonology, morphology classes --- main.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 3706113..23e7d39 100644 --- a/main.py +++ b/main.py @@ -6,10 +6,14 @@ from diagram import * modules: cadence.py define musical morphemes +projection.py dependencies and agreement + antecedent or consequent cadence bundled with prolongation rules for each feature - (dominates) or (dominates, agrees) or (dominates, agrees, submits) + (1)==Head; (0)==Complement; (1,0)==XP; (1,1)==XBar; (0,1)==X; (0,0)==None; + 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 +phonology.py distribution of cadential features for given grammar +lexicon.py repository of lexemes: (cadence, dependencies, prolongation) +passage.py lexemes unified over 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 @@ -34,10 +38,25 @@ phonology.addPathRule({ 'tilt': ['float', 'dive'], }) +morphology = Morphology() +morphology.addAnticipationRule(['footprint']) +morphology.addAnticipationRule(['tilt']) +morphology.addAnticipationRule([]) +morphology.addProlongationRule(['address','transposition']) +morphology.addProlongationRule(['address']) +morphology.addProlongationRule(['figure','range']) +morphology.addProlongationRule(['range']) +morphology.addProlongationRule(['range','tilt']) + + + +# lexicon.addCategory() + phonology.print() +morphology.print() -lex = phonology.makeCadence(label=1) -lex.print() +lexeme = phonology.makeCadence(label=1) +lexeme.print() syntax = Diagram() syntax.print() -- cgit v1.2.3