cwSfTrack.h/cpp : Changes to comments only.

This commit is contained in:
kevin 2024-02-08 11:21:26 -05:00
parent 18a29aa295
commit 1424b6b036
2 changed files with 15 additions and 13 deletions

View File

@ -23,24 +23,24 @@ namespace cw
callback_func_t cbFunc; callback_func_t cbFunc;
void* cbArg; void* cbArg;
sfmatch::handle_t matchH; sfmatch::handle_t matchH;
unsigned mn; // size of midiBuf[] unsigned mn; // length of midiBuf[]
sfmatch::midi_t* midiBuf; // midiBuf[mn] sfmatch::midi_t* midiBuf; // midiBuf[mn] MIDI event window
result_t* res; // res[rn] result_t* res; // res[rn] result buffer
unsigned rn; // length of res[] (set to 2*score event count) unsigned rn; // length of res[] (set to 2*score event count)
unsigned ri; // next avail res[] recd. unsigned ri; // next avail res[] recd.
double s_opt; // double s_opt; //
unsigned missCnt; // current count of consecutive trailing non-matches unsigned missCnt; // current count of consecutive trailing non-matches
unsigned ili; // index into loc[] to start scan following reset unsigned ili; // index into sfmatch_t.loc[] to start scan following reset
unsigned eli; // index into loc[] of the last positive match. unsigned eli; // index into sfmatch_t.loc[] of the last positive match.
unsigned mni; // current count of MIDI events since the last call to cmScMatcherReset() unsigned mni; // current count of MIDI events since the last call to reset()
unsigned mbi; // index of oldest MIDI event in midiBuf[]; stays at 0 when the buffer is full. unsigned mbi; // index of oldest MIDI event in midiBuf[]; stays at 0 when the buffer is full.
unsigned begSyncLocIdx; // start of score window, in mp->loc[], of best match in previous scan unsigned begSyncLocIdx; // start of score window, in mp->loc[], of best match in previous scan
unsigned initHopCnt; // max window hops during the initial (when the MIDI buffer fills for first time) sync scan unsigned initHopCnt; // max window hops during the initial (when the MIDI buffer fills for first time) sync scan
unsigned stepCnt; // count of forward/backward score loc's to examine for a match during cmScMatcherStep(). unsigned stepCnt; // count of forward/backward score loc's to examine for a match during _step().
unsigned maxMissCnt; // max. number of consecutive non-matches during step prior to executing a scan. unsigned maxMissCnt; // max. number of consecutive non-matches during step prior to executing a _scan().
unsigned scanCnt; // current count of times a resync-scan was executed during cmScMatcherStep() unsigned scanCnt; // current count of times a resync-scan was executed during _step()
unsigned flags; unsigned flags;
} sftrack_t; } sftrack_t;

View File

@ -50,10 +50,12 @@ namespace cw
// Notes: // Notes:
// The cwSfTrack maintains an internal cwSfMatch object which is used to attempt to find the // The cwSfTrack maintains an internal cwSfMatch object which is used to attempt to find the
// best match between the current MIDI active note buffer and the current score search area. // best match between the current MIDI active note buffer and the current score search area.
// 'scWndN' is used to set the cwSfMatch 'locN' argument. //
// 'midiWndN' sets the length of the MIDI FIFO which is used to match to the score with // 'scWndN' is used to set the cwSfMatch 'locN' argument. It defines the length of the
// each recceived MIDI note. // score window over which the MIDI event window will slide, while searching for the best match.
// 'midiWndN' must be <= 'scWndN'. //
// 'midiWndN' sets the length of the MIDI FIFO winodw which is used to match to the score with
// each recceived MIDI note. 'midiWndN' must be <= 'scWndN'.
rc_t destroy( handle_t& hRef ); rc_t destroy( handle_t& hRef );