Audio Type - Maple Help

type/ AudioTools:-Audio

check for an audio data structure

 Calling Sequence type( x, AudioTools:-Audio )

Parameters

 x - anything; expression to test.

Description

 • The type(x, AudioTools:-Audio) function call returns true if x is of type AudioTools:-Audio.
 • Within the AudioTools package, audio data is represented as dense rectangular Arrays of 64-bit hardware floating-point numbers. Monophonic audio data is one-dimensional, whereas stereo (or more channel) audio data is two-dimensional (the second dimension representing the individual channels).
 • Audio data also has three attributes describing the data:
 – The first is the sample rate, in samples per second.
 – The second is the number of bits per sample that were recorded in the file.
 – The third is the sub-format of the file, if applicable (or zero otherwise - some file formats, like .WAV, have a number of sub-formats, like PCM, ADPCM, or IEEE_FLOAT, represented as an integer from 1 to 3).

Examples

 > $\mathrm{with}\left(\mathrm{AudioTools}\right):$
 > $\mathrm{audiofile}≔\mathrm{Read}\left(\mathrm{cat}\left(\mathrm{kernelopts}\left(\mathrm{datadir}\right),"/audio/stereo.wav"\right)\right):$
 > $\mathrm{type}\left(\mathrm{audiofile},\mathrm{AudioTools}:-\mathrm{Audio}\right)$
 ${\mathrm{true}}$ (1)

Compatibility

 • The type/ AudioTools:-Audio command was updated in Maple 2017.