sound
sound — sound player facility
Calling sequence
sound(y)
sound(y,fs)
sound(y,fs,bits)
Parameters
y | : real vector |
fs | : real number, sampling frequency |
bits | : real number, number of bits (usually 8 or 16) |
Description
sound(y,fs) sends the signal in vector y (with sample frequency
fs) out to the speaker. Values in y are assumed to be in the
range -1.0 <= y <= 1.0. Values outside that range are ugnored.
Stereo sounds are played, on platforms that support it, when y is
an N-by-2 matrix.
sound(y) plays the sound at the default sample rate of 8192 Hz.
sound(y,fs,nbits) plays the sound using nbits bits/sample if
possible. Most platforms support bits=8 or 16.
See also
playsnd