-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Handling of samples in an (audio) signal
--
-- This package provides a type class to handle signed and unsigned
-- samples of various size and number of channels in a uniform way.
--
-- We expect that you use the types Int8, Word8 and so on
-- for monophonic samples and thus provide instances of the class for
-- them. Further we define Stereo record and mu-law sample type.
-- Quadrophony can be achieved by nested Stereo value, but I'm uncertain,
-- whether this is a good way to go. Maybe we add 5+1 channels or so in
-- future.
--
-- This is used by packages sox, alsa,
-- synthesizer.
@package sample-frame
@version 0.0.2
module Sound.Frame
-- | This is a class for nested tuples used as sample frames.
--
-- Should we make Storable a superclass of C?
class C y
numberOfChannels :: C y => y -> Int
sizeOfElement :: C y => y -> Int
-- | Default implementations for a foldable Frame.
numberOfChannelsFoldable :: (C y, Foldable f) => f y -> Int
sizeOfElementFoldable :: (C y, Foldable f) => f y -> Int
-- | Returns the size of an undefined element. This might be more efficient
-- than sizeOfElementFoldable.
sizeOfElementType :: C y => f y -> Int
-- | Space that an element consumes in a Storable Array. This is space for
-- the element plus padding.
paddedSizeOf :: Storable a => a -> Int
withSignal :: (y -> a) -> (sig y -> a)
instance C Double
instance C Float
instance C Int32
instance C Word32
instance C Int16
instance C Word16
instance C Int8
instance C Word8
module Sound.Frame.Stereo
data T a
left :: T a -> a
right :: T a -> a
cons :: a -> a -> T a
map :: (a -> b) -> T a -> T b
instance Eq a => Eq (T a)
instance C a => C (T a)
instance Storable a => Storable (T a)
instance Traversable T
instance Foldable T
instance Applicative T
instance Functor T
instance Arbitrary a => Arbitrary (T a)
instance Show a => Show (T a)
module Sound.Frame.MuLaw
data T
cons :: Word8 -> T
decons :: T -> Word8
fromLinear16 :: Int16 -> T
toLinear16 :: T -> Int16
instance Eq T
instance C T
instance Storable T
instance Arbitrary T
instance Show T