Cutoff for jacks is 170bpm 1/8th notes, and not after jumps

This commit is contained in:
Michael Votaw
2025-02-11 19:39:03 -08:00
committed by teejusb
parent ed2b5f8d5e
commit 9c959d7dee
2 changed files with 15 additions and 3 deletions
+5
View File
@@ -24,6 +24,11 @@ namespace StepParity {
}; };
const std::vector<StepParity::Foot> FEET = {LEFT_HEEL, LEFT_TOE, RIGHT_HEEL, RIGHT_TOE}; const std::vector<StepParity::Foot> FEET = {LEFT_HEEL, LEFT_TOE, RIGHT_HEEL, RIGHT_TOE};
// A map for getting the other part of the foot, when you don't actually care
// what part it is.
// OTHER_PART_OF_FOOT[LEFT_HEEL] == LEFT_TOE
const std::vector<StepParity::Foot> OTHER_PART_OF_FOOT = {NONE, LEFT_TOE, LEFT_HEEL, RIGHT_TOE, RIGHT_HEEL};
const RString FEET_LABELS[] = {"N", "L", "l", "R", "r", "5??", "6??"}; const RString FEET_LABELS[] = {"N", "L", "l", "R", "r", "5??", "6??"};
const RString TapNoteTypeShortNames[] = { "Empty", "Tap", "Mine", "Attack", "AutoKeySound", "Fake", "", "" }; const RString TapNoteTypeShortNames[] = { "Empty", "Tap", "Mine", "Attack", "AutoKeySound", "Fake", "", "" };
const RString TapNoteSubTypeShortNames[] = { "Hold", "Roll", "", "" }; const RString TapNoteSubTypeShortNames[] = { "Hold", "Roll", "", "" };
+10 -3
View File
@@ -23,7 +23,7 @@ XToLocalizedString( TechCountsCategory );
LuaFunction(TechCountsCategoryToLocalizedString, TechCountsCategoryToLocalizedString(Enum::Check<TechCountsCategory>(L, 1)) ); LuaFunction(TechCountsCategoryToLocalizedString, TechCountsCategoryToLocalizedString(Enum::Check<TechCountsCategory>(L, 1)) );
LuaXType( TechCountsCategory ); LuaXType( TechCountsCategory );
const float JACK_CUTOFF = 0.176; // 170bpm 1/8th notes, anything slower isn't considered a jack
// TechCounts methods // TechCounts methods
TechCounts::TechCounts() TechCounts::TechCounts()
@@ -86,7 +86,7 @@ void TechCounts::CalculateTechCountsFromRows(const std::vector<StepParity::Row>
// A value of -1 means that Foot is not on any column // A value of -1 means that Foot is not on any column
int previousFootPlacement[StepParity::NUM_Foot]; int previousFootPlacement[StepParity::NUM_Foot];
int currentFootPlacement[StepParity::NUM_Foot]; int currentFootPlacement[StepParity::NUM_Foot];
int previousNoteCount = 0;
for (int f = 0; f < StepParity::NUM_Foot; f++) for (int f = 0; f < StepParity::NUM_Foot; f++)
{ {
previousFootPlacement[f] = -1; previousFootPlacement[f] = -1;
@@ -101,6 +101,8 @@ void TechCounts::CalculateTechCountsFromRows(const std::vector<StepParity::Row>
for (unsigned long i = 1; i < rows.size(); i++) for (unsigned long i = 1; i < rows.size(); i++)
{ {
const StepParity::Row &currentRow = rows[i]; const StepParity::Row &currentRow = rows[i];
const StepParity::Row &previousRow = rows[i - 1];
int noteCount = 0; int noteCount = 0;
// copy the foot placement for the current row into currentColumns, // copy the foot placement for the current row into currentColumns,
@@ -143,7 +145,10 @@ void TechCounts::CalculateTechCountsFromRows(const std::vector<StepParity::Row>
if(previousFootPlacement[foot] == currentFootPlacement[foot]) if(previousFootPlacement[foot] == currentFootPlacement[foot])
{ {
out[TechCountsCategory_Jacks] += 1; if(previousNoteCount == 1 && currentRow.second - previousRow.second < JACK_CUTOFF)
{
out[TechCountsCategory_Jacks] += 1;
}
} }
else else
{ {
@@ -212,6 +217,8 @@ void TechCounts::CalculateTechCountsFromRows(const std::vector<StepParity::Row>
previousColumns[c] = currentColumns[c]; previousColumns[c] = currentColumns[c];
currentColumns[c] = StepParity::NONE; currentColumns[c] = StepParity::NONE;
} }
previousNoteCount = noteCount;
} }
} }