Module Soundtouch

module Soundtouch: sig .. end

Soundtouch is a library to change tempo or pitch of sound.


Initialization

type t 

A converter.

val make : int -> int -> t

Create a new soundtouch converte with given number of channels and samplerate.

val get_version_string : t -> string

Soundtouch library version.

val get_version_id : t -> int

Soundtouch library version identifier.

Sound parameters

val set_rate : t -> float -> unit

Set playing rate (default is 1., smaller means slower).

val set_tempo : t -> float -> unit

Set tempo (default 1., smaller means slower).

val set_pitch : t -> float -> unit

Set pitch (default 1., smaller means lower).

Sound manipulation

val put_samples_ni : t -> float array array -> int -> int -> unit

Put samples (in a non-interleaved format) with given offset in array and number of samples.

val get_available_samples : t -> int

Number of available output samples.

val get_samples_ni : t -> float array array -> int -> int -> int

Retreive samples (in a non-interleaved format).

val flush : t -> unit

Flush the last samples from the processing pipeline to the output.

val clear : t -> unit

Clear all samples in output and internal processing buffers.

module BPM: sig .. end

Tempo (beats-per-minute) detection.