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

Csound.Air.Live

Description

UIs for live performances

Synopsis

Mixer

mixer :: Sigs a => [(String, SE a)] -> Source a Source #

Widget that represents a mixer.

hmixer :: Sigs a => [(String, SE a)] -> Source a 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

fxBox :: forall a. Sigs a => String -> ([Sig] -> Fx a) -> Bool -> [(String, Double)] -> Source (Fx a) 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 :: 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. fxBox :: forall a. (FxUI a, Num (FxArg a), Tuple (FxArg a)) => String -> a -> Bool -> [(String, Double)] -> Source (Fx (FxArg a))

uiBox :: Sigs a => String -> Source (Fx a) -> Bool -> Source (Fx a) Source #

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

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

Colors the source widgets.

fxVer :: [Source (Fx a)] -> Source (Fx a) Source #

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

fxHor :: [Source (Fx a)] -> Source (Fx a) Source #

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

fxGrid :: Int -> [Source (Fx a)] -> Source (Fx a) Source #

Creates a matrix of fx-boxes.

fxGrid columnsSize fxs

first argument is a number of columns in each row.

fxSca :: Double -> Source (Fx a) -> Source (Fx a) Source #

Scales the gui for signal processing widgets.

fxMap :: Fx a -> Source (Fx a) -> Source (Fx a) Source #

Applies a function to a signal processing function.

fxApply :: Source (a -> SE b) -> a -> Source b Source #

Applies FX with UI to the input argument.

atFx :: Source (Fx a) -> Patch a -> Source (Patch a) Source #

Applies FX to the Patch.

fxHorMS :: [Source Fx1] -> Maybe (Source (Sig -> SE Sig2)) -> [Source Fx2] -> Source (Sig -> SE Sig2) Source #

fxHor for chain that starts with mono effects and proceeds with stereo effects. The second argument can contain The transition widget (mono to stereo effect) or it can be empty. If it's empty automatic conversion will be inserted.

fxVerMS :: [Source Fx1] -> Maybe (Source (Sig -> SE Sig2)) -> [Source Fx2] -> Source (Sig -> SE Sig2) Source #

fxVer for chain that starts with mono effects and proceeds with stereo effects. The second argument can contain The transition widget (mono to stereo effect) or it can be empty. If it's empty automatic conversion will be inserted.

fxGridMS :: Int -> [Source Fx1] -> Maybe (Source (Sig -> SE Sig2)) -> [Source Fx2] -> Source (Sig -> SE Sig2) Source #

Creates a matrix of fx-boxes. Stacks a list of mono and stereo FXs.

fxGrid columnsSize monoFxs maybeBridge stereoFxs

first argument is a number of columns in each row.

fromMonoFx :: Sigs a => (Sig -> Sig) -> Fx a Source #

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 :: Sigs a => Bool -> Double -> Double -> Double -> Source (Fx a) Source #

The distortion widget. The arguments are

uiDistort isOn levelOfDistortion drive tone

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

The chorus widget. The arguments are

uiChorus isOn mix rate depth width

uiFlanger :: Sigs a => Bool -> Double -> Double -> Double -> Double -> Source (Fx a) Source #

The flanger widget. The arguments are

uiFlanger isOn  rate depth delay feedback

uiPhaser :: Sigs a => Bool -> Double -> Double -> Double -> Double -> Source (Fx a) Source #

The phaser widget. The arguments are

uiPhaser isOn mix feedback rate depth frequency

uiDelay :: Sigs a => Bool -> Double -> Double -> Double -> Double -> Source (Fx a) Source #

The delay widget. The arguments are

uiDelay isOn mix feedback delayTime tone

uiEcho :: Sigs a => Bool -> D -> Double -> Double -> Source (Fx a) Source #

The simplified delay widget. The arguments are

uiEcho isOn maxDelayTime delayTime feedback

uiFilter :: Sigs a => Bool -> Double -> Double -> Double -> Source (Fx a) Source #

The pair of low and high pass filters

uiFilter isOn lowPassfrequency highPassFrequency gain

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

The reverb widget. The arguments are:

uiReverb mix depth

uiGain :: Sigs a => Double -> Source (Fx a) Source #

The gain widget, it's set to on by default. The arguments are

uiGain amountOfGain

uiCompress :: Sigs a => Double -> Double -> Double -> Double -> Double -> Double -> Double -> Source (Fx a) Source #

Compressor

uiCompress thresh loknee hiknee ratio att rel gain

uiWhite :: Sigs a => Bool -> Double -> Double -> Source (Fx a) Source #

The filtered white noize widget. The arguments are

uiWhite isOn centerFreqOfFilter amountOfNoize

uiPink :: Sigs a => Bool -> Double -> Double -> Source (Fx a) Source #

The filtered pink noize widget. The arguments are

uiPink isOn centerFreqOfFilter amountOfNoize

uiFx :: Sigs a => String -> Fx a -> Bool -> Source (Fx a) Source #

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

uiDry :: Sigs a => Source (Fx a) Source #

uiSig :: Sigs a => String -> Bool -> Source a -> Source (Fx a) Source #

the widget for mixing in a signal to the signal.

uiMix :: Sigs a => Bool -> [(String, SE a)] -> Source (Fx a) Source #

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

uiMidi :: Sigs a => [(String, Msg -> SE a)] -> Int -> Source (Fx a) 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

Live row

data LiveClip Source #

Clip and it's parameters

Constructors

LiveClip 

Fields

data ClipParam Source #

Constructors

ClipParam 

Fields

Instances

Instances details
Default ClipParam Source # 
Instance details

Defined in Csound.Air.Live

Methods

def :: ClipParam #

liveRow :: [LiveClip] -> D -> D -> Sig -> Sig Source #

Live row triggers audio clips in sync.

liveRow clips bpm barSize clipIndex
  • clips - contains file path to audio clips
  • bpm - the BPM of the track
  • barLength - length of the bar in quater notes. So 4 means 4/4
  • clipIndex - identity of the clip to launch on the next bar.

liveRows :: [LiveClip] -> D -> D -> Sig -> Sig2 Source #

Stereo version of liveRow

ambiRow :: [String] -> Sig -> Sig -> D -> SE Sig2 Source #

ambiRowMp3 :: [String] -> Sig -> Sig -> D -> SE Sig2 Source #