Navigation

Operators and Keywords

Function List:

C++ API

: soundsc (y)
: soundsc (y, fs)
: soundsc (y, fs, nbits)
: soundsc (…, [ymin, ymax])

Scale the audio data y and play it at sample rate fs to the default audio device.

The audio signal y can be a vector or a two-column array, representing mono or stereo audio, respectively.

If fs is not given, a default sample rate of 8000 samples per second is used.

The optional argument nbits specifies the bit depth to play to the audio device and defaults to 8 bits.

By default, y is automatically normalized to the range [-1, 1]. If the range [ymin, ymax] is given, then elements of y that fall within the range yminyymax are scaled to the range [-1, 1] instead.

For more control over audio playback, use the audioplayer class.

See also: sound, record.

Package: octave