[sc-users] Amplitude.kr settings for pitch/beat tracking

Fabrice Mogini fabrice.mogini at virgin.net
Wed Dec 13 21:48:44 PST 2006


Hi,

I was wondering if anyone who has worked on beat/pitch tracking can  
give me tips on how to set attack and decay with the Amplitude UGen?
I  keep on getting many values for the same long note in the AudioIn  
( I only wanted to track the attack of each sound).
Is it a good idea to use a Compander to get the attack and ignore the  
sustain portion of the sound and then detect the next event?
Cheers
Fabrice Mogini

(
SynthDef(\amptrack, {arg in=1, buffer, offset=0, run=0, loop=0,  
trigger=0, reclevel1=1, reclevel2=0, att=0.2, dec=0.2, tres=0.1;
		var z, ampli;
		z = Mix(AudioIn.ar([1,2]));
		
		ampli = Amplitude.kr(z, att, dec);
		//Compander.ar(z, z, MouseX.kr(0.1, 1), 1, 0.5, 0.01, 0.01);

		SendTrig.kr(z > tres, 0,  z);
		
}).load(s);

OSCresponder(s.addr,'/tr',{ arg time, responder, msg; msg.postln }).add;
)

~testamptrack = Synth.new(\amptrack);	~testamptrack.play;

~testamptrack.set([\att, 0.2, \dec, 0.2, \tres, 0.1]);		//bad
~testamptrack.set([\att, 0.05, \dec, 0.05, \tres, 0.03]);	//much better
~testamptrack.stop;
//////////////////////////////////////////////

Fabrice Mogini
Phone: +447834279698
Email: fabrice.mogini at virgin.net


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.create.ucsb.edu/pipermail/sc-users/attachments/20061213/51cb689e/attachment.htm


More information about the sc-users mailing list