package soundtouch

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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_ba : t -> (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t -> unit

Put samples. Data is interleaved with given number of channels.

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_ba : t -> (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t -> int

Retreive 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.

OCaml

Innovation. Community. Security.