Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Functions for reading midi note data from CSV files.
- reads_exact :: Read a => String -> Maybe a
- reads_err :: Read a => String -> a
- csv_midi_note_data_hdr :: [String]
- csv_midi_note_data_read' :: (Read t, Real t, Read n, Real n) => (m, m) -> FilePath -> IO [(t, Either m String, n, n)]
- csv_midi_note_data_read :: (Read t, Real t, Read n, Real n) => (m, m) -> FilePath -> IO [(t, m, n, n)]
- midi_tseq_read :: (Read t, Real t, Read n, Real n) => FilePath -> IO (Tseq t (On_Off (n, n)))
- midi_tseq_to_midi_wseq :: (Num t, Eq n) => Tseq t (On_Off (n, n)) -> Wseq t (n, n)
- midi_wseq_to_midi_tseq :: (Num t, Ord t) => Wseq t (n, n) -> Tseq t (On_Off (n, n))
- csv_midi_note_data_write :: (Eq m, Show t, Real t, Show n, Real n) => (m, m) -> FilePath -> [(t, m, n, n)] -> IO ()
- midi_tseq_write :: (Show t, Real t, Show n, Real n) => FilePath -> Tseq t (On_Off (n, n)) -> IO ()
Documentation
reads_err :: Read a => String -> a Source
Variant of reads_exact
that errors on failure.
csv_midi_note_data_hdr :: [String] Source
The required header field.
csv_midi_note_data_read' :: (Read t, Real t, Read n, Real n) => (m, m) -> FilePath -> IO [(t, Either m String, n, n)] Source
Midi note data, header is time,on/off,note,velocity
.
Translation values for on/off are consulted.
let fn = "/home/rohan/cvs/uc/uc-26/daily-practice/2014-08-13.1.csv" csv_midi_note_data_read' ("ON","OFF") fn :: IO [(Double,Either String String,Double,Double)]
csv_midi_note_data_read :: (Read t, Real t, Read n, Real n) => (m, m) -> FilePath -> IO [(t, m, n, n)] Source
Variant of csv_midi_note_data_read'
that errors on non on/off data.
midi_tseq_read :: (Read t, Real t, Read n, Real n) => FilePath -> IO (Tseq t (On_Off (n, n))) Source
Tseq
form of csv_read_midi_note_data
.
midi_tseq_to_midi_wseq :: (Num t, Eq n) => Tseq t (On_Off (n, n)) -> Wseq t (n, n) Source
Translate from Tseq
form to Wseq
form.
midi_wseq_to_midi_tseq :: (Num t, Ord t) => Wseq t (n, n) -> Tseq t (On_Off (n, n)) Source
Off-velocity is zero.