To get into the functional programming side, I’m learning more and more about a functional music package in Haskell: harmtrace. It can parse a chord sequence (what I’m using it for), and do much more music analysis in a clean and functional way.
Thanks to the help of the authors of this package, I was finally able to run it using the binary. (Still not able to build it though, because of all the version issues with ghc..)
Some specifics are given here:
http://foswiki.cs.uu.nl/foswiki/GenericProgramming/HarmTrace
Here’s the screen shot of running it in terminal:
The output is a php syntax tree like this:
[Piece[PT[T_3par_1[IIIm_0[E:min]]]][PD[D_1_1[S_3_1[IV_0[F:maj7]]][D_1_1[S_1par_1[IIm_0[D:min]]][D_2_1[V7[Inserted]]]]]][PT[T_1_1[I_0[C:maj]]]][PD[D_3_1[V_0[G:maj7][G:maj]]]][PT[T_1_1[I_0[C:maj]]]]]
To visualise it, one can use this website:
http://ironcreek.net/phpsyntaxtree/
And the visualisation looks like this:
In the future, more on the analysis of these trees…