Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Bracketed Ugens.
ScSynth is controlled by sending instructions in the form of Open Sound Control (Osc) messages. One family of messages allocate, set and free Buffers. Ugen graphs that utilise Buffers don't contain the messages to manage them. These messages are ordinarily written and sent outside of the graph context.
The bracketUgen function attaches a pair of Osc message sequences to a Ugen value. The first sequence is to be sent before the graph the Ugen belongs to is started, the other after it has ended. The messages are stored in the Ugen type, but are not written to the SynthDef file representing the Ugen graph. The scsynthPlayAt function reads and sends Ugen bracket messages, in addition to the Ugen graph itself.
The functions defined here return Ugen values with brackets attached to them.
Synopsis
- readChanToNc :: Int -> [Int] -> Int
- sndfileDiskIn :: (String, Buffer_Id, [Int]) -> FilePath -> Maybe Ugen -> Loop Ugen -> Ugen
- sndfileIn :: (String, Buffer_Id, [Int]) -> FilePath -> Loop Ugen -> Ugen
- sndfileVarIn :: (String, Buffer_Id, [Int]) -> FilePath -> Ugen -> Loop Ugen -> Ugen
- sndfileRead :: (String, Buffer_Id, [Int]) -> FilePath -> (Ugen, Int, Ugen, Ugen)
- bGenSine1 :: (String, Buffer_Id, Int) -> [B_Gen] -> [Double] -> Ugen
- bGenSine1Tbl :: (String, Buffer_Id, Int) -> [Double] -> Ugen
- bGenCheby :: (String, Buffer_Id, Int) -> [B_Gen] -> [Double] -> Ugen
- bGenChebyTbl :: (String, Buffer_Id, Int) -> [Double] -> Ugen
Documentation
readChanToNc :: Int -> [Int] -> Int Source #
sfNc is the number of channels at a sound file. readChan is a list of channels indexed to read. Returns a channel count, either sfNc or the length of readChan. If readChan in empty returns sfNc, else returns the length of readChan. This function checks that requested channels are in range.
sndfileDiskIn :: (String, Buffer_Id, [Int]) -> FilePath -> Maybe Ugen -> Loop Ugen -> Ugen Source #
diskIn or vDiskIn with brackets to 1. allocate and read and then 2. close and free buffer. If ctlName is empty the buffer is returned as a constant, else as a control with the given name. Ignoring the brackets, this is equivalent to writing a diskIn or vDiskIn Ugen, with the number of channels given by readChan or derived from the named file. If readChan is empty all channels are read.
sndfileIn :: (String, Buffer_Id, [Int]) -> FilePath -> Loop Ugen -> Ugen Source #
diskIn form of sndfileDiskIn
sndfileVarIn :: (String, Buffer_Id, [Int]) -> FilePath -> Ugen -> Loop Ugen -> Ugen Source #
vDiskIn form of sndfileDiskIn
sndfileRead :: (String, Buffer_Id, [Int]) -> FilePath -> (Ugen, Int, Ugen, Ugen) Source #
Returns Buffer_Id as a bracketed buffer identifier Ugen, along with basic sound file information: numberOfChannels, sampleRate, numberOfFrames. If ctlName is empty the buffer is returned as a constant, else as a control with the given name. The brackets will 1. allocate and read and then 2. free the buffer. Ignoring the brackets, and the sample rate and frame count, this is equivalent to declaring a buffer identifier. If readChan is empty all channels are read.
bGenSine1 :: (String, Buffer_Id, Int) -> [B_Gen] -> [Double] -> Ugen Source #
Bracketed b_gen sine1 If ctlName is empty the buffer is returned as a constant, else as a control with the given name.
bGenSine1Tbl :: (String, Buffer_Id, Int) -> [Double] -> Ugen Source #
bGenSine1 with standard wavetable flags (normalise and wavetable and clear).