ShadowHarlequin
25th January 2009, 11:05
has anyone managed to code a line to actually detect goa bass beats yet?
if so can you post it here please, ive only ever really used treb since that seems to pick out frequencies that stand out best
if not then if someones willing to change the frequency detection code in the source version im pretty sure using a hex editor you could pick out the changes in code and add it into the latest dll (keeping a few copies open to compare the differences and help pic down the frequency detection part)
Flexi
29th January 2009, 20:49
:igor:
spent over 2 hours on it ...to then finally switch back to geiss' original code.
but i added some new features:
+ bpm limitation: no more nasty double detections
+ distinguishing between bass/mid/treb beats
+ optional synchronizing of bpm limitation
now let me see my what i have built this for :cool:
ShadowHarlequin
25th February 2009, 15:29
thanks!
ive been playing around with it (sorry for the late reply) can it not find the bass beat and treb beat at the same time? (only shows one circle per beat, i assume bass mid and treb)
Flexi
25th February 2009, 16:19
// Geiss' custom beat detection code: (fps-independent; quiet songs don't freak out)
decay_rate = pow(0.993, fps); // lower # = more hasty to declare a beat
min_att = 2.5; // lower # = quieter songs can declare beats
decay_to = 1.0; // lower # = more hasty to declare a beat
beat = bass/max(min_att,bass_att);
beat = max(beat, mid /max(min_att,mid_att ));
beat = max(beat, treb/max(min_att,treb_att));
beat = max( beat, (prev_beat-decay_to)*decay_rate + decay_to );
beat_level = (beat - prev_beat - 0.0)*24;
is_beat = above(beat_level, 0.5);
prev_beat = beat;
// Flexis separation and limitation code
max_bpm = 180;
sync = 1; // 1 - enable; 0 - disable
mx = max(bass_att,max(treb_att,mid_att));
mn = min(bass_att,min(treb_att,mid_att));
isbass = equal((bass_att-mn)/(mx-mn),1);
ismid = equal((mid_att-mn)/(mx-mn),1);
istreb = equal((treb_att-mn)/(mx-mn),1);
res = max(0, min(1,max(res,is_beat*below(res,0))));
bassres = max(0, min(if(sync,res,1),max(bassres,isbass*is_beat*below(bassres,0))));
midres = max(0, min(if(sync,res,1),max(midres,ismid*is_beat*below(midres,0))));
trebres = max(0, min(if(sync,res,1),max(trebres,istreb*is_beat*below(trebres,0))));
q8 = equal(bassres,1)*isbass; // is bass beat
q7 = equal(midres,1)*ismid; // is mid beat
q6 = equal(trebres,1)*istreb; // is treb beat
q3 = equal(res,1);
res = res - max_bpm/(60*fps);
bassres = bassres - max_bpm/(60*fps);
midres = midres - max_bpm/(60*fps);
trebres = trebres - max_bpm/(60*fps);
;)
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.