csound-expression-5.1.0: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Live

Contents

Description

UIs for live performances

Synopsis

Mixer

mixer :: [(String, SE Sig2)] -> Source Sig2 Source #

Widget that represents a mixer.

hmixer :: [(String, SE Sig2)] -> Source Sig2 Source #

Widget that represents a mixer with horizontal grouping of elements.

mixMono :: String -> Sig -> (String, SE Sig2) Source #

Transforms the mono signal to the stereo input for the mixer widget.

Effects

type FxFun = Sig2 -> SE Sig2 Source #

The stereo signal processing function.

class FxUI a where Source #

Minimal complete definition

applyFxArgs, arityFx

Methods

applyFxArgs :: a -> [Sig] -> Sig2 -> SE Sig2 Source #

arityFx :: a -> Int Source #

Instances

FxUI FxFun Source # 
FxUI (Sig2 -> Sig2) Source # 

Methods

applyFxArgs :: (Sig2 -> Sig2) -> [Sig] -> Sig2 -> SE Sig2 Source #

arityFx :: (Sig2 -> Sig2) -> Int Source #

FxUI a => FxUI (Sig -> a) Source # 

Methods

applyFxArgs :: (Sig -> a) -> [Sig] -> Sig2 -> SE Sig2 Source #

arityFx :: (Sig -> a) -> Int Source #

fxBox :: FxUI a => String -> a -> Bool -> [(String, Double)] -> Source FxFun Source #

Creates a widget that represents a stereo signal processing function. The parameters of the widget are updated with sliders. For example let's create a simple gain widget. It can be encoded like this:

uiGain :: Bool -> Double -> Source FxFun
uiGain isOn gain = fxBox "Gain" fx isOn [("gain", gain)]
   where 
       fx :: Sig -> Sig2 -> Sig2
       fx = mul

Let's look at the arguments of the function

fxBox name fx isOn args
  • name -- is the name of the widget
  • fx -- is signal processing function (see the class FxUI).
  • isOn -- whether widget in the active state
  • args -- list of initial values for arguments and names of the arguments.

It's cool to set the color of the widget with fxColor function. we can make our widgets much more intersting to look at.

uiBox :: String -> Source FxFun -> Bool -> Source FxFun Source #

Creates an FX-box from the given visual representation. It insertes a big On/Off button atop of the GUI.

fxColor :: Color -> Source a -> Source a Source #

Colors the source widgets.

fxVer :: [Source FxFun] -> Source FxFun Source #

Groups the signal processing widgets. The functions are composed the visuals are grouped verticaly.

fxHor :: [Source FxFun] -> Source FxFun Source #

Groups the signal processing widgets. The functions are composed the visuals are grouped horizontaly.

fxSca :: Double -> Source FxFun -> Source FxFun Source #

Scales the gui for signal processing widgets.

fxApp :: FxFun -> Source FxFun -> Source FxFun Source #

Applies a function to a signal processing function.

Instrument choosers

hinstrChooser :: Sigs b => [(String, a -> SE b)] -> Int -> Source (a -> SE b) Source #

Chooses an instrument among several alternatives. It uses the hradio for GUI groupping.

vinstrChooser :: Sigs b => [(String, a -> SE b)] -> Int -> Source (a -> SE b) Source #

Chooses an instrument among several alternatives. It uses the vradio for GUI groupping.

hmidiChooser :: Sigs a => [(String, Msg -> SE a)] -> Int -> Source a Source #

Chooses a midi instrument among several alternatives. It uses the hradio for GUI groupping.

vmidiChooser :: Sigs a => [(String, Msg -> SE a)] -> Int -> Source a Source #

Chooses a midi instrument among several alternatives. It uses the vradio for GUI groupping.

Fx units

uiDistort :: Bool -> Double -> Double -> Double -> Source FxFun Source #

The distortion widget. The arguments are

uiDistort isOn levelOfDistortion drive tone

uiChorus :: Bool -> Double -> Double -> Double -> Double -> Source FxFun Source #

The chorus widget. The arguments are

uiChorus isOn mix rate depth width 

uiFlanger :: Bool -> Double -> Double -> Double -> Double -> Double -> Source FxFun Source #

The flanger widget. The arguments are

uiFlanger isOn mix feedback rate depth delay

uiPhaser :: Bool -> Double -> Double -> Double -> Double -> Double -> Source FxFun Source #

The phaser widget. The arguments are

uiPhaser isOn mix feedback rate depth frequency

uiDelay :: Bool -> Double -> Double -> Double -> Double -> Source FxFun Source #

The delay widget. The arguments are

uiDelay isOn mix feedback delayTime tone

uiEcho :: Bool -> D -> Double -> Double -> Source FxFun Source #

The simplified delay widget. The arguments are

uiEcho isOn maxDelayTime delayTime feedback

uiFilter :: Bool -> Double -> Double -> Double -> Source FxFun Source #

The pair of low and high pass filters

uiFilter isOn lowPassfrequency highPassFrequency gain

uiReverb :: Bool -> Double -> Double -> Source FxFun Source #

The reverb widget. The arguments are:

uiReverb mix depth

uiGain :: Bool -> Double -> Source FxFun Source #

The gain widget. The arguments are

uiGain isOn amountOfGain

uiWhite :: Bool -> Double -> Double -> Source FxFun Source #

The filtered white noize widget. The arguments are

uiWhite isOn centerFreqOfFilter amountOfNoize 

uiPink :: Bool -> Double -> Double -> Source FxFun Source #

The filtered pink noize widget. The arguments are

uiPink isOn centerFreqOfFilter amountOfNoize 

uiFx :: FxUI a => String -> a -> Bool -> Source FxFun Source #

The constructor for signal processing functions with no arguments (controlls).

uiRoom :: Bool -> Source FxFun Source #

The reverb for room.

uiHall :: Bool -> Source FxFun Source #

The reverb for hall.

uiCave :: Bool -> Source FxFun Source #

The reverb for magic cave.

uiSig :: String -> Bool -> Source Sig2 -> Source FxFun Source #

the widget for mixing in a signal to the signal.

uiMix :: Bool -> [(String, SE Sig2)] -> Source FxFun Source #

A mixer widget represented as an effect. The effect sums the signals with given wieghts.

uiMidi :: [(String, Msg -> SE Sig2)] -> Int -> Source FxFun Source #

Midi chooser implemented as FX-box.

Static widgets

data AdsrBound Source #

Constructors

AdsrBound 

data AdsrInit Source #

Constructors

AdsrInit 

classicWaves :: String -> Int -> Source (Sig -> Sig) Source #

A widget with four standard waveforms: pure tone, triangle, square and sawtooth. The last parameter is a default waveform (it's set at init time).

masterVolume :: Source Sig Source #

Slider for master volume

masterVolumeKnob :: Source Sig Source #

Knob for master volume

Orphan instances

SigSpace FxFun Source # 

Methods

mapSig :: (Sig -> Sig) -> FxFun -> FxFun Source #