2 BeatTrack : MultiOutUGen {
4 *kr { arg chain, lock=0;
6 if(chain.isKindOf(FFT).not){
7 // Automatically drop in an FFT, possible now that we have LocalBuf
8 chain = FFT(LocalBuf(if(SampleRate.ir>48000, 2048, 1024)), chain);
11 ^this.multiNew('control',chain, lock);
14 init { arg ... theInputs;
16 ^this.initOutputs(4, rate);
20 //loudness output in sones
23 *kr { arg chain, smask=0.25, tmask=1;
25 ^this.multiNew('control',chain, smask, tmask);
31 *kr { |chain, threshold=0.5, odftype=\rcomplex, relaxtime=1,
32 floor=0.1, mingap=10, medianspan=11, whtype=1, rawodf=0|
33 if(odftype.class == Symbol){
34 odftype = #[\power, \magsum, \complex, \rcomplex, \phase, \wphase,\mkl]
37 // mingap of 10 frames, @ 44100 & 512 & 50%, is about 0.058 seconds
38 ^this.multiNew('control', chain, threshold, odftype, relaxtime,
39 floor, mingap, medianspan, whtype, rawodf)
44 //transient input not currently used but reserved for future use in downweighting frames which have high transient content
47 *kr { arg chain,keydecay=2.0,chromaleak= 0.5; //transient=0.0;
49 ^this.multiNew('control',chain,keydecay,chromaleak); //transient;
54 //a bufnum could be added as third argument for passing arbitrary band spacing data
56 *kr { arg chain, numcoeff=13;
57 ^this.multiNew('control', chain, numcoeff);
60 init { arg ... theInputs;
63 ^this.initOutputs(theInputs[1], rate);
70 BeatTrack2 : MultiOutUGen {
72 *kr { arg busindex, numfeatures, windowsize=2.0, phaseaccuracy=0.02, lock=0, weightingscheme;
74 ^this.multiNew('control',busindex, numfeatures,windowsize, phaseaccuracy, lock, weightingscheme ? (-2.1));
77 init { arg ... theInputs;
79 ^this.initOutputs(6, rate);
88 ^this.multiNew('control', buffer)
93 *kr { | buffer, fraction = 0.5, interpolate = 0 |
94 ^this.multiNew('control', buffer, fraction, interpolate)
100 ^this.multiNew('control', buffer)