Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
This module exports some functions for simple loading and saving sounds.
However, keep in mind that loaded sounds have a fixed amound of samples and thus cannot be stretched in duration losslessly. Stretching a sound results in sub- or supersampling and will also shift the pitch. Pitch-retaining stretching has not been implemented yet!
Synopsis
Documentation
saveWav :: FilePath -> Hz -> Sound T Pulse -> IO () Source #
Save a sound as a wav file using default sampleSound
.
loadWav :: FilePath -> IO (Sound T Pulse) Source #
Load a wav as a sound, mixing channels with parallel2
.
If you want to to use this with embedIO
, you should probably use embedIOLazily
instead!
loadRaw :: FilePath -> IO (Sound I Pulse) Source #
Load a sound from floats.
If you want to to use this with embedIO
, you should probably use embedIOLazily
instead!
saveRawCompressed :: FilePath -> Hz -> Sound T Pulse -> IO () Source #
Save a sound as gzip-compressed floats.
loadRawCompressed :: FilePath -> IO (Sound I Pulse) Source #
Load a sound from gzip-compressed floats.
If you want to to use this with embedIO
, you should probably use embedIOLazily
instead!