Created
June 8, 2010 03:38
-
-
Save softa/429573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module FrereJacques where | |
| import Haskore.Music | |
| import Haskore.Melody | |
| import Haskore.Basic.Pitch | |
| import Haskore.Basic.Duration | |
| import Haskore.Music.GeneralMIDI as MidiMusic | |
| import Haskore.Interface.MIDI.Render as Render | |
| render_to f m = Render.fileFromGeneralMIDIMusic f song where | |
| song = MidiMusic.fromMelodyNullAttr MidiMusic.AcousticGrandPiano m | |
| pitch_line = line . map to_note | |
| to_note (x,y) = x (1 :: Octave) y () | |
| main = render_to "frere_jacques.midi" $ (pitch_line [(c,en),(d,en),(e,en),(c,en),(c,en),(d,en),(e,en),(c,en),(e,en),(f,en),(g,qn),(e,en),(f,en),(g,qn),(g,sn),(a,sn),(g,sn),(f,sn),(e,en),(c,en),(g,sn),(a,sn),(g,sn),(f,sn),(e,en),(c,en),(d,en),(d,en),(c,qn),(d,en),(d,en),(c,qn)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment