Module Expr Str Import alias ImportFrom alias Assign NameStore Dict Num Num Num Num Num Num Assign NameStore Str Assign NameStore Dict Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd CompareGt NameLoad Num CompareLt NameLoad Num If UnaryOpNot NameLoad body Return NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num Str AugAssignAdd NameStore Call AttributeLoad Str attr ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num AugAssignAdd NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd CompareGt NameLoad Num CompareLt NameLoad Num If UnaryOpNot NameLoad body Return NameLoad Assign NameStore BinOpAdd SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num BinOpMod Str NameLoad AugAssignAdd NameStore Call AttributeLoad Str attr ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad BinOpAdd NameLoad Num body If CompareNotIn NameLoad ListLoad Num Num Num Num body Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Slice Num AugAssignAdd NameStore BinOpAdd Str NameLoad AugAssignAdd NameStore BinOpAdd Str SubscriptLoad NameLoad Index NameLoad If CompareNotEq NameLoad Num body AugAssignAdd NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd CompareGt NameLoad Num CompareLt NameLoad Num If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Str Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num For NameStore NameLoad body AugAssignAdd NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad BinOpAdd NameLoad Num body If CompareNotIn NameLoad ListLoad Num Num Num Num body Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Slice Num AugAssignAdd NameStore BinOpAdd Str NameLoad AugAssignAdd NameStore BinOpMod Str SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad Str body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Str If CompareLt NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign NameStore Dict Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad orelse Return Str decorator_list
N/A N/A 
Contains code that takes a representation of a Genome and cantus firmus and
turns them into a .ly file so GNU Lilypond (http://lilypond.org/) can turn it
into printed sheet music and a midi file.

For duration, given counterpoint of species < 5, it is possible to work out the
number of notes and their durations from the number of notes in the cantus
firmus.
 N/A datetime string Template N/A SPECIES_DURATION N/A 1 2 3 1 2 4 N/A TEMPLATE 
\version "2.14.2"

\header {
    title = "$title"
    subtitle = "Created on: $created_on"
    composer = "$composer and Foox"
}

result = {
    <<
    \new Staff
    {
        \time 4/4
        \clef treble
        {
            $contrapunctus
        }
    }
    \new Staff
    {
        \time 4/4
        \clef treble
        {
            $cantus_firmus
        }
    }
    >>
}

\paper {
    raggedbottom = ##t
    indent = 7. \mm
    linewidth = 183.5 \mm
    betweensystemspace = 25\mm
    betweensystempadding = 0\mm
}

\score{
    \result
    \midi {
        \context {
            \Score
            tempoWholesPerMinute = #(ly:make-moment 160 4)
        }
    }
    \layout {}
}
 N/A NOTES N/A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 g a b c' d' e' f' g' a' b' c'' d'' e'' f'' g'' a'' r get_cantus_firmus N/A N/A notes N/A N/A N/A 
    Given a list of notes as integers, will return the lilypond notes
    for the cantus firmus.
     N/A result N/A normalised N/A note N/A note notes N/A N/A note 0 N/A note 18 N/A N/A normalised N/A N/A result N/A result N/A N/A NOTES N/A N/A normalised N/A 0  1  N/A result N/A N/A join N/A N/A NOTES N/A note N/A note N/A normalised N/A 1 N/A result  \bar "|." N/A result N/A N/A result replace N/A result N/A get_simple_contrapunctus N/A N/A notes duration N/A N/A N/A 
    Given a list of notes as integers and the duration to use, will return the
    lilypond notes for the contrapunctus.

    Durations: 1-semibreve, 2-minim, 4-crotchet
     N/A result N/A normalised N/A note N/A note notes N/A N/A note 0 N/A note 18 N/A N/A normalised N/A N/A result N/A result N/A N/A NOTES N/A N/A normalised N/A 0 N/A  %d  duration N/A result N/A N/A join N/A N/A NOTES N/A note N/A note N/A normalised N/A 1 -2 N/A final_note N/A N/A normalised pop N/A penultimate_note N/A N/A normalised pop N/A next_note N/A NOTES N/A penultimate_note N/A N/A final_note N/A penultimate_note 1 N/A N/A N/A final_note N/A 4 7 11 14 N/A N/A next_note N/A N/A N/A next_note N/A 0 is N/A next_note N/A 1 N/A result N/A next_note N/A result N/A N/A NOTES N/A final_note N/A N/A duration 1 N/A N/A result  1 N/A result N/A N/A result replace N/A result N/A get_fourth_species N/A N/A notes N/A N/A N/A 
    Given a representation of the contrapunctus part of fourth species
    counterpoint in numeric (foox) form, turns it into correct Lilypond
    notation.
     N/A result N/A normalised N/A note N/A note notes N/A N/A note 0 N/A note 18 N/A N/A normalised N/A N/A result N/A result r2  N/A body N/A N/A NOTES N/A note N/A note N/A normalised N/A -2 N/A pitch body N/A N/A result N/A %s~ %s  N/A pitch pitch N/A final_note N/A N/A normalised pop N/A penultimate_note N/A N/A normalised pop N/A next_note N/A NOTES N/A penultimate_note N/A N/A final_note N/A penultimate_note 1 N/A N/A N/A final_note N/A 4 7 11 14 N/A N/A next_note N/A N/A N/A next_note N/A 0 is N/A next_note N/A 1 N/A result N/A next_note N/A result N/A  %s 1 N/A NOTES N/A final_note N/A result N/A N/A result replace N/A result N/A render N/A N/A species cantus_firmus contrapunctus title created_on composer N/A Untitled None Anonymous N/A N/A 
    Given an indication of the species (1-3), a list of notes for the
    cantus_firmus and contrapunctus returns a string containing lilypond code
    to render the musical information as PDF and MIDI files.
     N/A N/A created_on N/A N/A created_on N/A N/A N/A datetime datetime today N/A contrapunctus_notes N/A N/A species 4 N/A N/A duration N/A SPECIES_DURATION N/A species N/A contrapunctus_notes N/A get_simple_contrapunctus contrapunctus duration N/A N/A N/A species 4 N/A N/A contrapunctus_notes N/A get_fourth_species contrapunctus N/A context N/A N/A N/A context N/A title title N/A N/A context N/A created_on N/A N/A created_on strftime %c N/A N/A context N/A composer composer N/A N/A context N/A contrapunctus contrapunctus_notes N/A N/A context N/A cantus_firmus N/A get_cantus_firmus cantus_firmus N/A N/A N/A context N/A contrapunctus N/A context N/A cantus_firmus N/A N/A score N/A Template TEMPLATE N/A N/A N/A score substitute context N/A N/A N/A