Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0be7babc7f
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (36 sloc) 1.435 kb
module Dirt where
import Stream
import Pattern
import Parse
import Sound.OpenSoundControl
import qualified Data.Map as Map
import Control.Concurrent.MVar
dirt :: OscShape
dirt = OscShape {path = "/play",
params = [ S "sound" Nothing,
F "offset" (Just 0),
F "duration" (Just 1),
F "speed" (Just 1),
F "pan" (Just 0.5),
F "velocity" (Just 0),
S "vowel" (Just ""),
F "start" (Just 0)
],
timestamp = True
}
--steps = 16
--channels = 4
--x = Map.insert (params dirt !! 0) (Just $ String "chin/0") $ defaultMap dirt
--x' pan = Map.insert (params dirt !! 4) (Just $ Float pan) $ x
--c = Cycle $ map (\i -> (Arc (Atom $ x' (channels * (fromIntegral i / fromIntegral steps))) (fromIntegral i / fromIntegral steps) 0)) [0 .. (steps - 1)]
dirtstream name = stream "127.0.0.1" "127.0.0.1" name "127.0.0.1" 7771 dirt
sound = makeS dirt "sound"
offset = makeF dirt "offset"
duration = makeF dirt "duration"
speed = makeF dirt "speed"
pan = makeF dirt "pan"
velocity = makeF dirt "velocity"
vowel = makeS dirt "vowel"
start = makeF dirt "start"
sample :: String -> Int -> String
sample name n = name ++ "/" ++ (show n)
Jump to Line
Something went wrong with that request. Please try again.