Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8a0eb586ec
Fetching contributors…

Cannot retrieve contributors at this time

file 36 lines (30 sloc) 1.197 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
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 "sample" Nothing,
                            F "offset" (Just 0),
                            F "duration" (Just 1),
                            F "speed" (Just 1),
                            F "pan" (Just 0.5),
                            F "velocity" (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

sample = makeS dirt "sample"
offset = makeF dirt "offset"
duration = makeF dirt "duration"
speed = makeF dirt "speed"
pan = makeF dirt "pan"
velocity = makeF dirt "velocity"
Something went wrong with that request. Please try again.