2 summary:: a NodeProxy that can record
3 categories:: Libraries>JITLib>NodeProxy
4 related:: Classes/NodeProxy
7 this is also created from a link::Classes/NodeProxy::, or an link::Classes/Ndef:: with the message strong::record::.
18 instantiate a new proxy that listens to the in proxy.
23 open new file and initialize buffer on server
26 start the recording synth.
29 if paused is false start recording immediately.
32 stop recording, close file
35 see if recording right now
38 until the proxy is not used by any output ( either .play or .ar/.kr ) it is not running on the server. you can wake it up to force it playing.
45 a = RecNodeProxy.audio(s, 2);
46 a.source = { SinOsc.ar([400,500], 0, 0.1) };
48 a.open("xproxySpace.aif");
51 a.source = { SinOsc.ar([400,700], 0, 0.1) };
52 a.source = { SinOsc.ar([410,510], 0, 0.1) };
53 a.source = { SinOsc.ar([LFNoise1.kr(80, 100, 300),500], 0, 0.1) };
55 //stop recording and close file
62 subsection::recording from some bus
67 SynthDef("test", { arg out; Out.ar(out, { WhiteNoise.ar(0.1) }.dup(2)) }).send(s);
68 x = Synth("test", [\out, a]);
71 n = RecNodeProxy.audio(s, 2);
72 n.source = { InFeedback.ar(a, 2) };
75 n.stop;//turn off monitor
84 subsection::instance creation from an existent node proxy
87 b = NodeProxy.audio(s, 2);
89 b.source = { SinOsc.ar([400,500], 0, 0.1) }; //play something
91 r = RecNodeProxy.newFrom(b);
92 r.open("recproxy514.aif"); //open file
93 r.record; //start recorder (paused)
95 r.unpause; //start recording
97 b.source = { SinOsc.ar([430,500], 0, 0.1) };
98 b.source = { SinOsc.ar([410,510], 0, 0.1) };
99 b.source = { SinOsc.ar([LFNoise1.kr(80, 100, 300), 500], 0, 0.1) };
101 b.source = { WhiteNoise.ar(0.01) };
106 //stop recording and close file
108 b.stop; //stop listen to b
111 subsection::instance creation from an existent node proxy again
114 b = NodeProxy.audio(s, 2);
115 b.play; //listen to b
116 b.source = { SinOsc.ar([400,500], 0, 0.1) }; //play something
118 r = b.record("recproxy101.aiff"); //start recorder (paused)
119 r.unpause; //start recording
120 r.close; //end recording, close file
121 b.stop; //stop listen
124 subsection::recording from other sources
129 a = RecNodeProxy.audio(s, 2);
130 b = a.index; //get the bus index;
132 a.open("xproxySpace.aif");
141 s.sendMsg("/s_new", "default", id,0,0, \out, b, \freq, rrand(400, 800));
143 s.sendMsg("/n_set", id, \gate, 0);
150 //stop recording and close file