Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Pulse test
module Main where
import Sound.Pulse.Simple
s<-simpleNew Nothing "example" Play Nothing "this is an example application"
(SampleSpec (F32 LittleEndian) 44100 1) Nothing Nothing
simpleWrite s (take 44100 (test 440) ++ take 44100 (test 330) )
simpleDrain s
simpleFree s
test :: Int -> [Float]
test f = cycle (replicate p 1.0 ++ replicate p (-1.0))
where p = 22050 `div` f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment