Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 723 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 723 Bytes

Sarasvati

Sarasvati is an audio library with portaudio.

Instration

Install portaudio for your PC

if you use linux, see http://portaudio.com/docs/v19-doxydocs/compile_linux.html

Install this library from code

$ cabal configure
$ cabal install

Or from hackage

$ cabal install sarasvati

Sample

module Main where
import Sound.Sarasvati

sinl :: [Float] 
sinl = take 100000 . map sin $ [0.0, 0.1..] 

squl :: [Float]
squl = take 100000 $ cycle (replicate 300 (-1) ++ replicate 300 1)

main :: IO ()
main = do
  sarasvatiOutput defaultConfig $ zip sinl sinl
  sarasvatiOutput defaultConfig $ zip squl squl
  return ()