How to get Amplitude from PanAz?

Hello everyone,
the title is self explanatory.
I’m find difficulties in analyze a channel from PanAz.
If I use Pan2 is very simple… but I can’t understand how I can read the data from the channel that .poll me an Ugen.

// Post the number of output channels

s.options.numOutputBusChannels_(8);
s.options.numOutputBusChannels.postln;

Server.killAll;
s.boot;
s.plotTree;
s.scope;
s.meter;


(
~bus1 = Bus.control(s,1);
)

(
SynthDef(\LFSawPanAzimuth, {|freq =40, ampFreq=0.1, rminAmp=0.01, rmaxAmp=0.03, spread= 3.0, posFreq =0.1, r_min = -1.0 ,r_max =1.0,an_Scale =1.0|
                  var  osc, panning, rms0,rms1,rms2,rms3,rms4,rms5;

                      osc   = SinOsc.ar(freq);

	panning = PanAz.ar(
		numChans: 6,
        in: osc,
		pos: LFSaw.kr(posFreq).range(r_min,r_max),
		level: LFNoise2.kr(ampFreq).range(rminAmp,rmaxAmp),
        width: spread,
		orientation: 0

	);
	/*
	panning[0].poll;
	
	UGen(OutputProxy): 0
UGen(OutputProxy): 0.000111437
UGen(OutputProxy): 0.00011003
UGen(OutputProxy): 0.000108204
UGen(OutputProxy): 0.000105972
UGen(OutputProxy): 0.000103347
UGen(OutputProxy): 0.000100329
UGen(OutputProxy): 9.69636e-005
UGen(OutputProxy): 9.32565e-005
UGen(OutputProxy): 8.92279e-005
UGen(OutputProxy): 8.48984e-005
UGen(OutputProxy): 8.02913e-005
UGen(OutputProxy): 7.54246e-005
UGen(OutputProxy): 7.03262e-005
UGen(OutputProxy): 6.50187e-005
UGen(OutputProxy): 5.95264e-005
UGen(OutputProxy): 5.38746e-005
UGen(OutputProxy): 4.80884e-005
	*/

	
// analysis channel
	rms0 = Amplitude.kr(panning[0]).ampdb.linlin(-30.0, 0.0, 0.0, 1.0);
	
	/*
	
	rms0.poll; 
	
	UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0
UGen(BinaryOpUGen): 0

*/
	Out.kr(~bus1,rms0*an_Scale);
	
                  Out.ar(0, panning);
                  }).add;

{~lFSawPanAzimuth = Synth(\LFSawPanAzimuth)}.defer(0.1);
)

I hope someone can tell me how to do it.
thank you very much.

No time to try this myself, but the amplitude looks awfully low in the panned output. Amplitude has an attack threshold; your signal might not pass it.

1 Like

Thank you, you were right, I didn’t cross the threshold… :sweat: