root/ocaml-remix/trunk/envelope.mli

Revision 514, 0.7 kB (checked in by shans, 1 year ago)

Modified sounds to only accept start (not length as well). Makes shift and
repeat easier, and makes more sense overall.

Line 
1 (** an envelope accepts a remix, a start time, and a current position,
2     and returns a scaling factor between 0.0 and 1.0 *)
3 type envelope = Remix.remix -> Time.time -> Time.raw_time -> float;;
4
5 (** an adsr envelope requires a total length, an attack time, a decay time,
6     a sustain level, and a release time *)
7 val adsr : Time.time -> Time.time -> Time.time -> float -> Time.time ->
8                                                                     envelope;;
9                                                                    
10 (** it is possible to apply envelopes directly to sounds.  Note that envelopes
11     can also be added to layers as notes. *)
12 val apply : envelope -> Sound.sound -> Sound.sound;;
Note: See TracBrowser for help on using the browser.