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

Safe HaskellNone
LanguageHaskell2010

Csound.Typed.Render

Contents

Synopsis

Documentation

renderEff :: (Sigs a, Sigs b) => (a -> SE b) -> IO String Source

renderEffBy :: (Sigs a, Sigs b) => Options -> (a -> SE b) -> IO String Source

Options

data Options Source

Csound options. The default values are

flags      = def     -- the only flag set by default is "no-displays" 
                     -- to supress the display of the tables
sampleRate = 44100
blockSize  = 64
gain       = 0.5
tabFi      = fineFi 13 [(idLins, 11), (idExps, 11), (idConsts, 9), (idSplines, 11), (idStartEnds, 12)] }

Constructors

Options 

Fields

csdFlags :: Flags

Csound command line flags

csdSampleRate :: Maybe Int

The sample rate

csdBlockSize :: Maybe Int

The number of audio samples in one control step

csdGain :: Maybe Double

A gain of the final output

csdTabFi :: Maybe TabFi

Default fidelity of the arrays

Table fidelity

data TabFi Source

Table size fidelity (how many points in the table by default).

Constructors

TabFi 

Instances

fineFi :: Int -> [(Int, Int)] -> TabFi Source

Sets different table size for different GEN-routines.

fineFi n ps 

where

  • n is the default value for table size (size is a n power of 2) for all gen routines that are not listed in the next argument ps.
  • ps is a list of pairs (genRoutineId, tableSizeDegreeOf2) that sets the given table size for a given GEN-routine.

with this function we can set lower table sizes for tables that are usually used in the envelopes.

coarseFi :: Int -> TabFi Source

Sets the same table size for all tables.

coarseFi n

where n is a degree of 2. For example, n = 10 sets size to 1024 points for all tables by default.

Gen identifiers

Low level Csound integer identifiers for tables. These names can be used in the function fineFi