TITLE:: PVInfo
summary:: Return mag and freq data from a CSound pv
categories:: Libraries>JoshUGens, UGens>FFT
related:: Classes/PVSynth, Classes/PVFile

DESCRIPTION::
code::
#mag, freq = PVInfo.ar(pvbuffer, binNum, filePointer, mul, add )
#mag, freq = PVInfo.kr(pvbuffer, binNum, filePointer, mul, add )
::

CLASSMETHODS::

METHOD:: categories

METHOD:: ar

ARGUMENT:: pvbuffer
Default value is nil.

ARGUMENT:: binNum
Default value is 0.

ARGUMENT:: filePointer
Default value is 0.

ARGUMENT:: mul

ARGUMENT:: add


METHOD:: kr

ARGUMENT:: pvbuffer

ARGUMENT:: binNum

ARGUMENT:: filePointer

ARGUMENT:: mul

ARGUMENT:: add


INSTANCEMETHODS::

METHOD:: init


EXAMPLES::

code::
s.boot;

// load a file and save it to a buffer
a = PVFile.new("Platform.resourceDir +/+ sounds/cl-c4.pv", s).loadToBuffer;

// what this example does
(
x = SynthDef(\helpPVSynth, {arg scale = 1;
	var src, filts, mag, freq, point;
	src = WhiteNoise.ar;
	point = MouseX.kr(0, 1);
	filts = Mix.fill(100, {arg i;
		#mag, freq = PVInfo.ar(a.buffer, i + 5, point);
		BPF.ar(src, freq, 0.001, mag);
		});
	Out.ar(0, Pan2.ar(filts * a.magScale * scale), 0.0);
}).play(s, [\scale, 2]);
)

x.free;
::
