Module Stream.Stereo

Operations on stereo streams.

type 'a t = ('a * 'a) stream

A stereo stream.

val of_mono : 'a -> 'a0 t

Create from mono stream.

val blank : float t

Blank stereo stream.

val merge : 'a t -> 'b t -> ('c * 'd) t

Construct a stereo stream from two mono streams.

val noise : unit -> (float * float) t
val add : (float * float) t -> (float * float) t -> (float * float) t

Add two stereo streams.

val delay : ?ping_pong:float -> unit -> ?dry:float -> ?wet:float -> ?feedback:float -> float -> (float * sample) -> (float * float) t

Delay.

val mix : (float * float) t list -> (float * float) t

Mix streams.

val amp : float -> (float * float) -> (float * float) t

Amplify.

val cmul : float -> (float * float) t -> (float * float) t

Multiply by a constant.

val bmul : bool t -> (float * float) t -> (float * float) t

Multiply by a boolean.

val map : ('a -> 'b t) -> ('c -> 'd t) -> ('e * 'f) -> ('g * 'h) t

Map functions.

val to_mono : (float * float) -> float t

Convert to mono.

val left : ('a * 'b) -> 'c t

Left channel.

val right : ('a * 'b) -> 'c t

Right channel.

val dephase : unit -> float -> (sample * sample) -> (sample * sample) t

Dephase channels by given delay.

val pan : ?law:[< `Circular | `Linear | `Mixed Circular ] -> float -> sample -> sample t

Pan the sound according to a number between -1 (full left) and 1 (full right). Various pan laws can be used.

val schroeder : ?size:[< `Large | `Small Small ] -> unit -> sample -> (float * float) t
val schroeder_random : unit -> sample -> (float * float) t
val schroeder2 : unit -> sample -> (sample * float) t
val agc : unit -> (float * float) -> (float * float) t

Automatic gain control.

module Envelope : sig ... end
module Slicer : sig ... end

Effects

val freeverb : unit -> ?roomsize:float -> ?damp:float -> ?width:float -> ?wet:float -> ?dry:float -> (float * float) -> (float * float) t

The freeverb reverberation.

val converb : ?duration:float -> unit -> (float * float) -> (float * float) t

Testing reverb with convolution with noise.