freesound-0.0.2: Access the Freesound Project databaseSource codeContentsIndex
Sound.Freesound
Contents
The Freesound monad
Error handling
Sample handles
API methods
Description

This module provides access to the Freesound Project, a database of Creative Commons licensed sounds.

Synopsis
data Freesound a
withFreesound :: String -> String -> Freesound a -> IO (Either Error a)
data Error
= Error String
| CurlError CurlCode
| LoginError
| XMLError
| UnknownError
errorString :: Error -> String
newtype Sample = Sample {
sampleId :: Int
}
search :: Query -> Freesound [Sample]
data Similarity
= Similar
| Dissimilar
searchSimilar :: Similarity -> Sample -> Freesound [Sample]
propertiesXML :: Sample -> Freesound Element
properties :: Sample -> Freesound Properties
download :: Sample -> Freesound String
The Freesound monad
data Freesound a Source
The Freesound monad.
show/hide Instances
withFreesound :: String -> String -> Freesound a -> IO (Either Error a)Source
Log into Freesound with and perform an action in the Freesound monad.
Error handling
data Error Source
Error type.
Constructors
Error String
CurlError CurlCode
LoginError
XMLError
UnknownError
show/hide Instances
errorString :: Error -> StringSource
Convert an Error into a String.
Sample handles
newtype Sample Source
A handle to a sample in the database.
Constructors
Sample
sampleId :: Int
show/hide Instances
API methods
search :: Query -> Freesound [Sample]Source
Search the Freesound database.
data Similarity Source
Similarity type used by searchSimilar.
Constructors
Similar
Dissimilar
show/hide Instances
searchSimilar :: Similarity -> Sample -> Freesound [Sample]Source
Search samples similar (or dissimilar) to a Sample.
propertiesXML :: Sample -> Freesound ElementSource
Get the properties of a Sample as an XML document.
properties :: Sample -> Freesound PropertiesSource
Get the properties of a Sample.
download :: Sample -> Freesound StringSource
Download a Sample as a String.
Produced by Haddock version 2.6.0