linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / Tap.schelp
blobaf6277c502bfd1883ebe3246888643445a8f6a42
1 class:: Tap
2 summary:: Single tap into a delayline
3 related:: Classes/MultiTap, Classes/PlayBuf
4 categories::  UGens>Buffer, UGens>Delays>Buffer
6 Description::
8 The Tap UGen allows a single tap at a delay into a buffer.
10 Tap uses the link::Classes/PlayBuf:: UGen internally
12 classmethods::
13 private:: categories
15 method::ar
17 argument::bufnum
18 The index of the buffer to use
20 argument::numChannels
21 Number of channels of the buffer
23 argument::delaytime
24 Tap delay; cannot be modulated
26 examples::
27 code::
28 // Create a buffer.
29 b=Buffer.alloc(s, s.sampleRate, 1); //enough space for one second of mono audio
31 // Write to the Buffer with BufWr, read using two Taps, one for each ear!
33 SynthDef(\helpTap, {|bufnum|
34         var source, capture;
36         source= SoundIn.ar(0); //use headphones to avoid feedback
37         capture= BufWr.ar(source, bufnum, Phasor.ar(0,1, 0, BufFrames.ir(bufnum),1));
39         Out.ar(0, Tap.ar(bufnum, 1, [0.1,0.9])); //multichannel expansion, so one tap each ear
40 }).send(s);
43 x=Synth(\helpTap,[\bufnum, b]);
45 x.free;