| 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
- | InitArr Var (ArrSize a)
- | ReadArr Var (ArrIndex a)
- | WriteArr Var (ArrIndex a) a
- | WriteInitArr Var (ArrIndex a) a
- | TfmArr IsArrInit Var Info [a]
- | IfBegin Rate (CondInfo a)
- | ElseBegin
- | IfEnd
- | UntilBegin (CondInfo a)
- | UntilEnd
- | WhileBegin (CondInfo a)
- | WhileRefBegin Var
- | WhileEnd
- | Verbatim String
- | Starts
- | Seq a a
- | Ends a
- | InitMacrosInt String Int
- | InitMacrosDouble String Double
- | InitMacrosString String String
- | ReadMacrosInt String
- | ReadMacrosDouble String
- | ReadMacrosString String
- 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 GenId
- 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
- type IsArrInit = Bool
- type ArrSize a = [a]
- type ArrIndex a = [a]
Documentation
Constructors
| RatedExp | |
Fields
| |
Instances
| Functor RatedExp Source # | |
| Foldable RatedExp Source # | |
| Traversable RatedExp Source # | |
| Hashable E Source # | |
| Eq a => Eq (RatedExp a) Source # | |
| Ord a => Ord (RatedExp a) Source # | |
| Show a => Show (RatedExp a) Source # | |
| Generic (RatedExp a) Source # | |
| Hashable a => Hashable (RatedExp a) Source # | |
| type BooleanOf E # | |
| type Rep (RatedExp a) Source # | |
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 | |
| InitArr Var (ArrSize a) | Arrays |
| ReadArr Var (ArrIndex a) | |
| WriteArr Var (ArrIndex a) a | |
| WriteInitArr Var (ArrIndex a) a | |
| TfmArr IsArrInit Var Info [a] | |
| IfBegin Rate (CondInfo a) | Imperative If-then-else |
| ElseBegin | |
| IfEnd | |
| UntilBegin (CondInfo a) | looping constructions |
| UntilEnd | |
| WhileBegin (CondInfo a) | |
| WhileRefBegin Var | |
| WhileEnd | |
| Verbatim String | Verbatim stmt |
| Starts | Dependency tracking |
| Seq a a | |
| Ends a | |
| InitMacrosInt String Int | read macros arguments |
| InitMacrosDouble String Double | |
| InitMacrosString String String | |
| ReadMacrosInt String | |
| ReadMacrosDouble String | |
| ReadMacrosString String |
An instrument identifier
Constructors
| InstrId | |
Fields
| |
| InstrLabel String | |
intInstrId :: Int -> InstrId Source #
Constructs an instrument id with the integer.
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
| IntGenId Int | |
| StringGenId String |
Constructors
| InlinePrim Int | |
| InlineExp a [InlineExp a] |
Constructors
| PreInline a [b] |
Instances
| Functor (PreInline a) Source # | |
| Foldable (PreInline a) Source # | |
| Traversable (PreInline a) Source # | |
| (Eq b, Eq a) => Eq (PreInline a b) Source # | |
| (Ord b, Ord a) => Ord (PreInline a b) Source # | |
| (Show b, Show a) => Show (PreInline a b) Source # | |
| Generic (PreInline a b) Source # | |
| (Hashable a, Hashable b) => Hashable (PreInline a b) Source # | |
| type Rep (PreInline a b) Source # | |
Constructors
| TrueOp | |
| FalseOp | |
| And | |
| Or | |
| Equals | |
| NotEquals | |
| Less | |
| Greater | |
| LessEquals | |
| GreaterEquals |