Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Cmd.Load.Midi

Contents

Description

Convert a midi file to a block.

Synopsis

Documentation

convert :: MidiFile -> ([(Text, Track)], Skeleton.Skeleton, [Warn]) Source #

testing

data NoteTrack Source #

(note, pitch, controls)

Constructors

NoteTrack Track Track (Map ScoreT.Control Track) 

Instances

Instances details
Monoid NoteTrack Source # 
Instance details

Defined in Cmd.Load.Midi

Semigroup NoteTrack Source # 
Instance details

Defined in Cmd.Load.Midi

Show NoteTrack Source # 
Instance details

Defined in Cmd.Load.Midi

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.

split_track Source #

Arguments

:: [Midi] 
-> ([NoteTrack], [(RealTime.RealTime, Midi.Key)])

(tracks, notes stuck on)

For each note, assign to the lowest track which doesn't have an overlap.