From 1424b6b0368bc6a33ff473dfda2d33a7db141a80 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 8 Feb 2024 11:21:26 -0500 Subject: [PATCH] cwSfTrack.h/cpp : Changes to comments only. --- cwSfTrack.cpp | 18 +++++++++--------- cwSfTrack.h | 10 ++++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cwSfTrack.cpp b/cwSfTrack.cpp index 2c16b24..f718de7 100644 --- a/cwSfTrack.cpp +++ b/cwSfTrack.cpp @@ -23,24 +23,24 @@ namespace cw callback_func_t cbFunc; void* cbArg; sfmatch::handle_t matchH; - unsigned mn; // size of midiBuf[] - sfmatch::midi_t* midiBuf; // midiBuf[mn] + unsigned mn; // length of midiBuf[] + 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 ri; // next avail res[] recd. double s_opt; // unsigned missCnt; // current count of consecutive trailing non-matches - unsigned ili; // index into loc[] to start scan following reset - unsigned eli; // index into loc[] of the last positive match. - unsigned mni; // current count of MIDI events since the last call to cmScMatcherReset() + unsigned ili; // index into sfmatch_t.loc[] to start scan following reset + unsigned eli; // index into sfmatch_t.loc[] of the last positive match. + 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 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 stepCnt; // count of forward/backward score loc's to examine for a match during cmScMatcherStep(). - 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 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 scanCnt; // current count of times a resync-scan was executed during _step() unsigned flags; } sftrack_t; diff --git a/cwSfTrack.h b/cwSfTrack.h index 2d5e94a..153c0eb 100644 --- a/cwSfTrack.h +++ b/cwSfTrack.h @@ -50,10 +50,12 @@ namespace cw // Notes: // 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. - // '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 - // each recceived MIDI note. - // 'midiWndN' must be <= 'scWndN'. + // + // 'scWndN' is used to set the cwSfMatch 'locN' argument. It defines the length of the + // score window over which the MIDI event window will slide, while searching for the best match. + // + // '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 );