Record - Maple Help

AudioTools

 Record
 record audio data from a microphone to an audio data object

 Calling Sequence Record(duration, component, opts)

Parameters

 duration - duration of time to record component - (optional) string; name of the Microphone component to use. opts - options, described below

Options

 • rate =
 The sample rate with which to record. When set to auto, the sample rate associated with the Microphone component is used. If no units are specified, values are presumed to be in hertz (Hz).

Description

 • The Record command records audio data of a specified duration from a Microphone component and returns an Audio object containing the recorded data.
 • If the component parameter is not specified, the default component name Microphone0 will be used.

Examples

In order to record, open the Components Palette and insert a microphone component.

 > $\mathrm{with}\left(\mathrm{AudioTools}\right):$

Record from the microphone for 1.5 seconds.

 > $\mathrm{audio1}≔\mathrm{Record}\left(1.5,"Microphone0"\right)$

Record from the microphone for 2500 milliseconds (2.5 s) at CD quality (44.1 kHz).

 > $\mathrm{audio2}≔\mathrm{Record}\left(2500\mathrm{Unit}\left(\mathrm{ms}\right),"Microphone0",\mathrm{rate}=44.1\mathrm{Unit}\left(\mathrm{kHz}\right)\right)$

Compatibility

 • The AudioTools[Record] command was introduced in Maple 2015.
 • For more information on Maple 2015 changes, see Updates in Maple 2015.