csound-expression-typed-0.2.7.1: typed core for the library csound-expression
Safe HaskellSafe-Inferred
LanguageHaskell2010

Csound.Typed.Control.Mix

Synopsis

Documentation

data Mix a Source #

Special type that represents a scores of sound signals. If an instrument is triggered with the scores the result is wrapped in the value of this type.

Instances

Instances details
At Sig Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig Sig2 (Sco (Mix Sig)) Source #

Methods

at :: (Sig -> Sig2) -> Sco (Mix Sig) -> AtOut Sig Sig2 (Sco (Mix Sig)) Source #

At Sig2 Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig2 Sig2 (Sco (Mix Sig)) Source #

Methods

at :: (Sig2 -> Sig2) -> Sco (Mix Sig) -> AtOut Sig2 Sig2 (Sco (Mix Sig)) Source #

At Sig2 Sig2 (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig2 Sig2 (Sco (Mix Sig2)) Source #

Methods

at :: (Sig2 -> Sig2) -> Sco (Mix Sig2) -> AtOut Sig2 Sig2 (Sco (Mix Sig2)) Source #

MixAt Sig Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> Sig2) -> Sco (Mix Sig) -> AtOut Sig Sig2 (Sco (Mix Sig)) Source #

MixAt Sig2 Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig2 -> Sig2) -> Sco (Mix Sig) -> AtOut Sig2 Sig2 (Sco (Mix Sig)) Source #

MixAt Sig2 Sig2 (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig2 -> Sig2) -> Sco (Mix Sig2) -> AtOut Sig2 Sig2 (Sco (Mix Sig2)) Source #

At Sig (SE Sig) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig (SE Sig) (Sco (Mix Sig)) Source #

Methods

at :: (Sig -> SE Sig) -> Sco (Mix Sig) -> AtOut Sig (SE Sig) (Sco (Mix Sig)) Source #

At Sig (SE Sig) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig (SE Sig) (Sco (Mix Sig2)) Source #

Methods

at :: (Sig -> SE Sig) -> Sco (Mix Sig2) -> AtOut Sig (SE Sig) (Sco (Mix Sig2)) Source #

