csound-expression-typed-0.0.0: typed core for the library csound-expression

Safe HaskellNone

Csound.Typed.Types.Prim

Contents

Synopsis

Documentation

newtype Sig Source

Signals

Constructors

Sig 

Fields

unSig :: GE E
 

Instances

newtype D Source

Constant numbers

Constructors

D 

Fields

unD :: GE E
 

Instances

Floating D 
Fractional D 
Num D 
IfB D 
EqB D 
OrdB D 
Monoid D 
Default D 
SigOrD D 
Val D 
Arg D 
Tuple D 
PureSingle D 
DirtySingle (SE D) 
DirtyMulti b => DirtyMulti ([D] -> b) 
DirtyMulti b => DirtyMulti (D -> b) 
PureMulti b => PureMulti ([D] -> b) 
PureMulti b => PureMulti (D -> b) 
Procedure b => Procedure ([D] -> b) 
Procedure b => Procedure (D -> b) 
DirtySingle b => DirtySingle ([D] -> b) 
DirtySingle b => DirtySingle (D -> b) 
PureSingle b => PureSingle ([D] -> b) 
PureSingle b => PureSingle (D -> b) 

data Tab Source

Tables (or arrays)

Constructors

Tab (GE E) 
TabPre PreTab 

newtype Str Source

Strings

Constructors

Str 

Fields

unStr :: GE E
 

newtype Spec Source

Spectrum. It's fsig in the Csound.

Constructors

Spec 

Fields

unSpec :: GE E
 

newtype Wspec Source

Another type for spectrum. It's wsig in the Csound.

Constructors

Wspec 

Fields

unWspec :: GE E
 

newtype BoolSig Source

A signal of booleans.

Constructors

BoolSig 

Fields

unBoolSig :: GE E
 

newtype BoolD Source

A constant boolean value.

Constructors

BoolD 

Fields

unBoolD :: GE E
 

Instances

newtype Unit Source

Csound's empty tuple.

Constructors

Unit 

Fields

unUnit :: GE ()
 

Instances

unit :: UnitSource

Constructs Csound's empty tuple.

class Val a whereSource

Contains all Csound values.

Methods

fromGE :: GE E -> aSource

toGE :: a -> GE ESource

fromE :: E -> aSource

hideGE :: Val a => GE a -> aSource

class Val a => SigOrD a Source

Instances

Tables

data TabSize Source

Constructors

SizePlain Int 
SizeDegree 

Instances

fromPreTab :: PreTab -> GE GenSource

skipNorm :: Tab -> TabSource

Skips normalization (sets table size to negative value)

forceNorm :: Tab -> TabSource

Force normalization (sets table size to positive value). Might be useful to restore normalization for table doubles.

constructors

double :: Double -> DSource

Constructs a number.

int :: Int -> DSource

Constructs an integer.

text :: String -> StrSource

Constructs a string.

constants

idur :: DSource

Querries a total duration of the note. It's equivallent to Csound's p3 field.

converters

ar :: Sig -> SigSource

Sets a rate of the signal to audio rate.

kr :: Sig -> SigSource

Sets a rate of the signal to control rate.

ir :: Sig -> DSource

Converts a signal to the number (initial value of the signal).

sig :: D -> SigSource

Makes a constant signal from the number.

lifters

on0 :: Val a => E -> aSource

on1 :: (Val a, Val b) => (E -> E) -> a -> bSource

on2 :: (Val a, Val b, Val c) => (E -> E -> E) -> a -> b -> cSource

on3 :: (Val a, Val b, Val c, Val d) => (E -> E -> E -> E) -> a -> b -> c -> dSource

numeric funs

quot' :: SigOrD a => a -> a -> aSource

rem' :: SigOrD a => a -> a -> aSource

div' :: SigOrD a => a -> a -> aSource

mod' :: SigOrD a => a -> a -> aSource

ceil' :: SigOrD a => a -> aSource

floor' :: SigOrD a => a -> aSource

round' :: SigOrD a => a -> aSource

int' :: SigOrD a => a -> aSource

frac' :: SigOrD a => a -> aSource

logic funs

when1 :: BoolSig -> SE () -> SE ()Source

Invokes the given procedure if the boolean signal is true.

whens :: [(BoolSig, SE ())] -> SE () -> SE ()Source

The chain of when1s. Tests all the conditions in sequence if everything is false it invokes the procedure given in the second argument.

boolSig :: BoolD -> BoolSigSource

Creates a constant boolean signal.