synthesizer-core-0.8.1.2: Audio signal processing coded in Haskell: Low level part

Safe HaskellNone
LanguageHaskell2010

Synthesizer.Plain.File

Synopsis

Documentation

render :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> (a -> [v]) -> IO ExitCode Source #

See write.

renderToInt16 :: (C a, C v) => FilePath -> a -> (a -> [v]) -> IO ExitCode Source #

renderMonoToInt16 :: C a => FilePath -> a -> (a -> [a]) -> IO ExitCode Source #

renderStereoToInt16 :: C a => FilePath -> a -> (a -> [(a, a)]) -> IO ExitCode Source #

write :: (Storable int, C int, C int, Bounded int, C a, C v) => Put int -> FilePath -> a -> [v] -> IO ExitCode Source #

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 ExitCode Source #

writeMonoToInt16 :: C a => FilePath -> a -> [a] -> IO ExitCode Source #

writeStereoToInt16 :: C a => FilePath -> a -> [(a, a)] -> IO ExitCode Source #

writeRaw :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCode Source #

writeRawCompressed :: (C a, C v, Storable v) => T -> FilePath -> a -> [v] -> IO ExitCode Source #

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 ExitCode Source #

Deprecated: If you want to generate AIFF, then just write to files with .aiff filename extension. If you want to convert files to AIFF, use Sound.Sox.Convert.

readAIFFMono :: C a => FilePath -> IO [a] Source #

Deprecated: Use readMonoFromInt16 instead

readMonoFromInt16 :: C a => FilePath -> IO [a] Source #

I suspect we cannot handle file closing properly.

getInt16List :: Get [Int16] Source #

Deprecated: This function will no longer be exported