T("rec")

ARLISTENER Recorder

Description

入力オブジェクトの値を記録します。以下の例では 1秒間のマウス操作を録音して繰り返し再生しています。

1
2
3
4
5
6
7
8
9
10
11
12
 
var freq  = T("mouse.y", {min:220, max:1760});
var synth = T("saw", {freq:freq, mul:0.25});
 
T("rec", {timeout:1000}, synth).on("ended", function(buffer) {
 
  T("buffer", {buffer:buffer, loop:true}).play();
 
  this.pause();
 
}).start().play();
 
T("mouse").start();

Properties

Methods

Events

Note

Source

https://github.com/mohayonao/timbre.js/blob/master/src/objects/rec.js