Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - English

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

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

Scilab Help >> Sound file handling > auwrite

auwrite

writes .au sound file

Syntax

auwrite(y,aufile)
auwrite(y,Fs,aufile)
auwrite(y,Fs,bits,aufile)
auwrite(y,Fs,bits,method,aufile)

Arguments

y

real vector or matrix with entries in [-1,1].

aufile

string (The .au extension is appended if no extension is given)

Fs

integer, frequency sampling in Hz.

bits

integer, number of bits in the encoding.

method

string , 'mu' (default) or 'linear', encoding method.

Description

Utility function to save .au sound file. auwrite(y,aufile) writes a sound file specified by the string aufile. The data should be arranged with one channel per column. Amplitude values outside the range [-1,+1] are ignored. Supports multi-channel data for 8-bit mu-law, and 8, 16, 32, 64 bits linear formats.

auwrite(y,Fs,aufile) specifies in Fs the sample rate of the data in Hertz.

auwrite(y,Fs,bits,aufile) selects the number of bits in the encoder. Allowable settings are bits in [8,16,32,64]. auwrite(y,Fs,bits,method,aufile) allows selection of the encoding method, which can be either 'mu' or 'linear'. Note that bits must be 8 for 'mu' choice. The default method is 8-bits mu-law encoding.

Examples

A=matrix(1:6,2,3);
auwrite(A/6,22050,64,'linear',TMPDIR+'/foo.au');
B=auread(TMPDIR+'/foo.au');
max(abs(A- round(B*6)))

See also

  • auread — load .au sound file
  • wavread — load .wav sound file
  • savewave — save data into a sound wav file.
  • analyze — frequency plot of a sound signal
  • mapsound — Plots a sound map
Report an issue
<< auread Sound file handling beep >>

Copyright (c) 2022-2024 (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:
Tue Feb 14 15:02:52 CET 2017