Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- data Sf = Sf Text Int Int
- sf2 :: Sf -> D -> SE (Sig, Sig)
- sfTemp :: Temp -> Sf -> D -> SE (Sig, Sig)
- sfMsg :: Sf -> D -> Msg -> SE (Sig, Sig)
- sfMsg3 :: Sf -> D -> Msg -> SE (Sig, Sig)
- sfMsgm :: Sf -> D -> Msg -> SE Sig
- sfMsg3m :: Sf -> D -> Msg -> SE Sig
- sfMsgLooper :: Sig -> Sig -> Sig -> Sf -> D -> Msg -> SE (Sig, Sig)
- sfMsgTemp :: Temp -> Sf -> D -> Msg -> SE (Sig, Sig)
- sfMsgTemp3 :: Temp -> Sf -> D -> Msg -> SE (Sig, Sig)
- sfMsgTempm :: Temp -> Sf -> D -> Msg -> SE Sig
- sfMsgTemp3m :: Temp -> Sf -> D -> Msg -> SE Sig
- sfMsgLooperTemp :: Sig -> Sig -> Sig -> Temp -> Sf -> D -> Msg -> SE (Sig, Sig)
- sfKey :: Sf -> D -> D -> D -> (Sig, Sig)
- sfKey3 :: Sf -> D -> D -> D -> (Sig, Sig)
- sfKeym :: Sf -> D -> D -> D -> Sig
- sfKey3m :: Sf -> D -> D -> D -> Sig
- sfKeyLooper :: Sig -> Sig -> Sig -> Sf -> D -> D -> D -> (Sig, Sig)
- sfCps :: Sf -> D -> D -> D -> (Sig, Sig)
- sfCps3 :: Sf -> D -> D -> D -> (Sig, Sig)
- sfCpsm :: Sf -> D -> D -> D -> Sig
- sfCps3m :: Sf -> D -> D -> D -> Sig
- sfCpsLooper :: Sig -> Sig -> Sig -> Sf -> D -> D -> D -> (Sig, Sig)
Documentation
The sf2 sound font preset. It is defined with file name, bank and program integers.
Instances
IfB Sf | |
Val Sf | |
Default Sf | |
Defined in Csound.Typed.Control.Sf2 | |
type BooleanOf Sf | |
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.