Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. module ChameleonBass where
  2.  
  3. import Haskore.Music
  4. import Haskore.Melody
  5. import Haskore.Basic.Pitch
  6. import Haskore.Basic.Duration
  7. import Haskore.Music.GeneralMIDI
  8. import Haskore.Interface.MIDI.Render
  9.  
  10. pitch_line = map (\(x,y,z) -> x (y :: Octave) z () )
  11.  
  12. first_part = pitch_line [(g,-2,1%+12),(gs,-2,1%+12),(a,-2,1%+12),(as,-2,1%+12)]
  13. second_part = pitch_line [(gs,-1,1%+8),(as,-1,1%+8)]
  14. first_part' = pitch_line [(c,-1,1%+12),(cs,-1,1%+12),(d,-1,1%+12),(ds,-1,1%+12)]
  15. second_part' = pitch_line [(as,-1,1%+8),(cs,0,1%+8)]
  16.  
  17. -- G|-------------3-----------3-6--------------------------------|
  18. -- D|-----------6------------------------------------------------|
  19. -- A|----------------3-4-5-6-------------------------------------|
  20. -- E|--3-4-5-6---------------------------------------------------|
  21.  
  22. main_line = concat $ Prelude.replicate 8 $ concat [first_part, [rest (1%+24)], second_part, [rest (1%+32)], first_part', [rest (1%+24)], second_part', [rest (1%+32)]]
  23.  
  24.  
  25. main = fileFromGeneralMIDIMusic "chameleon.midi" $ fromMelodyNullAttr AcousticBass (line main_line)
Add Comment
Please, Sign In to add comment