Skip to content

Commit

Permalink
clean up oht/voht, add missing param, voht to cj
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 28, 2020
1 parent a106fdb commit 93f5466
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 28 deletions.
19 changes: 11 additions & 8 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ jackloss(const float& x, Calc& calc, const int& hi) -> float

// set interval values values and total in the same loop
for (int i = 0; i < calc.numitv; ++i) {
float loss = hit_the_road(x, calc.base_adj_diff.at(hi)[Skill_JackSpeed].at(i));
float loss =
hit_the_road(x, calc.base_adj_diff.at(hi)[Skill_JackSpeed].at(i));
total += loss;

calc.jack_loss.at(hi).at(i) = loss;
Expand Down Expand Up @@ -427,8 +428,8 @@ Calc::InitializeHands(const vector<NoteInfo>& NoteInfo,
}
}
return true;
}

}

// each skillset should just be a separate calc function [todo]
auto
Calc::Chisel(float player_skill,
Expand Down Expand Up @@ -468,7 +469,8 @@ Calc::Chisel(float player_skill,
gotpoints, player_skill, ss, stamina, *this, hi);
}
if (ss == Skill_Technical) {
gotpoints -= fastsqrt(jackloss(player_skill * 0.8F, *this, hi) / 1.F);
gotpoints -= fastsqrt(
jackloss(player_skill * 0.8F, *this, hi) / 1.F);
}
}
}
Expand Down Expand Up @@ -579,8 +581,10 @@ Calc::InitAdjDiff(Calc& calc, const int& hi)

// chordjack
{
CJ, CJDensity,
CJ,
CJDensity,
// CJOHJump // SQRTD BELOW
VOHTrill,
},

// tech, duNNO wat im DOIN
Expand Down Expand Up @@ -675,9 +679,8 @@ Calc::InitAdjDiff(Calc& calc, const int& hi)
*stam_base = max<float>(a, b);
} break;
case Skill_JackSpeed:
*adj_diff =
calc.soap.at(hi).at(JackBase).at(i) *
tp_mods[Skill_JackSpeed] * basescalers.at(ss);
*adj_diff = calc.soap.at(hi).at(JackBase).at(i) *
tp_mods[Skill_JackSpeed] * basescalers.at(ss);
break;
case Skill_Chordjack:
*adj_diff *= fastsqrt(calc.doot.at(hi).at(CJOHJump).at(i));
Expand Down
9 changes: 0 additions & 9 deletions src/Etterna/Globals/MinaCalc/Dependent/HD_PatternMods/OHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ struct OHTrillMod
float cv_reset = 1.F;
float cv_threshhold = 0.5F;

// this is for base trill 1->2 2->1 1->2, 4 notes, 3 timings, however we can
// extend the window for ms values such that, for example, we require 2 oht
// meta detections, and on the third, we check a window of 5 ms values,
// dunno what the benefits or drawbacks are of either system atm but they
// are both implementable easily
float oht_cc_window = 6.F;

const vector<pair<std::string, float*>> _params{
{ "window_param", &window_param },

Expand All @@ -46,8 +39,6 @@ struct OHTrillMod

{ "cv_reset", &cv_reset },
{ "cv_threshhold", &cv_threshhold },

{ "oht_cc_window", &oht_cc_window },
};
#pragma endregion params and param map

Expand Down
16 changes: 5 additions & 11 deletions src/Etterna/Globals/MinaCalc/Dependent/HD_PatternMods/VOHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#include "Etterna/Models/NoteData/NoteDataStructures.h"
#include "Etterna/Globals/MinaCalc/Dependent/IntervalHandInfo.h"

/* this is complex enough it should probably have its own sequencer, there's
* also a fair bit of redundancy between this, wrjt, wrr */
/* retuned oht mod focus tuned to for catching vibro trills like bagatelle */

static const int max_vtrills_per_interval = 4;

Expand All @@ -27,14 +26,9 @@ struct VOHTrillMod
float suppression = 0.2F;

float cv_reset = 1.F;
float cv_threshhold = 0.15F;
float cv_threshhold = 0.25F;

// this is for base trill 1->2 2->1 1->2, 4 notes, 3 timings, however we can
// extend the window for ms values such that, for example, we require 2 oht
// meta detections, and on the third, we check a window of 5 ms values,
// dunno what the benefits or drawbacks are of either system atm but they
// are both implementable easily
float oht_cc_window = 6.F;
float min_len = 8.F;

const std::vector<std::pair<std::string, float*>> _params{
{ "window_param", &window_param },
Expand All @@ -47,7 +41,7 @@ struct VOHTrillMod
{ "cv_reset", &cv_reset },
{ "cv_threshhold", &cv_threshhold },

{ "oht_cc_window", &oht_cc_window },
{ "min_len", &min_len },
};
#pragma endregion params and param map

Expand Down Expand Up @@ -185,7 +179,7 @@ struct VOHTrillMod
return;
}

if (_mw_oht_taps.get_total_for_window(window) < 10) {
if (_mw_oht_taps.get_total_for_window(window) < min_len) {
pmod = neutral;
return;
}
Expand Down

0 comments on commit 93f5466

Please sign in to comment.