33.4.2 Data Retrieval

Last-modified: 2025-03-08 (土) 19:56:31

33.4.2 データの取得

以下のメソッドを使用すると、さまざまな方法で録音されたオーディオ データを取得できます。

: data = getaudiodata (recorder)
: data = getaudiodata (recorder, datatype)
audiorecorder オブジェクトrecorderからオーディオ データを、 -1.0 から 1.0 までの値とrecorder内のチャンネルと同じ数の列を持つ double 行列として返します。

オプションの引数datatype を指定すると、記録されたデータを指定された型"double"( 、 "single"、"int16"、のいずれ"int8"か"uint8") に変換します。

See also: @audiorecorder/audiorecorder.

: player = getplayer (recorder)
audiorecorder オブジェクトrecorderによって記録されたデータを含む audioplayer オブジェクトを返します 。

See also: @audioplayer/audioplayer, @audiorecorder/audiorecorder.

: player = play (recorder)
: player = play (recorder, start)
: player = play (recorder, [start, end])
レコーダーに録音されたオーディオをブロックせずに再生し、対応するオーディオプレーヤー オブジェクトを返します。

オプションの引数startが指定されている場合は、 録音の start秒目から再生を開始します。

オプションの引数endが指定されている場合は、 録音の end秒後に再生を停止します。

See also: @audiorecorder/getplayer, @audioplayer/audioplayer, @audiorecorder/audiorecorder.