Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Sons - fichiers audio > sound

sound

sound player facility

Syntax

sound(y [,fs,bits,command)

Arguments

y

real vector

fs

real number, sampling frequency in sample per second (default value is 22050)

bits

real number, number of bits (unused)

command

Only used on Unix systems it gives the name of the command to use for playing sound (wav) files. The default value is aplay. If set /dev/audio then a 8 bits mu-law raw sound file is created and send to /dev/audio

Description

sound(y,fs)plays the sound signal given by matrix y (with sample frequency fs). In fact this function is just a wrapper for playsnd. Values in y are assumed to be in the range -1.0 <= y <= 1.0. Values outside that range are truncated. The number of rows of y gives the number of channels. sound(y) plays the sound at the default sample rate of 22050 sample per second. sound(y,fs,nbits) plays the sound using nbits bits/sample if possible (it is in fact unused). Most platforms support bits=8 or 16.

Examples

// a two channel signal
y=loadwave("SCI/modules/sound/demos/chimes.wav");
sound(y)

See also

  • playsnd — command-line sound player facility
Report an issue
<< savewave Sons - fichiers audio soundsec >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:33:08 CET 2022