Safe Haskell | None |
---|---|
Language | Haskell98 |
Data representation and parser for MEAPsoft analysis frames.
- data MEAP t
- read_meap :: Meap_Data t => FilePath -> IO (Either String (MEAP t))
- features :: MEAP t -> [Feature]
- n_frames :: MEAP t -> Int
- uarray_data :: MEAP t -> UArray (Int, Int) t
- n_columns :: MEAP t -> Int
- frame_l :: Meap_Data t => MEAP t -> Int -> [t]
- column_l :: Meap_Data t => MEAP t -> Int -> [t]
- position :: Meap_Data t => MEAP t -> (Int, Int) -> t
- segments_l :: Meap_Data t => MEAP t -> [(t, t)]
- feature_names :: [String]
- from_onsets :: Meap_Data t => [(t, t)] -> MEAP t
- module Sound.Analysis.Meapsoft.Data
- module Sound.Analysis.Meapsoft.Header
Documentation
read_meap :: Meap_Data t => FilePath -> IO (Either String (MEAP t)) Source
Load a MEAPsoft analysis file, either a segmentation file or a feature file.
let fn = "/home/rohan/data/audio/xenakis/jonchaies.wav.seg" Right m <- read_meap fn :: IO (Either String (MEAP Double)) map feature_name (features m) == ["onset_time","chunk_length"]
uarray_data :: MEAP t -> UArray (Int, Int) t Source
The analysis data stored in a UArray
.
Indices are of the form (row, column).
n_columns :: MEAP t -> Int Source
The number of columns at each analysis frame (row). Segmentation files have two columns, onset time and segment length.
n_columns m == 2
frame_l :: Meap_Data t => MEAP t -> Int -> [t] Source
Extract the indicated frame (row) as a list.
length (frame_l m 0) == n_columns m
column_l :: Meap_Data t => MEAP t -> Int -> [t] Source
Extract the indicated column as a list. The length of the column
is the n_frames
of the analysis file.
length (column_l m 0) == n_frames m
position :: Meap_Data t => MEAP t -> (Int, Int) -> t Source
Extract data from the indicated frame and column.
position m (0,0) == frame_l m 0 !! 0
segments_l :: Meap_Data t => MEAP t -> [(t, t)] Source
Extract segmentation data as a list. The segmentation data is given by the two columns onset_time and chunk_length.
length (segments_l m) == n_frames m segments_l m !! 0 == (\[i,j] -> (i,j)) (frame_l m 0)
feature_names :: [String] Source
The list of feature names generated by MEAPsoft 2.0.
map (`elem` feature_names) ["onset_time","chunk_length"] == [True,True]
from_onsets :: Meap_Data t => [(t, t)] -> MEAP t Source
Given a list of (onset-time,duration)
pairs generate a MEAP
.
module Sound.Analysis.Meapsoft.Data