csound-expression-5.4.3: library to make electronic music
Safe HaskellNone
LanguageHaskell2010

Csound.Control.Sf

Description

Sound fonts. Playing Sf2 samples.

There are three groups of functions. Functions that are defined for midi messages, midi notes (it's a pair of integers from 0-127) and the frequencies (in Hz). Each group contains four functions. They are destinguished by suffixes. The function with no suffix play a sf2 file with linear interpolation and take stereo output. The function with suffix 3 read samples with cubic interpolation. The functions with suffix m produce mono outputs. The loopers play samples in loops.

Synopsis

Documentation

data Sf #

The sf2 sound font preset. It is defined with file name, bank and program integers.

Constructors

Sf String Int Int 

Instances

Instances details
IfB Sf 
Instance details

Defined in Csound.Typed.Control.Sf2

Methods

ifB :: bool ~ BooleanOf Sf => bool -> Sf -> Sf -> Sf #

Val Sf 
Instance details

Defined in Csound.Typed.Control.Sf2

Methods

fromGE :: GE E -> Sf #

toGE :: Sf -> GE E #

fromE :: E -> Sf #

Default Sf 
Instance details

Defined in Csound.Typed.Control.Sf2

Methods

def :: Sf #

type BooleanOf Sf 
Instance details

Defined in Csound.Typed.Control.Sf2

sf2 :: Sf -> D -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font. Midi listens on all channels. It's useful to quickly test a sound font. The second argument is a sustain in seconds. How long it takes for the sound to decay.

sfTemp :: Temp -> Sf -> D -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font. Midi listens on all channels. It's useful to quickly test a sound font. The second argument is a sustain in seconds. How long it takes for the sound to decay.

Midi message

sfMsg :: Sf -> D -> Msg -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with linear interpolation.

sfMsg3 :: Sf -> D -> Msg -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with cubic interpolation.

sfMsgm :: Sf -> D -> Msg -> SE Sig Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with linear interpolation. Produces mono output.

sfMsg3m :: Sf -> D -> Msg -> SE Sig Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with cubic interpolation. Produces mono output.

sfMsgLooper :: Sig -> Sig -> Sig -> Sf -> D -> Msg -> SE (Sig, Sig) Source #

Midi looper of the sf2 samples. The first arguments are: start, end, crossfade of the loop.

Custom temperament

sfMsgTemp :: Temp -> Sf -> D -> Msg -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with linear interpolation.

sfMsgTemp3 :: Temp -> Sf -> D -> Msg -> SE (Sig, Sig) Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with cubic interpolation.

sfMsgTempm :: Temp -> Sf -> D -> Msg -> SE Sig Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with linear interpolation. Produces mono output.

sfMsgTemp3m :: Temp -> Sf -> D -> Msg -> SE Sig Source #

Creates a midi instrument from sf2 sound font file. The second argument is sustain in seconds. Reads samples with cubic interpolation. Produces mono output.

sfMsgLooperTemp :: Sig -> Sig -> Sig -> Temp -> Sf -> D -> Msg -> SE (Sig, Sig) Source #

Midi looper of the sf2 samples. The first arguments are: start, end, crossfade of the loop.

Midi note

sfKey :: Sf -> D -> D -> D -> (Sig, Sig) Source #

Reads sf2 samples at given midi velocity and key (both are from 0 to 127). The second argument is sustain. Interpolation is linear.

sfKey3 :: Sf -> D -> D -> D -> (Sig, Sig) Source #

Reads sf2 samples at given midi velocity and key (both are from 0 to 127). The second argument is sustain. Interpolation is cubic.

sfKeym :: Sf -> D -> D -> D -> Sig Source #

Reads sf2 samples at given midi velocity and key (both are from 0 to 127). The second argument is sustain. Interpolation is linear. The output is mono.

sfKey3m :: Sf -> D -> D -> D -> Sig Source #

Reads sf2 samples at given midi velocity and key (both are from 0 to 127). The second argument is sustain. Interpolation is cubic. The output is mono.

sfKeyLooper :: Sig -> Sig -> Sig -> Sf -> D -> D -> D -> (Sig, Sig) Source #

Looper of the sf2 samples. The first arguments are: start, end, crossfade of the loop.

Frequency in Hz

sfCps :: Sf -> D -> D -> D -> (Sig, Sig) Source #

Reads sf2 samples with amplitude in (0, 1) and frequency in Hz. The interpolation is linear.

sfCps3 :: Sf -> D -> D -> D -> (Sig, Sig) Source #

Reads sf2 samples with amplitude in (0, 1) and frequency in Hz. The interpolation is cubic.

sfCpsm :: Sf -> D -> D -> D -> Sig Source #

Reads sf2 samples with amplitude in (0, 1) and frequency in Hz. The interpolation is linear. The output is mono.

sfCps3m :: Sf -> D -> D -> D -> Sig Source #

Reads sf2 samples with amplitude in (0, 1) and frequency in Hz. The interpolation is cubic. The output is mono.

sfCpsLooper :: Sig -> Sig -> Sig -> Sf -> D -> D -> D -> (Sig, Sig) Source #

Looper of the sf2 samples. The first arguments are: start, end, crossfade of the loop.