Skip to content

Instantly share code, notes, and snippets.

@jsoffer
Created June 6, 2010 23:53
Show Gist options
  • Save jsoffer/428044 to your computer and use it in GitHub Desktop.
Save jsoffer/428044 to your computer and use it in GitHub Desktop.
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