Msynth.Instrument
Instruments.
type ('sample, 'event) note = {
note : int;
Note: A4 is 69.
*)stream : 'sample Stream.stream;
event : 'event Stream.Event.t;
mutable released : bool;
alive : bool Stdlib.ref;
is the note still playing?
*)}
A note of an instrument.
val create_stereo :
event:[> `Note_off of int | `Note_on of int * float ] Stream.Event.t ->
?portamento:float Stream.t ->
(float * float, [> `Release ]) Note.t ->
(float * float) Stream.t
val create :
event:[> `Note_off of int | `Note_on of int * float ] Stream.Event.t ->
?portamento:float Stream.t ->
(float, [> `Release ]) Note.t ->
float Stream.t
val create_drum :
event:[> `Note_off of 'a | `Note_on of int * 'b ] Stream.Event.t ->
(on_die:(unit -> unit) -> float -> 'c -> float Stream.t) ->
float Stream.t
Create a drum instrument.
val play :
?portamento:float Stream.t ->
(float, [> `Release ]) Note.t ->
[> `Note_off of int | `Note_on of int * float ] list Stream.t ->
float Stream.t
Play a stream of lists events.
val play_drums :
?kick:(on_die:(unit -> unit) -> float -> float -> float Stream.t) ->
?snare:(on_die:(unit -> unit) -> float -> float -> float Stream.t) ->
?closed_hat:(on_die:(unit -> unit) -> float -> float -> float Stream.t) ->
[< `Closed_hat of float | `Kick of float | `Nop | `Snare of float ] list
Stream.t ->
float Stream.t
val kick : float -> float Stream.t
Generate a recurrent kick at given tempo.