-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Access the Freesound Project database -- -- Access the Freesound Project database. The Freesound Project is a -- collaborative database of Creative Commons licensed sounds. -- -- http://www.freesound.org/ -- -- http://www.creativecommons.org/ @package freesound @version 0.1.0 module Sound.Freesound.Sample -- | A handle to a sample in the database. newtype Sample Sample :: Int -> Sample sampleId :: Sample -> Int -- | Read a Sample from an Element. fromXML :: Element -> Maybe Sample -- | Read a list of Samples from an Element. listFromXML :: Element -> [Sample] instance Eq Sample instance Ord Sample instance Read Sample instance Show Sample module Sound.Freesound.Query -- | A Query type for searching the database. data Query Query :: String -> Maybe Double -> Maybe Double -> Maybe Int -> Maybe Int -> Maybe Int -> Query -- | The query string string :: Query -> String -- | Minimum duration in seconds minDur :: Query -> Maybe Double -- | Maximum duration in seconds maxDur :: Query -> Maybe Double -- | Bit rate of the soundfile bitRate :: Query -> Maybe Int -- | Bit depth of the soundfile bitDepth :: Query -> Maybe Int -- | Sample rate of the soundfile sampleRate :: Query -> Maybe Int -- | Construct a Query to search the database for a String. stringQuery :: String -> Query -- | Convert a query to POST request fields. toPostFields :: Query -> [String] module Sound.Freesound.Properties -- | User of the Freesound database. data User User :: Int -> String -> User userId :: User -> Int userName :: User -> String -- | Description of a Sample, containing user and text. data Description Description :: User -> String -> Description -- | Statistics of a Sample in the database. data Statistics Statistics :: Int -> (Int, Int) -> Statistics downloads :: Statistics -> Int rating :: Statistics -> (Int, Int) -- | Tag (a single word) for describing a Sound type Tag = String -- | Properties of a Sample in the database. data Properties Properties :: Int -> User -> String -> String -> Statistics -> URLString -> URLString -> URLString -> String -> Int -> Int -> Int -> Int -> Double -> Int -> [Description] -> [Tag] -> Properties sampleId :: Properties -> Int user :: Properties -> User date :: Properties -> String originalFileName :: Properties -> String statistics :: Properties -> Statistics image :: Properties -> URLString preview :: Properties -> URLString colors :: Properties -> URLString extension :: Properties -> String sampleRate :: Properties -> Int bitRate :: Properties -> Int bitDepth :: Properties -> Int channels :: Properties -> Int duration :: Properties -> Double fileSize :: Properties -> Int descriptions :: Properties -> [Description] tags :: Properties -> [Tag] -- | Read a Properties value from an Element in the -- Maybe monad. fromXML :: Element -> Maybe Properties -- | Read a list of Properties from an Element. listFromXML :: Element -> [Properties] instance Eq Properties instance Show Properties instance Eq Statistics instance Show Statistics instance Eq Description instance Show Description instance Eq User instance Show User -- | This module provides access to the Freesound Project, a database of -- Creative Commons licensed sounds. -- --
module Sound.Freesound -- | The Freesound monad. data Freesound a -- | Log into Freesound with and perform an action in the Freesound -- monad. withFreesound :: String -> String -> Freesound a -> IO (Either Error a) -- | Error type. data Error Error :: String -> Error CurlError :: CurlCode -> Error LoginError :: Error XMLError :: Error UnknownError :: Error -- | Convert an Error into a String. errorString :: Error -> String -- | A handle to a sample in the database. newtype Sample Sample :: Int -> Sample sampleId :: Sample -> Int -- | Search the Freesound database. search :: Query -> Freesound [Sample] -- | Similarity type used by searchSimilar. data Similarity Similar :: Similarity Dissimilar :: Similarity -- | Search samples similar (or dissimilar) to a Sample. searchSimilar :: Similarity -> Sample -> Freesound [Sample] -- | Get the properties of a Sample as an XML document. propertiesXML :: Sample -> Freesound Element -- | Get the properties of a Sample. properties :: Sample -> Freesound Properties -- | Download a Sample as an instance of CurlBuffer. download :: (CurlBuffer b) => Sample -> Freesound b instance Eq Similarity instance Show Similarity instance Functor Freesound instance Monad Freesound instance MonadError Error Freesound instance MonadIO Freesound instance MonadReader Handle Freesound instance Show Error instance Error Error