cmProc4.h/c : Added comments.
This commit is contained in:
parent
3a236648d3
commit
c44a890088
13
cmProc4.c
13
cmProc4.c
@ -27,6 +27,7 @@
|
||||
#include "cmScore.h"
|
||||
#include "cmProc4.h"
|
||||
|
||||
|
||||
//=======================================================================================================================
|
||||
//----------------------------------------------------------------------------------------
|
||||
void ed_print_mtx( ed_r* r)
|
||||
@ -1412,6 +1413,7 @@ unsigned cmScMatcherScan( cmScMatcher* p, unsigned bli, unsigned hopCnt )
|
||||
if( i_opt == cmInvalidIdx )
|
||||
return cmInvalidIdx;
|
||||
|
||||
|
||||
// set the locIdx field in midiBuf[], trailing miss count and
|
||||
// return the latest positive-match locIdx
|
||||
p->eli = cmScMatchDoSync(p->mp,i_opt,p->midiBuf,p->mp->mmn,&p->missCnt);
|
||||
@ -1430,7 +1432,6 @@ unsigned cmScMatcherScan( cmScMatcher* p, unsigned bli, unsigned hopCnt )
|
||||
}
|
||||
|
||||
return i_opt;
|
||||
|
||||
}
|
||||
|
||||
cmRC_t cmScMatcherStep( cmScMatcher* p )
|
||||
@ -1913,21 +1914,27 @@ cmRC_t cmScMeasInit( cmScMeas* p, cmScH_t scH, double srate, const unsigned*
|
||||
return rc;
|
||||
|
||||
// assign set[].bli and set[].eli
|
||||
|
||||
// for each measurment set
|
||||
for(j=0; j<p->sn; ++j)
|
||||
{
|
||||
cmScMeasSet_t* msp = p->set + j;
|
||||
|
||||
// for each score location
|
||||
for(i=0; i<p->mp->locN; ++i)
|
||||
{
|
||||
// if this set starts on this score location
|
||||
if( msp->bli==cmInvalidIdx && msp->bsli==p->mp->loc[i].scLocIdx )
|
||||
msp->bli = i;
|
||||
msp->bli = i; // store the index of the score location
|
||||
|
||||
// if this set end on this score location
|
||||
if( msp->esli==p->mp->loc[i].scLocIdx )
|
||||
msp->eli = i;
|
||||
msp->eli = i; // store the index of the score location
|
||||
}
|
||||
|
||||
assert( msp->eli > msp->bli );
|
||||
|
||||
// track the longest set.
|
||||
maxScWndN = cmMax( maxScWndN, msp->eli - msp->bli + 1 );
|
||||
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ extern "C" {
|
||||
unsigned bsli; // beg score loc index
|
||||
unsigned esli; // end score loc index
|
||||
|
||||
unsigned bli; //
|
||||
unsigned eli; //
|
||||
unsigned bli; // index into the cmScMatch.loc[] array of bsli
|
||||
unsigned eli; // index into the cmScMatch.loc[] array of esli
|
||||
|
||||
double value; // DBL_MAX if the value has not yet been set
|
||||
double tempo; //
|
||||
|
Loading…
Reference in New Issue
Block a user