| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Csound.Dynamic.Types.Exp
Contents
Description
Main types
Synopsis
- 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
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).
Instances
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 |
Instances
An instrument identifier
Constructors
| InstrId | |
Fields
| |
| InstrLabel String | |
Instances
| Eq InstrId Source # | |
| Ord InstrId Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| Show InstrId Source # | |
| Generic InstrId Source # | |
| Hashable InstrId Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep InstrId Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep InstrId = D1 (MetaData "InstrId" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "InstrId" PrefixI True) (S1 (MetaSel (Just "instrIdFrac") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "instrIdCeil") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "InstrLabel" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 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 | |
Instances
| Eq Var Source # | |
| Ord Var Source # | |
| Show Var Source # | |
| Generic Var Source # | |
| Hashable Var Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep Var Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep Var = D1 (MetaData "Var" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "Var" PrefixI True) (S1 (MetaSel (Just "varType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 VarType) :*: (S1 (MetaSel (Just "varRate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Rate) :*: S1 (MetaSel (Just "varName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name))) :+: C1 (MetaCons "VarVerbatim" PrefixI True) (S1 (MetaSel (Just "varRate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Rate) :*: S1 (MetaSel (Just "varName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name))) | |
Constructors
| Info | |
Fields
| |
Instances
| Eq Info Source # | |
| Ord Info Source # | |
| Show Info Source # | |
| Generic Info Source # | |
| Hashable Info Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep Info Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep Info = D1 (MetaData "Info" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "Info" PrefixI True) (S1 (MetaSel (Just "infoName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name) :*: (S1 (MetaSel (Just "infoSignature") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Signature) :*: S1 (MetaSel (Just "infoOpcFixity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 OpcFixity)))) | |
Instances
| Eq OpcFixity Source # | |
| Ord OpcFixity Source # | |
| Show OpcFixity Source # | |
| Generic OpcFixity Source # | |
| Hashable OpcFixity Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep OpcFixity Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep OpcFixity = D1 (MetaData "OpcFixity" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "Prefix" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Infix" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Opcode" PrefixI False) (U1 :: Type -> Type))) | |
The Csound rates.
Instances
| Bounded Rate Source # | |
| Enum Rate Source # | |
| Eq Rate Source # | |
| Ord Rate Source # | |
| Show Rate Source # | |
| Generic Rate Source # | |
| Hashable Rate Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep Rate Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep Rate = D1 (MetaData "Rate" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (((C1 (MetaCons "Xr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ar" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Kr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ir" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Sr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Fr" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Wr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Tvar" PrefixI False) (U1 :: Type -> Type)))) | |
Constructors
| SingleRate (Map Rate [Rate]) | |
| MultiRate | |
Fields
| |
Instances
| Eq Signature Source # | |
| Ord Signature Source # | |
| Show Signature Source # | |
| Hashable Signature Source # | |
Defined in Csound.Dynamic.Types.Exp | |
Constructors
| P Int | |
| PString Int | |
| PrimInt Int | |
| PrimDouble Double | |
| PrimString String | |
| PrimInstrId InstrId | |
| PrimVar | |
Fields
| |
Instances
Instances
| Eq Gen Source # | |
| Ord Gen Source # | |
| Show Gen Source # | |
| Generic Gen Source # | |
| Hashable Gen Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep Gen Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep Gen = D1 (MetaData "Gen" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "Gen" PrefixI True) ((S1 (MetaSel (Just "genSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "genId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 GenId)) :*: (S1 (MetaSel (Just "genArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Double]) :*: S1 (MetaSel (Just "genFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))))) | |
Constructors
| IntGenId Int | |
| StringGenId String |
Instances
| Eq GenId Source # | |
| Ord GenId Source # | |
| Show GenId Source # | |
| Generic GenId Source # | |
| Hashable GenId Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep GenId Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep GenId = D1 (MetaData "GenId" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "IntGenId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "StringGenId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) | |
Instances
| Functor (Inline a) Source # | |
| Foldable (Inline a) Source # | |
Defined in Csound.Dynamic.Types.Exp Methods fold :: Monoid m => Inline a m -> m # foldMap :: Monoid m => (a0 -> m) -> Inline a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Inline a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Inline a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Inline a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Inline a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Inline a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Inline a a0 -> a0 # toList :: Inline a a0 -> [a0] # length :: Inline a a0 -> Int # elem :: Eq a0 => a0 -> Inline a a0 -> Bool # maximum :: Ord a0 => Inline a a0 -> a0 # minimum :: Ord a0 => Inline a a0 -> a0 # | |
| Traversable (Inline a) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| Eq a => Eq1 (Inline a) Source # | |
| Ord a => Ord1 (Inline a) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| Hashable a => Hashable1 (Inline a) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| Generic1 (Inline a :: Type -> Type) Source # | |
| (Eq a, Eq b) => Eq (Inline a b) Source # | |
| (Ord a, Ord b) => Ord (Inline a b) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| (Show a, Show b) => Show (Inline a b) Source # | |
| (Hashable a, Hashable b) => Hashable (Inline a b) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep1 (Inline a :: Type -> Type) Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep1 (Inline a :: Type -> Type) = D1 (MetaData "Inline" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "Inline" PrefixI True) (S1 (MetaSel (Just "inlineExp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (InlineExp a)) :*: S1 (MetaSel (Just "inlineEnv") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 IntMap))) | |
Constructors
| InlinePrim Int | |
| InlineExp a [InlineExp a] |
Instances
| Eq a => Eq (InlineExp a) Source # | |
| Ord a => Ord (InlineExp a) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| Show a => Show (InlineExp a) Source # | |
| Generic (InlineExp a) Source # | |
| Hashable a => Hashable (InlineExp a) Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep (InlineExp a) Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep (InlineExp a) = D1 (MetaData "InlineExp" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (C1 (MetaCons "InlinePrim" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "InlineExp" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [InlineExp a]))) | |
Constructors
| PreInline a [b] |
Instances
Constructors
| TrueOp | |
| FalseOp | |
| And | |
| Or | |
| Equals | |
| NotEquals | |
| Less | |
| Greater | |
| LessEquals | |
| GreaterEquals |
Instances
| Eq CondOp Source # | |
| Ord CondOp Source # | |
| Show CondOp Source # | |
| Generic CondOp Source # | |
| Hashable CondOp Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep CondOp Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep CondOp = D1 (MetaData "CondOp" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) (((C1 (MetaCons "TrueOp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "FalseOp" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "And" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Or" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Equals" PrefixI False) (U1 :: Type -> Type)))) :+: ((C1 (MetaCons "NotEquals" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Less" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Greater" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "LessEquals" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GreaterEquals" PrefixI False) (U1 :: Type -> Type))))) | |
Instances
| Eq NumOp Source # | |
| Ord NumOp Source # | |
| Show NumOp Source # | |
| Generic NumOp Source # | |
| Hashable NumOp Source # | |
Defined in Csound.Dynamic.Types.Exp | |
| type Rep NumOp Source # | |
Defined in Csound.Dynamic.Types.Exp type Rep NumOp = D1 (MetaData "NumOp" "Csound.Dynamic.Types.Exp" "csound-expression-dynamic-0.3.5-216XiQEittiGUNSDCK19FO" False) ((C1 (MetaCons "Add" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Sub" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Neg" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Mul" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Div" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Pow" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Mod" PrefixI False) (U1 :: Type -> Type)))) | |
type MultiOut a = Int -> a Source #
Multiple output. Specify the number of outputs to get the result.