Previous Up Next

28.2.7  Preparing digital sound data

The soundsec command prepares sound data in the form of a vector.

Examples

soundsec(2.5)

Output: Sound data 2.5 seconds long sampled at the default frequency of 44100 Hz.

soundsec(1,22050)

Output: Sound data 1 second long sampled at the frequency of 22050 Hz.

sin(2*pi*440*soundsec(1.3))

Output: A sinusoidal signal with frequency 440 Hz sampled 44100 times per second for 1.3 seconds.


Previous Up Next