<< setPreferencesValue 6-1-1 sysdiag >>
removed >> removed > 6-1-1 > soundsec

soundsec

generates a vector of samples for t seconds at given sampling frequency

Syntax

samples = soundsec(t)
samples = soundsec(t, freq)

Arguments

t

real scalar: duration to sample

freq

real scalar: sampling frequency, in Hz. Default value is 22050.

Description

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.

Examples

// 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);

See also

History

VersionDescription
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.

<< setPreferencesValue 6-1-1 sysdiag >>