HarmTrace-2.2.0: Harmony Analysis and Retrieval of Music

Maintainerbash@cs.uu.nl, jpm@cs.ox.ac.uk
Safe HaskellSafe-Inferred



Summary: Some statistical functions used in processing audio.



groupMinSize :: Eq a => Int -> a -> [a] -> [[a]]Source

Similar to group, but in case a group is smaller than s, the group is filled with the same number of a's:

>>> groupMinSize 3 0 [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5]

listMean :: [NumData] -> NumDataSource

Returns the mean of list.

medianFilter :: Ord a => Int -> [a] -> [a]Source

getWindows :: Ord a => Int -> [a] -> [[a]]Source

Returns a list with all sliding windows of a particular size. The left and right edge of the list are filled with the first and last (size 2) items, respectively and the remainder is filled with the modemedian of the complete list.

hasSize :: Int -> [a] -> BoolSource

mode :: Ord a => [a] -> aSource

The mode: the element that occurs most often in the collection.

median :: Ord a => [a] -> aSource

Returns the median of a list.

maxListIndex :: Ord a => [a] -> IntSource

Returns the index of th maximal element of a list.