Mercurial > octave-nkf
annotate doc/interpreter/audio.txi @ 19528:3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
author | Vytautas Jančauskas <unaudio@gmail.com> |
---|---|
date | Fri, 20 Sep 2013 00:34:30 +0300 |
parents | e36c9a2b2919 |
children | da6173d4e384 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1 @c Copyright (C) 1996-2012 Kurt Hornik |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
9 @c | |
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
14 @c | |
15 @c You should have received a copy of the GNU General Public License | |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
18 | |
5428 | 19 @c Written by Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> on 1996/05/14 |
3294 | 20 |
4167 | 21 @node Audio Processing |
19527
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
22 |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
23 @chapter Audio File Utilities |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
24 |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
25 @DOCSTRING(audioinfo) |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
26 @DOCSTRING(audioread) |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
27 @DOCSTRING(audiowrite) |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
28 |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
29 @chapter Audio Device Information |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
30 |
19528
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
31 @DOCSTRING(audiodevinfo) |
19527
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
32 |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
33 @chapter Audio Player |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
34 |
19528
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
35 The following methods are used to create and use audioplayer objects. These objects can be used to play back audio data stored in Octave matrices and arrays. The audioplayer object supports playback from various devices available to the system, blocking and non-blocking playback, convenient pausing and resuming and much more. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
36 |
19527
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
37 @DOCSTRING(@audioplayer/audioplayer) |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
38 |
19528
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
39 @section Playback |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
40 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
41 The following methods are used to control player playback. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
42 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
43 @DOCSTRING(@audioplayer/play) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
44 @DOCSTRING(@audioplayer/playblocking) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
45 @DOCSTRING(@audioplayer/pause) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
46 @DOCSTRING(@audioplayer/resume) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
47 @DOCSTRING(@audioplayer/stop) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
48 @DOCSTRING(@audioplayer/isplaying) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
49 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
50 @section Properties |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
51 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
52 The remaining couple of methods are used to get and set various properties of the audioplayer object. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
53 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
54 @DOCSTRING(@audioplayer/get) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
55 @DOCSTRING(@audioplayer/set) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
56 |
19527
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
57 @chapter Audio Recorder |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
58 |
19528
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
59 The following methods are used to create and use audiorecorder objects. These objects can be used to record audio data from various devices available to the system. You can use convenient methods to retrieve that data or audioplayer objects created from that data. Methods for blocking and non-blocking recording, pausing and resuming recording and much more is available. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
60 |
19527
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
61 @DOCSTRING(@audiorecorder/audiorecorder) |
e36c9a2b2919
doc: add docstrings for audio file utilities, audiodevinfo, audioplayer and audiorecorder
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19524
diff
changeset
|
62 |
19528
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
63 @section Recording |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
64 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
65 The following methods control the recording process. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
66 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
67 @DOCSTRING(@audiorecorder/record) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
68 @DOCSTRING(@audiorecorder/recordblocking) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
69 @DOCSTRING(@audiorecorder/pause) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
70 @DOCSTRING(@audiorecorder/resume) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
71 @DOCSTRING(@audiorecorder/stop) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
72 @DOCSTRING(@audiorecorder/isrecording) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
73 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
74 @section Data Retrieval |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
75 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
76 The following methods allow you to retrieve recorded audio data in various ways. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
77 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
78 @DOCSTRING(@audiorecorder/getaudiodata) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
79 @DOCSTRING(@audiorecorder/getplayer) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
80 @DOCSTRING(@audiorecorder/play) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
81 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
82 @section Properties |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
83 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
84 The remaining two methods allow you to read or alter the properties of audiorecorder objects. |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
85 |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
86 @DOCSTRING(@audiorecorder/get) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
87 @DOCSTRING(@audiorecorder/set) |
3954d835436b
doc: included all docstrings for the @audioplayer class in audio.txi as well as added additional explanations for the functionality
Vytautas Jančauskas <unaudio@gmail.com>
parents:
19527
diff
changeset
|
88 |
3294 | 89 @chapter Audio Processing |
90 | |
91 Octave provides a few functions for dealing with audio data. An audio | |
92 `sample' is a single output value from an A/D converter, i.e., a small | |
93 integer number (usually 8 or 16 bits), and audio data is just a series | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10791
diff
changeset
|
94 of such samples. It can be characterized by three parameters: the |
9072
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
7018
diff
changeset
|
95 sampling rate (measured in samples per second or Hz, e.g., 8000 or |
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
7018
diff
changeset
|
96 44100), the number of bits per sample (e.g., 8 or 16), and the number of |
3294 | 97 channels (1 for mono, 2 for stereo, etc.). |
98 | |
99 There are many different formats for representing such data. Currently, | |
100 only the two most popular, @emph{linear encoding} and @emph{mu-law | |
101 encoding}, are supported by Octave. There is an excellent FAQ on audio | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
9245
diff
changeset
|
102 formats by Guido van Rossum @email{guido@@cwi.nl} which can be found at any |
3294 | 103 FAQ ftp site, in particular in the directory |
104 @file{/pub/usenet/news.answers/audio-fmts} of the archive site | |
105 @code{rtfm.mit.edu}. | |
106 | |
107 Octave simply treats audio data as vectors of samples (non-mono data are | |
108 not supported yet). It is assumed that audio files using linear | |
109 encoding have one of the extensions @file{lin} or @file{raw}, and that | |
110 files holding data in mu-law encoding end in @file{au}, @file{mu}, or | |
111 @file{snd}. | |
112 | |
3332 | 113 @DOCSTRING(lin2mu) |
3294 | 114 |
3332 | 115 @DOCSTRING(mu2lin) |
3294 | 116 |
3332 | 117 @DOCSTRING(loadaudio) |
3294 | 118 |
3332 | 119 @DOCSTRING(saveaudio) |
3294 | 120 |
121 The following functions for audio I/O require special A/D hardware and | |
122 operating system support. It is assumed that audio data in linear | |
123 encoding can be played and recorded by reading from and writing to | |
124 @file{/dev/dsp}, and that similarly @file{/dev/audio} is used for mu-law | |
125 encoding. These file names are system-dependent. Improvements so that | |
126 these functions will work without modification on a wide variety of | |
127 hardware are welcome. | |
128 | |
3332 | 129 @DOCSTRING(playaudio) |
3294 | 130 |
3332 | 131 @DOCSTRING(record) |
3294 | 132 |
3332 | 133 @DOCSTRING(setaudio) |
134 | |
6549 | 135 @DOCSTRING(wavread) |
136 | |
137 @DOCSTRING(wavwrite) |