An Algebra of Music (Syntax, Interpretation)

die syntaktische Algebra (Term-Algebra)

data Music 
 = Note Pitch Dur [Attribute] | Rest Dur
 | Music :+: Music | Music :=: Music
 | Tempo (Ratio Int) Music | Transpose Int Music

die Interpretationsfunktion

perform :: PMap -> Context  -- ^ Parameter
        -> Music            -- ^ Syntax
        -> Performance      -- ^ Semantik
let m = Note (C,4) 1 []
let p = perform defPMap defCon m
let s = performToMidi p defUpm
outputMidiFile "test.midi" s



Johannes Waldmann 2015-12-11