module Csound.Dynamic.Types.CsdFile(
Csd(..), Flags, Orc(..), Sco(..), Instr(..), InstrBody,
intInstr, alwaysOn
) where
import Csound.Dynamic.Types.Exp
import Csound.Dynamic.Types.Flags
import Csound.Dynamic.Types.EventList
data Csd = Csd
{ csdFlags :: Flags
, csdOrc :: Orc
, csdSco :: Sco
}
data Orc = Orc
{ orcHead :: InstrBody
, orcInstruments :: [Instr]
}
type InstrBody = E
data Instr = Instr
{ instrName :: InstrId
, instrBody :: InstrBody
}
data Sco = Sco
{ scoTotalDur :: Maybe Double
, scoGens :: [(Int, Gen)]
, scoNotes :: [(InstrId, [CsdEvent Note])] }
intInstr :: Int -> E -> Instr
intInstr n expr = Instr (intInstrId n) expr
alwaysOn :: InstrId -> (InstrId, [CsdEvent Note])
alwaysOn instrId = (instrId, [(0, 1, [])])