csound-expression-4.9.1: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Control.Sf

Contents

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

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.

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.

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.