midi-0.0.7: Handling of MIDI messages and files

Sound.MIDI.File.Save

Description

Save MIDI data to files.

The functions in this module allow Ts to be written into Standard MIDI files (*.mid) that can be read and played by music programs such as Cakewalk.

Synopsis

Documentation

toFileSource

Arguments

:: FilePath

file name

-> T 
-> IO () 

The function toFile is the main function for writing T values to an actual file.

toStream :: T -> ByteStringSource

Convert a MIDI file to a ByteString.

toOpenStream :: T -> ByteStringSource

Convert a MIDI file to a ByteString while replacing chunk lengths by (-1). This way writing the file is more lazy. I don't know whether this is useful for anything, thus simply don't use it.