Safe Haskell | None |
---|---|
Language | Haskell98 |
Csound.Dynamic.Types.Exp
Description
Main types
- type E = Fix RatedExp
- data RatedExp a = RatedExp {
- ratedExpRate :: Maybe Rate
- ratedExpDepends :: Maybe LineNum
- ratedExpExp :: Exp a
- isEmptyExp :: E -> Bool
- type RatedVar = Var Rate
- ratedVar :: Rate -> Int -> RatedVar
- ratedVarRate :: RatedVar -> Rate
- ratedVarId :: RatedVar -> Int
- ratedExp :: Maybe Rate -> Exp E -> E
- noRate :: Exp E -> E
- withRate :: Rate -> Exp E -> E
- setRate :: Rate -> E -> E
- type Exp a = MainExp (PrimOr a)
- toPrimOr :: E -> PrimOr E
- toPrimOrTfm :: Rate -> E -> PrimOr E
- newtype PrimOr a = PrimOr {}
- data MainExp a
- = EmptyExp
- | ExpPrim Prim
- | Tfm Info [a]
- | ConvertRate Rate Rate a
- | Select Rate Int a
- | If (CondInfo a) a a
- | ExpBool (BoolExp a)
- | ExpNum (NumExp a)
- | InitVar Var a
- | ReadVar Var
- | WriteVar Var a
- | IfBegin (CondInfo a)
- | ElseBegin
- | IfEnd
- | UntilBegin (CondInfo a)
- | UntilEnd
- | Verbatim String
- | Starts
- | Seq a a
- | Ends a
- type Name = String
- data InstrId
- = InstrId {
- instrIdFrac :: Maybe Int
- instrIdCeil :: Int
- | InstrLabel String
- = InstrId {
- intInstrId :: Int -> InstrId
- ratioInstrId :: Int -> Int -> InstrId
- stringInstrId :: String -> InstrId
- data VarType
- data Var
- data Info = Info {}
- data OpcFixity
- data Rate
- data Signature
- = SingleRate (Map Rate [Rate])
- | MultiRate {
- outMultiRate :: [Rate]
- inMultiRate :: [Rate]
- isInfix :: Info -> Bool
- isPrefix :: Info -> Bool
- data Prim
- = P Int
- | PString Int
- | PrimInt Int
- | PrimDouble Double
- | PrimString String
- | PrimInstrId InstrId
- | PrimVar {
- primVarTargetRate :: Rate
- primVar :: Var
- data Gen = Gen {}
- data Inline a b = Inline {}
- data InlineExp a
- = InlinePrim Int
- | InlineExp a [InlineExp a]
- data PreInline a b = PreInline a [b]
- type BoolExp a = PreInline CondOp a
- type CondInfo a = Inline CondOp a
- data CondOp
- = TrueOp
- | FalseOp
- | And
- | Or
- | Equals
- | NotEquals
- | Less
- | Greater
- | LessEquals
- | GreaterEquals
- isTrue :: CondInfo a -> Bool
- isFalse :: CondInfo a -> Bool
- type NumExp a = PreInline NumOp a
- data NumOp
- type Note = [Prim]
- type MultiOut a = Int -> a
Documentation
Constructors
RatedExp | |
Fields
|
isEmptyExp :: E -> Bool Source
ratedVarRate :: RatedVar -> Rate Source
Querries a rate.
ratedVarId :: RatedVar -> Int Source
Querries an integral identifier.
toPrimOr :: E -> PrimOr E Source
Constructs PrimOr values from the expressions. It does inlining in case of primitive values.
toPrimOrTfm :: Rate -> E -> PrimOr E Source
Constructs PrimOr values from the expressions. It does inlining in case of primitive values.
It's a primitive value or something else. It's used for inlining of the constants (primitive values).
Constructors
EmptyExp | |
ExpPrim Prim | Primitives |
Tfm Info [a] | Application of the opcode: we have opcode information (Info) and the arguments [a] |
ConvertRate Rate Rate a | Rate conversion |
Select Rate Int a | Selects a cell from the tuple, here argument is always a tuple (result of opcode that returns several outputs) |
If (CondInfo a) a a | if-then-else |
ExpBool (BoolExp a) | Boolean expressions (rendered in infix notation in the Csound) |
ExpNum (NumExp a) | Numerical expressions (rendered in infix notation in the Csound) |
InitVar Var a | Reading/writing a named variable |
ReadVar Var | |
WriteVar Var a | |
IfBegin (CondInfo a) | Imperative If-then-else |
ElseBegin | |
IfEnd | |
UntilBegin (CondInfo a) | looping constructions |
UntilEnd | |
Verbatim String | Verbatim stmt |
Starts | Dependency tracking |
Seq a a | |
Ends a |
An instrument identifier
Constructors
InstrId | |
Fields
| |
InstrLabel String |
intInstrId :: Int -> InstrId Source
Constructs an instrument id with the integer.
ratioInstrId :: Int -> Int -> InstrId Source
Constructs an instrument id with fractional part.
stringInstrId :: String -> InstrId Source
Constructs an instrument id with the string label.
Constructors
Var | |
VarVerbatim | |
Constructors
Info | |
Fields
|
The Csound rates.
Constructors
SingleRate (Map Rate [Rate]) | |
MultiRate | |
Fields
|
Constructors
P Int | |
PString Int | |
PrimInt Int | |
PrimDouble Double | |
PrimString String | |
PrimInstrId InstrId | |
PrimVar | |
Fields
|
Constructors
InlinePrim Int | |
InlineExp a [InlineExp a] |
Constructors
PreInline a [b] |
Constructors
TrueOp | |
FalseOp | |
And | |
Or | |
Equals | |
NotEquals | |
Less | |
Greater | |
LessEquals | |
GreaterEquals |