Commit ab7c9b25 authored by Guerric Chupin's avatar Guerric Chupin

Removed tests directory.

parent d0e5fb29
import FRP.Yampa
import MIDI
import Note
import Arpeggiated
import System.IO
import Data.Maybe
ifReadyDo :: Handle -> IO a -> IO (Maybe a)
ifReadyDo hnd x = hReady hnd >>= f
where f True = x >>= return . Just
f _ = return Nothing
main :: IO ()
main = reactimate initInput sensing output arpeggiated
initInput = return (110, NoEvent)
sensing _ = do c <- stdin `ifReadyDo` getChar
let c' = if isJust c
then Event (NoteOn (toPitch 60) (toVelocity 100))
else NoEvent
return (1, Just (110,c'))
output _ x = print x >> return False
import AvgIvl
import FRP.Yampa
basicList :: (Event a, [(DTime, Maybe (Event Int))])
basicList = (NoEvent,
concat $ repeat [ (1,Just (Event 1))
, (1,Just (Event 1))
, (1, Just (Event 1))
, (1, Just (Event 1))
, (1, Just (Event 1))])
randomList :: [DTime]
randomList = embed avgIvl basicList
import RMCA.Global.Clock
import RMCA.Auxiliary.Auxiliary
import RMCA.Semantics
import FRP.Yampa
main :: IO ()
main = do
putStr "Testing metronome: "
print testMetronome
tempo' :: SF () Tempo
tempo' = switch ((constant 30)
&&&
(after 20 10)) (\t -> switch ((constant t)
&&&
(after 20 60)) (constant))
testMetronome = embed (metronome (tempo'))
((), take 120 $ repeat (1, Nothing))
import RMCA.Auxiliary.Auxiliary
import FRP.Yampa
main :: IO ()
main = do
putStr "Testing onChange: "
print testOnChange
putStr "Testing onChange': "
print testOnChange'
testOnChange =
embed onChange (1, [(1, Just 1), (1, Just 1), (1, Just 2), (1, Just 3), (1, Just 3)])
testOnChange' =
embed onChange' (1, [(1, Just 1), (1, Just 1), (1, Just 2), (1, Just 3), (1, Just 3)])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment