lambdasound-1.0.1: A libary for generating low-level sounds with high-level combinators
Safe HaskellSafe-Inferred
LanguageGHC2021

LambdaSound.Sampling

Description

This module contains functions to sample sound and to save it in a file. The LambdaSound.Play module exports a function to play sounds directly.

Synopsis

Documentation

sampleSound :: Hz -> Sound T Pulse -> IO (Vector S Pulse) Source #

Samples a sound with the given frequency (usually 44100 is good) with post-processing

This is recommended over sampleSoundRaw if you are unsure

sampleSoundRaw :: Hz -> Sound T Pulse -> IO (Vector S Pulse) Source #

Samples a sound with the given frequency (usually 44100 is good) without post-processing

saveWav :: FilePath -> Int -> Vector S Pulse -> IO () Source #

Save a sound to a wave file with the given sampling frequency

saveRawPCM :: FilePath -> Vector S Pulse -> IO () Source #

Save the sound as raw floats