File: Data-Retrieval.html

package info (click to toggle)
octave 10.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 145,388 kB
  • sloc: cpp: 335,976; ansic: 82,241; fortran: 20,963; objc: 9,402; sh: 8,756; yacc: 4,392; lex: 4,333; perl: 1,544; java: 1,366; awk: 1,259; makefile: 659; xml: 192
file content (105 lines) | stat: -rw-r--r-- 6,872 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Data Retrieval (GNU Octave (version 10.3.0))</title>

<meta name="description" content="Data Retrieval (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Data Retrieval (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Audio-Recorder.html" rel="up" title="Audio Recorder">
<link href="Recorder-Properties.html" rel="next" title="Recorder Properties">
<link href="Recording.html" rel="prev" title="Recording">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<div class="subsection-level-extent" id="Data-Retrieval">
<div class="nav-panel">
<p>
Next: <a href="Recorder-Properties.html" accesskey="n" rel="next">Properties</a>, Previous: <a href="Recording.html" accesskey="p" rel="prev">Recording</a>, Up: <a href="Audio-Recorder.html" accesskey="u" rel="up">Audio Recorder</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Data-Retrieval-1"><span>33.4.2 Data Retrieval<a class="copiable-link" href="#Data-Retrieval-1"> &para;</a></span></h4>

<p>The following methods allow you to retrieve recorded audio data in
various ways.
</p>
<a class="anchor" id="XREF_0040audiorecorder_002fgetaudiodata"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-getaudiodata"><span><code class="def-type"><var class="var">data</var> =</code> <strong class="def-name">getaudiodata</strong> <code class="def-code-arguments">(<var class="var">recorder</var>)</code><a class="copiable-link" href="#index-getaudiodata"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-getaudiodata-1"><span><code class="def-type"><var class="var">data</var> =</code> <strong class="def-name">getaudiodata</strong> <code class="def-code-arguments">(<var class="var">recorder</var>, <var class="var">datatype</var>)</code><a class="copiable-link" href="#index-getaudiodata-1"> &para;</a></span></dt>
<dd><p>Return audio data from audiorecorder object <var class="var">recorder</var> as a double
matrix with values between -1.0 and 1.0 and with as many columns as there
are channels in <var class="var">recorder</var>.
</p>
<p>Given the optional argument <var class="var">datatype</var>, convert the recorded data
to the specified type, which may be one of <code class="code">&quot;double&quot;</code>,
<code class="code">&quot;single&quot;</code>, <code class="code">&quot;int16&quot;</code>, <code class="code">&quot;int8&quot;</code> or <code class="code">&quot;uint8&quot;</code>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="Audio-Recorder.html#XREF_0040audiorecorder_002faudiorecorder">@audiorecorder/audiorecorder</a>.
</p></dd></dl>


<a class="anchor" id="XREF_0040audiorecorder_002fgetplayer"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-getplayer"><span><code class="def-type"><var class="var">player</var> =</code> <strong class="def-name">getplayer</strong> <code class="def-code-arguments">(<var class="var">recorder</var>)</code><a class="copiable-link" href="#index-getplayer"> &para;</a></span></dt>
<dd><p>Return an audioplayer object with data recorded by the audiorecorder object
<var class="var">recorder</var>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="Audio-Player.html#XREF_0040audioplayer_002faudioplayer">@audioplayer/audioplayer</a>, <a class="ref" href="Audio-Recorder.html#XREF_0040audiorecorder_002faudiorecorder">@audiorecorder/audiorecorder</a>.
</p></dd></dl>


<a class="anchor" id="XREF_0040audiorecorder_002fplay"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-play-3"><span><code class="def-type"><var class="var">player</var> =</code> <strong class="def-name">play</strong> <code class="def-code-arguments">(<var class="var">recorder</var>)</code><a class="copiable-link" href="#index-play-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-play-4"><span><code class="def-type"><var class="var">player</var> =</code> <strong class="def-name">play</strong> <code class="def-code-arguments">(<var class="var">recorder</var>, <var class="var">start</var>)</code><a class="copiable-link" href="#index-play-4"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-play-5"><span><code class="def-type"><var class="var">player</var> =</code> <strong class="def-name">play</strong> <code class="def-code-arguments">(<var class="var">recorder</var>, [<var class="var">start</var>, <var class="var">end</var>])</code><a class="copiable-link" href="#index-play-5"> &para;</a></span></dt>
<dd><p>Play the audio recorded in <var class="var">recorder</var> without blocking and return a
corresponding audioplayer object.
</p>
<p>If the optional argument <var class="var">start</var> is provided, begin playing
<var class="var">start</var> seconds into the recording.
</p>
<p>If the optional argument <var class="var">end</var> is provided, stop playing at
<var class="var">end</var> seconds into the recording.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREF_0040audiorecorder_002fgetplayer">@audiorecorder/getplayer</a>, <a class="ref" href="Audio-Player.html#XREF_0040audioplayer_002faudioplayer">@audioplayer/audioplayer</a>, <a class="ref" href="Audio-Recorder.html#XREF_0040audiorecorder_002faudiorecorder">@audiorecorder/audiorecorder</a>.
</p></dd></dl>


</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Recorder-Properties.html">Properties</a>, Previous: <a href="Recording.html">Recording</a>, Up: <a href="Audio-Recorder.html">Audio Recorder</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>