generates a vector of samples for t
seconds at given sampling frequency
samples = soundsec(t) samples = soundsec(t, freq)
real scalar: duration to sample
real scalar: sampling frequency, in Hz. Default value is 22050.
Generates a vector coding time from 0 to t
seconds at sampled rate
freq
.
Samples are always generated to fit in [0,t[
(excluding upper bound).
Value 0 for either t
or freq
return an empty matrix.
// At first we create 0.5 seconds of sound parameters. t = soundsec(0.5); // Then we generate a pure A4 = 440Hz sine s = sin(2*%pi*440*t); analyze(s, 200, 600, 22050); | ![]() | ![]() |
Version | Description |
6.1.1 | soundsec is declared obsolete.
soundsec(t) is replaced with
0 : 1/22050 : t*(1-%eps) .
soundsec(t, freq) is replaced with
0 : 1/freq : t*(1-%eps) .
soundsec(…) will be removed in the next Scilab version. |