| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Description | |||||||||||||||||||||||||
| Basic functions for manipulating signals | |||||||||||||||||||||||||
| Synopsis | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Functions | |||||||||||||||||||||||||
| delay1 :: Num a => [a] -> [a] | |||||||||||||||||||||||||
delay is the unit delay function, eg, delay1 [ 1, 2, 3 ] == [ 0, 1, 2, 3 ] | |||||||||||||||||||||||||
| delay :: Num a => Int -> [a] -> [a] | |||||||||||||||||||||||||
delay is the n sample delay function, eg, delay 3 [ 1, 2, 3 ] == [ 0, 0, 0, 1, 2, 3 ] | |||||||||||||||||||||||||
| downsample :: Int -> [a] -> [a] | |||||||||||||||||||||||||
downsample throws away every n'th sample, eg, downsample 2 [ 1, 2, 3, 4, 5, 6 ] == [ 1, 3, 5 ] | |||||||||||||||||||||||||
| downsampleRec :: Int -> [a] -> [a] | |||||||||||||||||||||||||
| upsample :: Num a => Int -> [a] -> [a] | |||||||||||||||||||||||||
upsample inserts n-1 zeros between each sample, eg, upsample 2 [ 1, 2, 3 ] == [ 1, 0, 2, 0, 3, 0 ] | |||||||||||||||||||||||||
| upsampleRec :: Num a => Int -> [a] -> [a] | |||||||||||||||||||||||||
| upsampleAndHold :: Int -> [a] -> [a] | |||||||||||||||||||||||||
upsampleAndHold replicates each sample n times, eg, upsampleAndHold 3 [ 1, 2, 3 ] == [ 1, 1, 1, 2, 2, 2, 3, 3, 3 ] | |||||||||||||||||||||||||
| interleave :: [a] -> [a] -> [a] | |||||||||||||||||||||||||
merges elements from two lists into one list in an alternating way interleave [0,1,2,3] [10,11,12,13] == [0,10,1,11,2,12,3,13] | |||||||||||||||||||||||||
| uninterleave :: [a] -> ([a], [a]) | |||||||||||||||||||||||||
split a list into two lists in an alternating way uninterleave [1,2,3,4,5,6] == ([1,3,5],[2,4,6]) It's a special case of split. | |||||||||||||||||||||||||
| pad :: (Ix a, Integral a, Num b) => Array a b -> a -> Array a b | |||||||||||||||||||||||||
pad a sequence with zeros to length n pad [ 1, 2, 3 ] 6 == [ 1, 2, 3, 0, 0, 0 ] | |||||||||||||||||||||||||
| toMaybe :: Bool -> a -> Maybe a | |||||||||||||||||||||||||
| generates a Just if the given condition holds | |||||||||||||||||||||||||
| norm2sqr :: Num a => (a, a) -> a | |||||||||||||||||||||||||
| Computes the square of the Euclidean norm of a 2D point | |||||||||||||||||||||||||
| (^!) :: Num a => a -> Int -> a | |||||||||||||||||||||||||
| Produced by Haddock version 0.8 |