The implementation of The Haskell School Of Music book.
This book is a great source to learn algorithmic music, signal processing and music theory basics. Haskell has a talent when it comes to music. To analyze sound files, you can try baudline.
The Haskell School of Music by Paul Hudak www.cs.yale.edu/homes/hudak/Papers/HSoM.pdf Baudline : http://baudline.com/