Commit 4218d5e3 by Guerric Chupin

Changed all module names.

parent 226e9390
......@@ -3,7 +3,7 @@
-- Written by Henrik Nilsson, 2016-05-03
-- Based on an earlier version.
--
-- This gives the semantics of a single Reactogon layer. The output is
-- This gives the semantics of a single RCMA layer. The output is
-- a high-level representation of notes for each beat. This is to be
-- translated to low-level MIDI message by a subsequent translator
-- responsible for merging notes from different layers, ensuring that
......@@ -438,7 +438,7 @@ advanceHeads bd bn tr st phs =
-- more heads (or "forever", if that does not happen). The result is
-- a list of all notes played for each pulse.
--
-- Note: The original reactogon has special start counters. An "internal"
-- Note: The original rcma has special start counters. An "internal"
-- board as defined here along with a list of inital read heads could
-- be derived from an "external" board representation more closely aligned
-- with the GUI represenatation.
......
......@@ -3,7 +3,7 @@
-- Written by Henrik Nilsson, 2016-05-27
-- Based on an earlier version.
--
-- This gives the semantics of a single Reactogon layer. The output is
-- This gives the semantics of a single RCMA layer. The output is
-- a high-level representation of notes for each beat. This is to be
-- translated to low-level MIDI message by a subsequent translator
-- responsible for merging notes from different layers, ensuring that
......
{-# LANGUAGE Arrows #-}
module Reactogon.Auxiliary.Auxiliary where
module RCMA.Auxiliary.Auxiliary where
import Data.Maybe
import FRP.Yampa
......
-- Contains function to currify/uncurrify functions with more than
-- two arguments. It might be useful to use Template Haskell there.
module Reactogon.Auxiliary.Curry where
module RCMA.Auxiliary.Curry where
curry3 :: ((a,b,c) -> d) -> a -> b -> c -> d
curry3 f a b c = f (a,b,c)
......
module Reactogon.Global.Clock ( tempo
module RCMA.Global.Clock ( tempo
, metronome
, tempoToDTime
) where
import Reactogon.Auxiliary.Auxiliary
import Reactogon.Semantics
import RCMA.Auxiliary.Auxiliary
import RCMA.Semantics
import FRP.Yampa
import Debug.Trace
......
{-# LANGUAGE Arrows #-}
module Reactogon.Layer.Board where
module RCMA.Layer.Board where
import FRP.Yampa
import Reactogon.Layer.Layer
import Reactogon.Semantics
import RCMA.Layer.Layer
import RCMA.Semantics
-- The state of the board is described by the list of the playheads
-- and the different actions onto the board.
......
{-# LANGUAGE Arrows #-}
module Reactogon.Layer.Layer where
module RCMA.Layer.Layer where
import Reactogon.Semantics
import Reactogon.Layer.Board
import Reactogon.Global.Clock
import RCMA.Semantics
import RCMA.Layer.Board
import RCMA.Global.Clock
import FRP.Yampa
-- Data representing the state of a layer. It is updated continuously.
......
module Reactogon.Layer.PlayHead where
module RCMA.Layer.PlayHead where
import Reactogon.Semantics
import RCMA.Semantics
import FRP.Yampa
playHead :: SF () ()
import FRP.Yampa
import Hails.Yampa
import Reactogon.Semantics
import Reactogon.Translator.Message
import Reactogon.Translator.Translator
import RCMA.Semantics
import RCMA.Translator.Message
import RCMA.Translator.Translator
-- The whole system is a single SF getting new messages, transforming
-- them and adding some more.
reactogon :: SF [(Frames, RawMessage)] [(Frames, RawMessage)]
reactogon = undefined
rcma :: SF [(Frames, RawMessage)] [(Frames, RawMessage)]
rcma = undefined
main :: IO ()
main = do
(inp, out) <- yampaReactiveDual [] reactogon
(inp, out) <- yampaReactiveDual [] rcma
return ()
......@@ -3,7 +3,7 @@
-- Written by Henrik Nilsson, 2016-05-27
-- Based on an earlier version.
--
-- This gives the semantics of a single Reactogon layer. The output is
-- This gives the semantics of a single RCMA layer. The output is
-- a high-level representation of notes for each beat. This is to be
-- translated to low-level MIDI message by a subsequent translator
-- responsible for merging notes from different layers, ensuring that
......
-- Contains function for scheduling and filtering events given the
-- correct informations.
module Reactogon.Translator.Filter where
module RCMA.Translator.Filter where
import Data.Bifunctor as BF
import Data.List (group, sortBy)
import Data.Ord
import FRP.Yampa
import Reactogon.Semantics
import Reactogon.Translator.Message
import RCMA.Semantics
import RCMA.Translator.Message
import Sound.JACK (NFrames (NFrames))
-- Takes a list of time stamped "things", a sample rate and a buffer
......
......@@ -2,18 +2,18 @@
-- Contains all the information and functions necessary to run a Jack
-- port and exchange information through reactive values and Yampa.
module Reactogon.Translator.Jack where
module RCMA.Translator.Jack where
import qualified Control.Monad.Exception.Synchronous as Sync
import qualified Control.Monad.Trans.Class as Trans
import qualified Foreign.C.Error as E
import Hails.Yampa
import Reactogon.Translator.Message
import RCMA.Translator.Message
import qualified Sound.JACK as Jack
import qualified Sound.JACK.MIDI as JMIDI
reactogonName :: String
reactogonName = "Reactogon"
rcmaName :: String
rcmaName = "RCMA"
inPortName :: String
inPortName = "input"
......@@ -23,14 +23,14 @@ outPortName = "output"
jackSetup :: IO ()
jackSetup = Jack.handleExceptions $
Jack.withClientDefault reactogonName $ \client ->
Jack.withClientDefault rcmaName $ \client ->
Jack.withPort client outPortName $ \output ->
Jack.withPort client inPortName $ \input ->
jackRun client input output (jackCallBack client input output)
jackRun client input output callback =
Jack.withProcess client callback $ do
Trans.lift $ putStrLn $ "Started " ++ reactogonName
Trans.lift $ putStrLn $ "Started " ++ rcmaName
Trans.lift $ Jack.waitForBreak
jackCallBack client input output = undefined
module Reactogon.Translator.Message where
module RCMA.Translator.Message where
import Reactogon.Semantics
import RCMA.Semantics
import qualified Sound.JACK as Jack
import qualified Sound.MIDI.Message as Message
import qualified Sound.MIDI.Message.Channel as Channel
......
......@@ -40,8 +40,8 @@ outLoop = concat [[(t,MIDI.Channel $ Channel.Cons
})] | t <- [0,2..]]
-}
reactogonName :: String
reactogonName = "Reactogon"
rcmaName :: String
rcmaName = "RCMA"
inPortName :: String
inPortName = "input"
......@@ -56,7 +56,7 @@ main = do
inState <- newMVar M.empty
outState <- newMVar M.empty
Jack.handleExceptions $
Jack.withClientDefault reactogonName $ \client ->
Jack.withClientDefault rcmaName $ \client ->
Jack.withPort client outPortName $ \output ->
Jack.withPort client inPortName $ \input -> do
clientState <- Trans.lift $ newEmptyMVar
......@@ -64,8 +64,8 @@ main = do
(jackLoop client clientState inState outState input output) $
Jack.withActivation client $ do
frpid <- Trans.lift $ forkIO $ mainReact inState outState clientState
Jack.connect client (reactogonName ++ ":" ++ outPortName) fsPortName
Trans.lift $ putStrLn $ "Started " ++ reactogonName
Jack.connect client (rcmaName ++ ":" ++ outPortName) fsPortName
Trans.lift $ putStrLn $ "Started " ++ rcmaName
Trans.lift $ Jack.waitForBreak
jackLoop :: Jack.Client
......
......@@ -5,15 +5,15 @@
-- events and other events. The latter will be transmitted as is
-- through the whole systems.
module Reactogon.Translator.SortMessage where
module RCMA.Translator.SortMessage where
import qualified Data.Bifunctor as BF
import Data.Function (on)
import Data.List (groupBy)
import Data.Maybe
import FRP.Yampa
import Reactogon.Semantics
import Reactogon.Translator.Message
import RCMA.Semantics
import RCMA.Translator.Message
-- TEMPORARY
data Controller = Lol
......
{-# LANGUAGE Arrows #-}
module Reactogon.Translator.Translator where
module RCMA.Translator.Translator where
import FRP.Yampa
import Reactogon.Semantics
import Reactogon.Translator.Message
import Reactogon.Translator.SortMessage
import RCMA.Semantics
import RCMA.Translator.Message
import RCMA.Translator.SortMessage
-- Takes a stream of raw messages and translates them by type.
fromRaw :: SF RawMessage (Note, Controller, RawMessage)
......
import Reactogon.Global.Clock
import Reactogon.Auxiliary.Auxiliary
import Reactogon.Semantics
import RCMA.Global.Clock
import RCMA.Auxiliary.Auxiliary
import RCMA.Semantics
import FRP.Yampa
main :: IO ()
......
import Reactogon.Auxiliary.Auxiliary
import RCMA.Auxiliary.Auxiliary
import FRP.Yampa
main :: IO ()
......
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