[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sound
From: |
Børge Strand |
Subject: |
Sound |
Date: |
Thu, 6 Jul 2000 20:02:51 +0200 (MET DST) |
Is there a sound function available for Octave? I'm planning to set my
computer up as an S/PDIF signal generator for some audio hardware
development.
Until now I've been converting vectors to .wav files which were burnt
on CDs and played manually. A little too expensive and time-consumig,
unfortunately.
Matlab says
>> help sound
SOUND Play vector as sound.
SOUND(Y,FS) sends the signal in vector Y (with sample frequency
FS) out to the speaker on platforms that support sound. Values in
Y are assumed to be in the range -1.0 <= y <= 1.0. Values outside
that range are clipped. 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,BITS) plays the sound using BITS bits/sample if
possible. Most platforms support BITS=8 or 16.
See also SOUNDSC.
>> help soundsc
SOUNDSC Autoscale and play vector as sound.
SOUNDSC(Y,...) is the same as SOUND(Y,...) except the data is
scaled so that the sound is played as loud as possible without
clipping.
SOUNDSC(Y,...,SLIM) where SLIM = [SLOW SHIGH] maps the values in Y
between SLOW and SHIGH to the full sound range. The default
value is SLIM = [MIN(Y) MAX(Y)].
See also SOUND.
>>
--
Børge
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------