synthesizer-core-0.2: Audio signal processing coded in Haskell: Low level partSource codeContentsIndex
Synthesizer.Plain.File
Synopsis
render :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> (a -> [v]) -> IO ExitCode
renderToInt16 :: (C a, C v) => FilePath -> a -> (a -> [v]) -> IO ExitCode
renderMonoToInt16 :: C a => FilePath -> a -> (a -> [a]) -> IO ExitCode
renderStereoToInt16 :: C a => FilePath -> a -> (a -> [(a, a)]) -> IO ExitCode
write :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> [v] -> IO ExitCode
writeToInt16 :: (C a, C v) => FilePath -> a -> [v] -> IO ExitCode
writeMonoToInt16 :: C a => FilePath -> a -> [a] -> IO ExitCode
writeStereoToInt16 :: C a => FilePath -> a -> [(a, a)] -> IO ExitCode
writeRaw :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCode
writeRawCompressed :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCode
rawToAIFF :: C a => FilePath -> T -> a -> Int -> IO ExitCode
compress :: FilePath -> IO ExitCode
readAIFFMono :: C a => FilePath -> IO [a]
readMonoFromInt16 :: C a => FilePath -> IO [a]
getInt16List :: Get [Int16]
Documentation
render :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> (a -> [v]) -> IO ExitCodeSource
See write.
renderToInt16 :: (C a, C v) => FilePath -> a -> (a -> [v]) -> IO ExitCodeSource
renderMonoToInt16 :: C a => FilePath -> a -> (a -> [a]) -> IO ExitCodeSource
renderStereoToInt16 :: C a => FilePath -> a -> (a -> [(a, a)]) -> IO ExitCodeSource
write :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> [v] -> IO ExitCodeSource

The output format is determined by SoX by the file name extension. The sample precision is determined by the provided Put function.

Example:

 import qualified Synthesizer.Plain.Builder as Builder

 write (Builder.put :: Builder.Put Int16) "test.aiff" 44100 sound
writeToInt16 :: (C a, C v) => FilePath -> a -> [v] -> IO ExitCodeSource
writeMonoToInt16 :: C a => FilePath -> a -> [a] -> IO ExitCodeSource
writeStereoToInt16 :: C a => FilePath -> a -> [(a, a)] -> IO ExitCodeSource
writeRaw :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCodeSource
writeRawCompressed :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCodeSource
You hardly need this routine since you can use a filename with .mp3 or .ogg extension for writeRaw and SoX will do the corresponding compression for you.
rawToAIFF :: C a => FilePath -> T -> a -> Int -> IO ExitCodeSource
compress :: FilePath -> IO ExitCodeSource
readAIFFMono :: C a => FilePath -> IO [a]Source
readMonoFromInt16 :: C a => FilePath -> IO [a]Source
I suspect we cannot handle file closing properly.
getInt16List :: Get [Int16]Source
Produced by Haddock version 2.4.2