Created
June 6, 2010 23:53
-
-
Save jsoffer/428044 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
import Haskore.Interface.MIDI.Render | |
import Haskore.Melody | |
import Haskore.Music.GeneralMIDI as GM | |
import qualified Haskore.Music as Music | |
test m = fileFromGeneralMIDIMusic "test.mid" $ GM.fromMelodyNullAttr AcousticGrandPiano m | |
riff = line [utp, mi, sol, ti] where | |
utp = chord [ut, mi, sol] | |
ut = c 2 en () | |
mi = e 2 en () | |
sol = g 2 en () | |
ti = b 2 en () | |
-- alternativamente, | |
riff2 = line [utp, mi, sol, ti] where | |
utp = chord [ut, mi, sol] | |
ut = c 2 en () | |
mi = transpose majorThird ut | |
sol = transpose fifth ut | |
ti = transpose majorSeventh ut | |
-- (es exactamente lo mismo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment