Skip to content

Commit

Permalink
test new jack params | 423
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 12, 2020
1 parent 0fa0117 commit b3f25ad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/Etterna/MinaCalc/Dependent/HD_Sequencers/GenericSequencing.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// bpm flux float precision etc
static const float anchor_spacing_buffer_ms = 10.F;
static const float anchor_speed_increase_cutoff_factor = 2.1F;
static const float anchor_speed_increase_cutoff_factor = 2.34F;
static const int len_cap = 6;

enum anch_status
Expand Down Expand Up @@ -101,7 +101,7 @@ struct Anchor_Sequencing

if (_sc_ms > _max_ms + anchor_spacing_buffer_ms) {
_status = reset_too_slow;
} else if (_sc_ms * 2.5F < _max_ms) {
} else if (_sc_ms * anchor_speed_increase_cutoff_factor < _max_ms) {
_status = reset_too_fast;
} else {
_status = anchoring;
Expand Down Expand Up @@ -148,8 +148,8 @@ struct Anchor_Sequencing
}

static const auto avg_ms_mult = 1.075F;
static const auto anchor_time_buffer_ms = 20.F;
static const auto min_ms = 80.F;
static const auto anchor_time_buffer_ms = 25.F;
static const auto min_ms = 85.F;

// get total ms
const auto total_ms = ms_from(_last, _start);
Expand All @@ -170,8 +170,8 @@ struct Anchor_Sequencing

// BAD TEMP HACK LUL
if (_len == 2) {
ms *= 1.05F;
ms = ms < 105.F ? 105.F : ms;
ms *= 1.1F;
ms = ms < 155.F ? 155.F : ms;
}

ms = ms < min_ms ? min_ms : ms;
Expand Down
14 changes: 9 additions & 5 deletions src/Etterna/MinaCalc/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,12 @@ StamAdjust(float x, int ss, Calc& calc, int hi, bool debug = false)
}
}

static const float magic_num = 4.F;
static const float magic_num_TWO = 2.5F;
static const float magic_num = 12.F;

[[nodiscard]] inline auto
hit_the_road(const float& x, const float& y) -> float
{
return magic_num - (magic_num * fastpow(x / y, magic_num_TWO));
return std::max(magic_num * erf(0.05F * (y - x)), 0.F);
}

/* ok this is a little jank, we are calculating jack loss looping over the
Expand All @@ -294,12 +293,17 @@ hit_the_road(const float& x, const float& y) -> float
inline auto
jackloss(const float& x, Calc& calc, const int& hi) -> float
{
calc.jack_loss.at(hi).resize(calc.numitv);
for (auto itv = 0; itv < calc.numitv; ++itv) {
calc.jack_loss.at(hi).at(itv) = 0.F;
}

auto total = 0.F;

for (const auto& y : calc.jack_diff.at(hi)) {
if (x < y && y > 0.F) {
const auto zzerp = hit_the_road(x, y);
calc.jack_loss.at(hi).push_back(zzerp);

total += zzerp;
}
}
Expand Down Expand Up @@ -852,7 +856,7 @@ MinaSDCalcDebug(const vector<NoteInfo>& NoteInfo,
}
}

int mina_calc_version = 422;
int mina_calc_version = 423;
auto
GetCalcVersion() -> int
{
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/MinaCalc/UlbuAcolytes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* patterns have lower enps than streams, streams default to 1 and chordstreams
* start lower, stam is a special case and may use normalizers again */
static const std::array<float, NUM_Skillset> basescalers = {
0.F, 0.93F, 0.885F, 0.82F, 0.925F, 0.98F, 0.8F, 0.84F
0.F, 0.93F, 0.885F, 0.82F, 0.925F, 0.9F, 0.8F, 0.84F
};

static const std::string calc_params_xml = "Save/calc params.xml";
Expand Down

0 comments on commit b3f25ad

Please sign in to comment.