Safe Haskell | Safe-Inferred |
---|
Convert a midi file to a block.
Synopsis
- load :: FilePath -> Cmd.CmdT IO BlockId
- parse :: FilePath -> IO (Either Warn MidiFile)
- convert :: MidiFile -> ([(Text, Track)], Skeleton.Skeleton, [Warn])
- type Midi = (RealTime.RealTime, Midi.Message)
- data NoteTrack = NoteTrack Track Track (Map ScoreT.Control Track)
- convert_tracks :: [(Text, [Midi])] -> ([(Text, Track)], Skeleton.Skeleton, [Warn])
- split_track :: [Midi] -> ([NoteTrack], [(RealTime.RealTime, Midi.Key)])
- collect_notes :: [Midi] -> ([MidiNote], [(RealTime.RealTime, Midi.Key)])
Documentation
testing
type Midi = (RealTime.RealTime, Midi.Message) Source #
(note, pitch, controls)
NoteTrack Track Track (Map ScoreT.Control Track) |
convert_tracks :: [(Text, [Midi])] -> ([(Text, Track)], Skeleton.Skeleton, [Warn]) Source #
Take flat MIDI msgs to a list of tracks where events don't overlap, and add pitch and control tracks.
:: [Midi] | |
-> ([NoteTrack], [(RealTime.RealTime, Midi.Key)]) | (tracks, notes stuck on) |
For each note, assign to the lowest track which doesn't have an overlap.
collect_notes :: [Midi] -> ([MidiNote], [(RealTime.RealTime, Midi.Key)]) Source #