At Sig (SE Sig) (Sco (Mix Sig3)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig (SE Sig) (Sco (Mix Sig3)) Source #

Methods

at :: (Sig -> SE Sig) -> Sco (Mix Sig3) -> AtOut Sig (SE Sig) (Sco (Mix Sig3)) Source #

At Sig (SE Sig) (Sco (Mix Sig4)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig (SE Sig) (Sco (Mix Sig4)) Source #

Methods

at :: (Sig -> SE Sig) -> Sco (Mix Sig4) -> AtOut Sig (SE Sig) (Sco (Mix Sig4)) Source #

At Sig (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig (SE Sig2) (Sco (Mix Sig)) Source #

Methods

at :: (Sig -> SE Sig2) -> Sco (Mix Sig) -> AtOut Sig (SE Sig2) (Sco (Mix Sig)) Source #

At Sig2 (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig2 (SE Sig2) (Sco (Mix Sig)) Source #

Methods

at :: (Sig2 -> SE Sig2) -> Sco (Mix Sig) -> AtOut Sig2 (SE Sig2) (Sco (Mix Sig)) Source #

At Sig2 (SE Sig2) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Associated Types

type AtOut Sig2 (SE Sig2) (Sco (Mix Sig2)) Source #

Methods

at :: (Sig2 -> SE Sig2) -> Sco (Mix Sig2) -> AtOut Sig2 (SE Sig2) (Sco (Mix Sig2)) Source #

MixAt Sig (SE Sig) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> SE Sig) -> Sco (Mix Sig) -> AtOut Sig (SE Sig) (Sco (Mix Sig)) Source #

MixAt Sig (SE Sig) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> SE Sig) -> Sco (Mix Sig2) -> AtOut Sig (SE Sig) (Sco (Mix Sig2)) Source #

MixAt Sig (SE Sig) (Sco (Mix Sig3)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> SE Sig) -> Sco (Mix Sig3) -> AtOut Sig (SE Sig) (Sco (Mix Sig3)) Source #

MixAt Sig (SE Sig) (Sco (Mix Sig4)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> SE Sig) -> Sco (Mix Sig4) -> AtOut Sig (SE Sig) (Sco (Mix Sig4)) Source #

MixAt Sig (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig -> SE Sig2) -> Sco (Mix Sig) -> AtOut Sig (SE Sig2) (Sco (Mix Sig)) Source #

MixAt Sig2 (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig2 -> SE Sig2) -> Sco (Mix Sig) -> AtOut Sig2 (SE Sig2) (Sco (Mix Sig)) Source #

MixAt Sig2 (SE Sig2) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mixAt :: Sig -> (Sig2 -> SE Sig2) -> Sco (Mix Sig2) -> AtOut Sig2 (SE Sig2) (Sco (Mix Sig2)) Source #

(Sigs a, SigSpace a) => SigSpace (Sco (Mix a)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mapSig :: (Sig -> Sig) -> Sco (Mix a) -> Sco (Mix a) Source #

(Sigs a, SigSpace2 a) => SigSpace2 (Sco (Mix a)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

Methods

mapSig2 :: (Sig2 -> Sig2) -> Sco (Mix a) -> Sco (Mix a) Source #

type AtOut Sig Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig Sig2 (Sco (Mix Sig)) = Sco (Mix Sig2)
type AtOut Sig2 Sig2 (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig2 Sig2 (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig) (Sco (Mix Sig)) = Sco (Mix Sig)
type AtOut Sig (SE Sig) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig) (Sco (Mix Sig2)) = Sco (Mix Sig2)
type AtOut Sig (SE Sig) (Sco (Mix Sig3)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig) (Sco (Mix Sig3)) = Sco (Mix Sig3)
type AtOut Sig (SE Sig) (Sco (Mix Sig4)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig) (Sco (Mix Sig4)) = Sco (Mix Sig4)
type AtOut Sig (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig (SE Sig2) (Sco (Mix Sig)) = Sco (Mix Sig2)
type AtOut Sig2 (SE Sig2) (Sco (Mix Sig)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig2 (SE Sig2) (Sco (Mix Sig)) = Sco (Mix Sig2)
type AtOut Sig2 (SE Sig2) (Sco (Mix Sig2)) Source # 
Instance details

Defined in Csound.Typed.Control.Mix

type AtOut Sig2 (SE Sig2) (Sco (Mix Sig2)) = Sco (Mix Sig2)

sco :: (Arg a, Sigs b) => (a -> SE b) -> Sco a -> Sco (Mix b) Source #

Plays a bunch of notes with the given instrument.

res = sco instrument scores

eff :: (Sigs a, Sigs b) => (a -> SE b) -> Sco (Mix a) -> Sco (Mix b) Source #

Applies an effect to the sound. Effect is applied to the sound on the give track.

res = eff effect sco
  • effect - a function that takes a tuple of signals and produces a tuple of signals.
  • sco - something that is constructed with sco or eff.

With the function eff you can apply a reverb or adjust the level of the signal. It functions like a mixing board but unlike mixing board it produces the value that you can arrange with functions from your favorite Score-generation library. You can delay it or mix with some other track and apply some another effect on top of it!

mix :: Sigs a => Sco (Mix a) -> a Source #

Renders a scores to the sound signals. we can use it inside the other instruments.

mixBy :: (Arg a, Sigs b) => (a -> Sco (Mix b)) -> a -> b Source #

Imitates a closure for a bunch of notes to be played within another instrument.

monoSco :: forall a. Sigs a => (MonoArg -> SE a) -> Sco (D, D) -> Sco (Mix a) Source #

Plays a bunch of notes with the given monophonic instrument. See details on type MonoArg. The scores contain the pairs of amplitude (0 to 1) and frequency (in Hz).

res = monoSco instrument scores

sco_ :: Arg a => (a -> SE ()) -> Sco a -> Sco (Mix Unit) Source #

Invokes a procedure for the given bunch of events.

mix_ :: Sco (Mix Unit) -> SE () Source #

Converts a bunch of procedures scheduled with scores to a single procedure.

mixBy_ :: Arg a => (a -> Sco (Mix Unit)) -> a -> SE () Source #

Imitates a closure for a bunch of procedures to be played within another instrument.

type Sco a = Track Sig a Source #

type CsdEvent = (Double, Double, Note) #

The Csound note. It's a triple of

(startTime, duration, parameters)