Etterna 0.74.4
Loading...
Searching...
No Matches
Ulbu.h
1#pragma once
2
3#if !defined(STANDALONE_CALC) && !defined(PHPCALC)
4// stepmania garbage
5#include "../FileTypes/XmlFile.h"
6#include "../FileTypes/XmlFileUtil.h"
7#include "RageUtil/File/RageFile.h"
8#include "RageUtil/File/RageFileManager.h"
9#include "RageUtil/Utils/RageUtil.h"
10#endif
11
12// hand agnostic data structures/functions
13#include "Agnostic/MetaRowInfo.h"
14
15// hand agnostic pattern mods
16#include "Agnostic/HA_PatternMods/Stream.h"
17#include "Agnostic/HA_PatternMods/JS.h"
18#include "Agnostic/HA_PatternMods/HS.h"
19#include "Agnostic/HA_PatternMods/CJ.h"
20#include "Agnostic/HA_PatternMods/CJDensity.h"
21#include "Agnostic/HA_PatternMods/HSDensity.h"
22#include "Agnostic/HA_PatternMods/FlamJam.h"
23#include "Agnostic/HA_PatternMods/TheThingFinder.h"
24
25// hand dependent data structures/functions
26#include "Dependent/MetaHandInfo.h"
27#include "Dependent/MetaIntervalHandInfo.h"
28
29// hand dependent pattern mods
30#include "Dependent/HD_PatternMods/OHJ.h"
31#include "Dependent/HD_PatternMods/CJOHJ.h"
32#include "Dependent/HD_PatternMods/Balance.h"
33#include "Dependent/HD_PatternMods/Roll.h"
34#include "Dependent/HD_PatternMods/RollJS.h"
35#include "Dependent/HD_PatternMods/OHT.h"
36#include "Dependent/HD_PatternMods/VOHT.h"
37#include "Dependent/HD_PatternMods/Chaos.h"
38#include "Dependent/HD_PatternMods/CJOHAnchor.h"
39#include "Dependent/HD_PatternMods/WideRangeBalance.h"
40#include "Dependent/HD_PatternMods/WideRangeRoll.h"
41#include "Dependent/HD_PatternMods/WideRangeJumptrill.h"
42#include "Dependent/HD_PatternMods/WideRangeJJ.h"
43#include "Dependent/HD_PatternMods/WideRangeAnchor.h"
44#include "Dependent/HD_PatternMods/Minijack.h"
45#include "Dependent/HD_PatternMods/RunningMan.h"
46
47// they're useful sometimes
48#include "UlbuAcolytes.h"
49#include "UlbuBase.h"
50
51#include <cmath>
52
56{
57 // tracks meta hand info as well as basic interval tracking data for hand
58 // dependent stuff, like metaitvinfo and itvinfo
59 metaItvHandInfo _mitvhi;
60
61 // meta hand info is the same as meta row info, however it tracks
62 // pattern progression on individual hands rather than on generic rows
63 std::unique_ptr<metaHandInfo> _last_mhi;
64 std::unique_ptr<metaHandInfo> _mhi;
65
67
68 // so we can make pattern mods with these
69 StreamMod _s;
70 JSMod _js;
71 HSMod _hs;
72 CJDensityMod _cjd;
73 HSDensityMod _hsd;
75 CJOHJumpMod _cjohj;
76 RollMod _roll;
77 RollJSMod _rolljs;
78 BalanceMod _bal;
79 OHTrillMod _oht;
80 VOHTrillMod _voht;
81 ChaosMod _ch;
82 CJOHAnchorMod _chain;
83 RunningManMod _rm;
84 MinijackMod _mj;
88 WideRangeJJMod _wrjj;
90 FlamJamMod _fj;
93
94 // and put them here
95 PatternMods _pmods;
96
97 // so we can apply them here
98 diffz _diffz;
99
100 explicit TheGreatBazoinkazoinkInTheSky(Calc& calc)
101 : Bazoinkazoink(calc)
102 {
103 // setup our data pointers
104 _last_mhi = std::make_unique<metaHandInfo>(calc);
105 _mhi = std::make_unique<metaHandInfo>(calc);
106 }
107
108 private:
109 const std::array<std::vector<int>, NUM_Skillset> pmods = { {
110 // overall, nothing, don't handle here
111 {},
112
113 // stream
114 {
115 Stream,
116 OHTrill,
117 VOHTrill,
118 Roll,
119 // Chaos,
120 WideRangeRoll,
121 WideRangeJumptrill,
122 WideRangeJJ,
123 FlamJam,
124 // OHJumpMod,
125 // Balance,
126 // RanMan,
127 // WideRangeBalance,
128 },
129
130 // js
131 {
132 JS,
133 // OHJumpMod,
134 // Chaos,
135 // Balance,
136 // TheThing,
137 // TheThing2,
138 WideRangeBalance,
139 WideRangeJumptrill,
140 WideRangeJJ,
141 // WideRangeRoll,
142 // OHTrill,
143 VOHTrill,
144 // Roll,
145 RollJS,
146 // RanMan,
147 FlamJam,
148 // WideRangeAnchor,
149 },
150
151 // hs
152 {
153 HS,
154 OHJumpMod,
155 TheThing,
156 // WideRangeAnchor,
157 WideRangeRoll,
158 WideRangeJumptrill,
159 WideRangeJJ,
160 OHTrill,
161 VOHTrill,
162 // Roll,
163 // RanMan,
164 FlamJam,
165 HSDensity,
166 },
167
168 // stam, nothing, don't handle here
169 {},
170
171 // jackspeed, doesn't use pmods (atm)
172 {},
173
174 // chordjack
175 {
176 CJ,
177 // CJDensity,
178 // CJOHJump,
179 // CJOHAnchor,
180 // WideRangeAnchor,
181 // WideRangeJJ,
182 WideRangeJumptrill,
183 VOHTrill,
184 FlamJam, // you may say, why? why not?
185 },
186
187 // tech, duNNO wat im DOIN
188 {
189 OHTrill,
190 VOHTrill,
191 Balance,
192 Roll,
193 // OHJumpMod,
194 Chaos,
195 WideRangeJumptrill,
196 WideRangeJJ,
197 WideRangeBalance,
198 WideRangeRoll,
199 FlamJam,
200 // RanMan,
201 Minijack,
202 // WideRangeAnchor,
203 TheThing,
204 TheThing2,
205 },
206 } };
207
208 /* since we are no longer using the normalizer system we need to lower the
209 * base difficulty for each skillset and then detect pattern types to push
210 * down OR up, rather than just down and normalizing to a differential since
211 * chorded patterns have lower enps than streams, streams default to 1 and
212 * chordstreams start lower, stam is a special case and may use normalizers
213 * again */
214 const std::array<float, NUM_Skillset> basescalers = { 0.F, 0.91F, 0.75F,
215 0.77F, 0.93F, 1.01F,
216 1.06F, 1.06F };
217
218 public:
219 const std::array<std::vector<int>, NUM_Skillset>& get_pmods() const override
220 {
221 return pmods;
222 }
223 const std::array<float, NUM_Skillset>& get_basescalers() const override
224 {
225 return basescalers;
226 }
227 void adj_diff_func(
228 const size_t& itv,
229 const int& hand,
230 float*& adj_diff,
231 float*& stam_base,
232 const float& adj_npsbase,
233 const int& ss,
234 std::array<float, NUM_Skillset>& pmod_product_cur_interval) override
235 {
236 switch (ss) {
237 case Skill_Stream:
238 break;
239 /* test calculating stam for js/hs on max js/hs diff, also we
240 * want hs to count against js so they are mutually exclusive,
241 * don't know how this functionally interacts with the stam base
242 * stuff, but it might be one reason why js is more problematic
243 * than hs? */
244 case Skill_Jumpstream: {
245 *adj_diff /=
246 std::max<float>(_calc.pmod_vals.at(hand).at(HS).at(itv), 1.F);
247 *adj_diff /= fastsqrt(
248 _calc.pmod_vals.at(hand).at(OHJumpMod).at(itv) * 0.95F);
249
250 auto a = *adj_diff;
251 auto b =
252 _calc.init_base_diff_vals.at(hand).at(NPSBase).at(itv) *
253 pmod_product_cur_interval[Skill_Handstream];
254 *stam_base = std::max<float>(a, b);
255 } break;
256 case Skill_Handstream: {
257
258 // adj_diff /=
259 // fastsqrt(doot.at(hi).at(OHJump).at(i));
260 auto a = adj_npsbase;
261 auto b =
262 _calc.init_base_diff_vals.at(hand).at(NPSBase).at(itv) *
263 pmod_product_cur_interval[Skill_Jumpstream];
264 *stam_base = std::max<float>(a, b);
265 } break;
266 case Skill_JackSpeed:
267 break;
268 case Skill_Chordjack:
269 /*
270 *adj_diff =
271 * calc.init_base_diff_vals.at(hand).at(CJBase).at(i) *
272 * basescalers.at(Skill_Chordjack) *
273 * pmod_product_cur_interval[Skill_Chordjack];
274 // we leave
275 * stam_base alone here, still based on nps
276 */
277 *adj_diff =
278 _calc.init_base_diff_vals.at(hand).at(CJBase).at(itv) *
279 basescalers.at(Skill_Chordjack) *
280 pmod_product_cur_interval[Skill_Chordjack];
281 break;
282 case Skill_Technical:
283 *adj_diff =
284 _calc.init_base_diff_vals.at(hand).at(TechBase).at(itv) *
285 pmod_product_cur_interval.at(ss) * basescalers.at(ss) /
286 std::max<float>(
287 fastpow(_calc.pmod_vals.at(hand).at(CJ).at(itv) + 0.05F,
288 2.F),
289 1.F);
290 *adj_diff *=
291 fastsqrt(_calc.pmod_vals.at(hand).at(OHJumpMod).at(itv));
292 break;
293 default:
294 break;
295 }
296 }
297
298#pragma region hand agnostic pmod loop
299
300 void full_agnostic_reset() override
301 {
302 _s.full_reset();
303 _js.full_reset();
304 _hs.full_reset();
305 _cj.full_reset();
306
307 _mri.get()->reset();
308 _last_mri.get()->reset();
309 }
310
311 void setup_agnostic_pmods() override
312 {
313 /* these pattern mods operate on all columns, only need basic meta
314 * interval data, and do not need any more advanced pattern
315 * sequencing */
316 _s.setup();
317 _fj.setup();
318 _tt.setup();
319 _tt2.setup();
320 }
321
322 void advance_agnostic_sequencing() override
323 {
324 _s.advance_sequencing(_mri->ms_now, _mri->notes);
325 _fj.advance_sequencing(_mri->ms_now, _mri->notes);
326 _tt.advance_sequencing(_mri->ms_now, _mri->notes);
327 _tt2.advance_sequencing(_mri->ms_now, _mri->notes);
328 }
329
330 void set_agnostic_pmods(const int& itv) override
331 {
332 /* these pattern mods operate on all columns, only need basic meta
333 * interval data, and do not need any more advanced pattern
334 * sequencing. Just set only one hand's values and we'll copy them
335 * over (or figure out how not to need to) later */
336
337 PatternMods::set_agnostic(_s._pmod, _s(_mitvi), itv, _calc);
338 PatternMods::set_agnostic(_js._pmod, _js(_mitvi), itv, _calc);
339 PatternMods::set_agnostic(_hs._pmod, _hs(_mitvi), itv, _calc);
340 PatternMods::set_agnostic(_cj._pmod, _cj(_mitvi), itv, _calc);
341 PatternMods::set_agnostic(_cjd._pmod, _cjd(_mitvi), itv, _calc);
342 PatternMods::set_agnostic(_hsd._pmod, _hsd(_mitvi), itv, _calc);
343 PatternMods::set_agnostic(_fj._pmod, _fj(), itv, _calc);
344 PatternMods::set_agnostic(_tt._pmod, _tt(), itv, _calc);
345 PatternMods::set_agnostic(_tt2._pmod, _tt2(), itv, _calc);
346 }
347
348#pragma endregion
349
350#pragma region hand dependent pmod loop
356 {
357 _ohj.advance_sequencing(_mhi->_ct, _mhi->_bt);
358 _cjohj.advance_sequencing(_mhi->_ct, _mhi->_bt);
359 _chain.advance_sequencing(
360 _mhi->_ct, _mhi->_bt, _mhi->_last_ct, _seq._mw_any_ms.get_now());
361 _oht.advance_sequencing(_mhi->_mt, _seq._mw_any_ms);
362 _voht.advance_sequencing(_mhi->_mt, _seq._mw_any_ms);
363 _rm.advance_sequencing(_mhi->_ct, _mhi->_bt, _mhi->_mt, _seq._as);
364 _wrr.advance_sequencing(_mhi->_bt,
365 _mhi->_mt,
366 _mhi->_last_mt,
367 _seq._mw_any_ms.get_now(),
368 _seq.get_sc_ms_now(_mhi->_ct));
369 _wrjt.advance_sequencing(
370 _mhi->_bt, _mhi->_mt, _mhi->_last_mt, _seq._mw_any_ms);
371 _wrjj.advance_sequencing(_mhi->_ct, row_time);
372 _ch.advance_sequencing(_seq._mw_any_ms);
373 _roll.advance_sequencing(_mhi->_ct, row_time);
374 _rolljs.advance_sequencing(_mhi->_ct, row_time);
375 _mj.advance_sequencing(_mhi->_ct, _seq.get_sc_ms_now(_mhi->_ct));
376 }
377
378 void setup_dependent_mods() override
379 {
380 _oht.setup();
381 _voht.setup();
382 _roll.setup();
383 _rolljs.setup();
384 _rm.setup();
385 _wrr.setup();
386 _wrjt.setup();
387 _wrjj.setup();
388 _wrb.setup();
389 _wra.setup();
390 }
391
392 void set_dependent_pmods(const int& itv) override
393 {
394 PatternMods::set_dependent(hand, _ohj._pmod, _ohj(_mitvhi), itv, _calc);
395 PatternMods::set_dependent(
396 hand, _chain._pmod, _chain(_mitvhi), itv, _calc);
397 PatternMods::set_dependent(
398 hand, _cjohj._pmod, _cjohj(_mitvhi), itv, _calc);
399 PatternMods::set_dependent(
400 hand, _oht._pmod, _oht(_mitvhi._itvhi), itv, _calc);
401 PatternMods::set_dependent(
402 hand, _voht._pmod, _voht(_mitvhi._itvhi), itv, _calc);
403 PatternMods::set_dependent(
404 hand, _bal._pmod, _bal(_mitvhi._itvhi), itv, _calc);
405 PatternMods::set_dependent(
406 hand, _roll._pmod, _roll(_mitvhi._itvhi), itv, _calc);
407 PatternMods::set_dependent(
408 hand, _rolljs._pmod, _rolljs(_mitvhi._itvhi), itv, _calc);
409 PatternMods::set_dependent(
410 hand, _ch._pmod, _ch(_mitvhi._itvhi.get_taps_nowi()), itv, _calc);
411 PatternMods::set_dependent(
412 hand, _rm._pmod, _rm(_mitvhi._itvhi.get_taps_nowi()), itv, _calc);
413 PatternMods::set_dependent(
414 hand, _wrb._pmod, _wrb(_mitvhi._itvhi), itv, _calc);
415 PatternMods::set_dependent(
416 hand, _wrr._pmod, _wrr(_mitvhi._itvhi), itv, _calc);
417 PatternMods::set_dependent(
418 hand, _wrjt._pmod, _wrjt(_mitvhi._itvhi), itv, _calc);
419 PatternMods::set_dependent(
420 hand, _wrjj._pmod, _wrjj(_mitvhi._itvhi), itv, _calc);
421 PatternMods::set_dependent(
422 hand, _wra._pmod, _wra(_mitvhi._itvhi, _seq._as), itv, _calc);
423 PatternMods::set_dependent(
424 hand, _mj._pmod, _mj(_mitvhi._itvhi), itv, _calc);
425 }
426
430 void full_hand_reset() override
431 {
432 _ohj.full_reset();
433 _chain.full_reset();
434 _cjohj.full_reset();
435 _bal.full_reset();
436 _roll.full_reset();
437 _rolljs.full_reset();
438 _oht.full_reset();
439 _voht.full_reset();
440 _ch.full_reset();
441 _rm.full_reset();
442 _wrr.full_reset();
443 _wrjt.full_reset();
444 _wrjj.full_reset();
445 _wrb.full_reset();
446 _wra.full_reset();
447 _mj.full_reset();
448
449 _seq.full_reset();
450 _mitvhi.zero();
451 _mhi->full_reset();
452 _last_mhi->full_reset();
453 _diffz.full_reset();
454 }
455
456 void handle_dependent_interval_end(const int& itv) override
457 {
458 /* this calls itvhi's interval end, which is what updates the hand
459 * counts, so this _must_ be called before anything else */
460 _mitvhi.interval_end();
461
462 // same thing but for anchor max!!!
463 _seq.interval_end();
464
465 // run pattern mod generation for hand dependent mods
466 set_dependent_pmods(itv);
467
468 // run sequenced base difficulty generation, base diff is always
469 // hand dependent so we do it in this loop
470 set_sequenced_base_diffs(itv);
471
472 _diffz.interval_end();
473 }
474
476 void update_sequenced_base_diffs(const col_type& ct,
477 const int& itv,
478 const int& jack_counter,
479 const float& row_time,
480 const float& any_ms)
481 {
482 auto thing =
483 std::pair{ row_time,
484 ms_to_scaled_nps(_seq._as.get_lowest_jack_ms()) *
485 basescalers[Skill_JackSpeed] };
486 if (std::isnan(thing.second)) {
487 thing.second = 0.F;
488 }
489 // jack speed updates with highest anchor difficulty seen
490 // _between either column_ for _this row_
491 _calc.jack_diff.at(hand).push_back(thing);
492
493 // debug cv stuff
494 if (_calc.debugmode) {
495 switch (ct) {
496 case col_left:
497 _calc.debugMovingWindowCV.at(hand).at(0).emplace_back(
498 row_time, _seq.get_mw_sc_ms(ct).get_cv_of_window(4));
499 break;
500 case col_right:
501 _calc.debugMovingWindowCV.at(hand).at(1).emplace_back(
502 row_time, _seq.get_mw_sc_ms(ct).get_cv_of_window(4));
503 break;
504 case col_ohjump: {
505 _calc.debugMovingWindowCV.at(hand).at(0).emplace_back(
506 row_time, _seq.get_mw_sc_ms(ct).get_cv_of_window(4));
507 _calc.debugMovingWindowCV.at(hand).at(1).emplace_back(
508 row_time, _seq.get_mw_sc_ms(ct).get_cv_of_window(4));
509 break;
510 }
511 default:
512 break;
513 }
514 }
515
516 // chordjack updates
517 _diffz._cj.advance_base(any_ms, _calc);
518
519 // tech updates with a convoluted mess of garbage
520 _diffz._tc.advance_base(_seq, ct, _calc, hand, row_time);
521 _diffz._tc.advance_rm_comp(_rm.get_highest_anchor_difficulty());
522 _diffz._tc.advance_jack_comp(_seq._as.get_lowest_jack_ms());
523 }
524
525 void set_sequenced_base_diffs(const int& itv) const override
526 {
527 // this is no longer done for intervals, but per row, in the row
528 // (calc base anyways)
529 _calc.init_base_diff_vals.at(hand)[JackBase].at(itv) =
530 _diffz._tc.get_itv_jack_diff();
531
532 _calc.init_base_diff_vals.at(hand)[CJBase].at(itv) =
533 _diffz._cj.get_itv_diff(_calc);
534
535 // kinda jank but includes a weighted average vs nps base to prevent
536 // really silly stuff from becoming outliers
537 _calc.init_base_diff_vals.at(hand)[TechBase].at(itv) =
538 _diffz._tc.get_itv_diff(
539 _calc.init_base_diff_vals.at(hand)[NPSBase].at(itv), _calc);
540
541 // mostly for debug output.. optimize later
542 _calc.init_base_diff_vals.at(hand)[RMABase].at(itv) =
543 _diffz._tc.get_itv_rma_diff();
544 }
545
546 void run_dependent_pmod_loop() override
547 {
548 setup_dependent_mods();
549
550 for (const auto& ids : _calc.hand_col_masks) {
551 auto row_time = s_init;
552 auto last_row_time = s_init;
553 auto any_ms = ms_init;
554
555 auto row_notes = 0U;
556
557 auto ct = col_init;
559
560 // arrays are super bug prone with jacks so try vectors for now
561 _calc.jack_diff.at(hand).clear();
562
563 if (_calc.debugmode) {
564 _calc.debugMovingWindowCV.at(hand).fill(
565 std::vector<std::pair<float, float>>());
566 _calc.debugTechVals.at(hand).clear();
567 _calc.debugTechVals.at(hand).shrink_to_fit();
568 }
569
570 nps::actual_cancer(_calc, hand);
571
572 // maybe we _don't_ want this smoothed before the tech pass? and so
573 // it could be constructed parallel? NEEDS TEST
574 Smooth(_calc.init_base_diff_vals.at(hand).at(NPSBase), 0.F, _calc.numitv);
575 MSSmooth(
576 _calc.init_base_diff_vals.at(hand).at(MSBase), 0.F, _calc.numitv);
577
578 for (auto itv = 0; itv < _calc.numitv; ++itv) {
579 auto jack_counter = 0;
580 for (auto row = 0; row < _calc.itv_size.at(itv); ++row) {
581
582 const auto& ri = _calc.adj_ni.at(itv).at(row);
583 row_time = ri.row_time;
584 row_notes = ri.row_notes;
585 const auto row_count = ri.row_count;
586
587 // don't like having this here
588 any_ms = ms_from(row_time, last_row_time);
589
590 // To catch division by 0, not preventing significant issues as-is
591 // So disabled assert for now
592 // assert(any_ms > 0.F);
593
594 ct = determine_col_type(row_notes, ids);
595
596 // handle any special cases that need to be executed on
597 // empty rows for this hand here before moving on, aside
598 // from whatever is in this block _nothing_ else should
599 // update unless there is a note to update with
600 if (ct == col_empty) {
601 _rm.advance_off_hand_sequencing();
602 _mj.advance_off_hand_sequencing();
603 if (row_count == 2) {
604 _rm.advance_off_hand_sequencing();
605 }
606 continue;
607 }
608
609 // cj must always update or maybe not!
610 _diffz._cj.update_flags(row_notes & ids,
611 std::popcount(row_notes & ids));
612
613 // basically a time master, keeps track of different
614 // timings, update first
615 _seq.advance_sequencing(ct, row_time, any_ms);
616
617 // update metahandinfo, it constructs basic and advanced
618 // patterns from where we are now + recent pattern
619 // information constructed by the last iteration of
620 // itself
621 (*_mhi)(*_last_mhi, ct);
622
623 // update interval aggregation of column taps
624 _mitvhi._itvhi.set_col_taps(ct);
625
626 // advance sequencing for all hand dependent mods
628
629 /* jackspeed, and tech use various adjust ms bases that
630 * are sequenced here, meaning they are order dependent
631 * (jack might not be for the moment actually) nps base
632 * is still calculated in the old way */
634 ct, itv, jack_counter, row_time, any_ms);
635 ++jack_counter;
636
637 // only ohj uses this atm (and probably into the future)
638 // so it might kind of be a waste?
639 if (_mhi->_bt != base_type_init) {
640 ++_mitvhi._base_types.at(_mhi->_bt);
641 ++_mitvhi._meta_types.at(_mhi->_mt);
642 }
643
644 // cycle the pointers so now becomes last
645 std::swap(_last_mhi, _mhi);
646 last_row_time = row_time;
647 }
648
649 // maybe this should go back into the diffz object...
650 // _calc->itv_jack_diff_size.at(hand).at(itv) = jack_counter;
651
652 handle_dependent_interval_end(itv);
653 }
654 PatternMods::run_dependent_smoothing_pass(_calc.numitv, _calc);
655 //Smooth(_calc.init_base_diff_vals.at(hand).at(CJBase), 0.F, _calc.numitv);
656
657 // ok this is pretty jank LOL, just increment the hand index
658 // when we finish left hand
659 ++hand;
660 }
661
662 nps::grindscale(_calc);
663 }
664#pragma endregion
665
666#if !defined(STANDALONE_CALC) && !defined(PHPCALC)
667 const std::string get_calc_param_xml() const override
668 {
669 return "Save/CalcParams_4k.xml";
670 }
671
672 void load_calc_params_internal(const XNode& params) const override {
673 // diff params
674 load_params_for_mod(&params, _diffz._cj._params, _diffz._cj.name);
675 load_params_for_mod(&params, _diffz._tc._params, _diffz._tc.name);
676
677 // pmods
678 load_params_for_mod(&params, _s._params, _s.name);
679 load_params_for_mod(&params, _js._params, _js.name);
680 load_params_for_mod(&params, _hs._params, _hs.name);
681 load_params_for_mod(&params, _cj._params, _cj.name);
682 load_params_for_mod(&params, _cjd._params, _cjd.name);
683 load_params_for_mod(&params, _hsd._params, _hsd.name);
684 load_params_for_mod(&params, _ohj._params, _ohj.name);
685 load_params_for_mod(&params, _cjohj._params, _cjohj.name);
686 load_params_for_mod(&params, _chain._params, _chain.name);
687 load_params_for_mod(&params, _bal._params, _bal.name);
688 load_params_for_mod(&params, _oht._params, _oht.name);
689 load_params_for_mod(&params, _voht._params, _voht.name);
690 load_params_for_mod(&params, _ch._params, _ch.name);
691 load_params_for_mod(&params, _rm._params, _rm.name);
692 load_params_for_mod(&params, _roll._params, _roll.name);
693 load_params_for_mod(&params, _rolljs._params, _rolljs.name);
694 load_params_for_mod(&params, _wrb._params, _wrb.name);
695 load_params_for_mod(&params, _wrr._params, _wrr.name);
696 load_params_for_mod(&params, _wrjt._params, _wrjt.name);
697 load_params_for_mod(&params, _wrjj._params, _wrjj.name);
698 load_params_for_mod(&params, _wra._params, _wra.name);
699 load_params_for_mod(&params, _mj._params, _mj.name);
700 load_params_for_mod(&params, _fj._params, _fj.name);
701 load_params_for_mod(&params, _tt._params, _tt.name);
702 load_params_for_mod(&params, _tt2._params, _tt2.name);
703 }
704
705 XNode* make_param_node_internal(XNode* calcparams) const override
706 {
707 // diff params
708 calcparams->AppendChild(
709 make_mod_param_node(_diffz._cj._params, _diffz._cj.name));
710 calcparams->AppendChild(
711 make_mod_param_node(_diffz._tc._params, _diffz._tc.name));
712
713 // pmods
714 calcparams->AppendChild(make_mod_param_node(_s._params, _s.name));
715 calcparams->AppendChild(make_mod_param_node(_js._params, _js.name));
716 calcparams->AppendChild(make_mod_param_node(_hs._params, _hs.name));
717 calcparams->AppendChild(make_mod_param_node(_cj._params, _cj.name));
718 calcparams->AppendChild(make_mod_param_node(_cjd._params, _cjd.name));
719 calcparams->AppendChild(make_mod_param_node(_hsd._params, _hsd.name));
720 calcparams->AppendChild(make_mod_param_node(_ohj._params, _ohj.name));
721 calcparams->AppendChild(
722 make_mod_param_node(_cjohj._params, _cjohj.name));
723 calcparams->AppendChild(
724 make_mod_param_node(_chain._params, _chain.name));
725 calcparams->AppendChild(make_mod_param_node(_bal._params, _bal.name));
726 calcparams->AppendChild(make_mod_param_node(_oht._params, _oht.name));
727 calcparams->AppendChild(make_mod_param_node(_voht._params, _voht.name));
728 calcparams->AppendChild(make_mod_param_node(_ch._params, _ch.name));
729 calcparams->AppendChild(make_mod_param_node(_rm._params, _rm.name));
730 calcparams->AppendChild(make_mod_param_node(_roll._params, _roll.name));
731 calcparams->AppendChild(make_mod_param_node(_rolljs._params, _rolljs.name));
732 calcparams->AppendChild(make_mod_param_node(_wrb._params, _wrb.name));
733 calcparams->AppendChild(make_mod_param_node(_wrr._params, _wrr.name));
734 calcparams->AppendChild(make_mod_param_node(_wrjt._params, _wrjt.name));
735 calcparams->AppendChild(make_mod_param_node(_wrjj._params, _wrjj.name));
736 calcparams->AppendChild(make_mod_param_node(_wra._params, _wra.name));
737 calcparams->AppendChild(make_mod_param_node(_mj._params, _mj.name));
738 calcparams->AppendChild(make_mod_param_node(_fj._params, _fj.name));
739 calcparams->AppendChild(make_mod_param_node(_tt._params, _tt.name));
740 calcparams->AppendChild(make_mod_param_node(_tt2._params, _tt2.name));
741
742 return calcparams;
743 }
744#pragma endregion
745#endif
746};
Main driver class for the difficulty calculator as a whole.
Definition MinaCalc.h:82
std::array< std::vector< std::array< float, 4 > >, num_hands > debugTechVals
per hand vector of arrays: techyo chaos values of [row_time, pewp, obliosis, c]
Definition MinaCalc.h:289
std::array< std::array< std::vector< float >, NUM_CalcDiffValue >, num_hands > init_base_diff_vals
Definition MinaCalc.h:187
int numitv
Total number of intervals for the current file/rate (one per half second)
Definition MinaCalc.h:263
std::array< std::array< std::vector< std::pair< float, float > >, 2 >, num_hands > debugMovingWindowCV
Definition MinaCalc.h:286
std::vector< std::array< RowInfo, max_rows_for_single_interval > > adj_ni
Definition MinaCalc.h:162
std::array< std::array< std::vector< float >, NUM_CalcPatternMod >, num_hands > pmod_vals
Definition MinaCalc.h:179
bool debugmode
For debug output. Should only ever be true at music select.
Definition MinaCalc.h:95
std::array< std::vector< std::pair< float, float > >, num_hands > jack_diff
Definition MinaCalc.h:239
std::vector< int > itv_size
Number of rows in each interval.
Definition MinaCalc.h:165
Definition XmlFile.h:95
Definition Balance.h:8
Definition UlbuBase.h:15
Definition CJDensity.h:8
Definition CJOHAnchor.h:10
Definition CJOHJ.h:10
auto get_now() const -> T
get most recent value in moving window
Definition CalcWindow.h:38
Definition Chaos.h:8
Definition FlamJam.h:15
Definition HSDensity.h:8
Definition HS.h:8
auto get_taps_nowi() const -> int
access functions for hand tap counts
Definition IntervalHandInfo.h:135
Definition JS.h:7
Definition Minijack.h:8
Definition OHJ.h:9
Definition OHT.h:14
Definition UlbuAcolytes.h:63
Definition RollJS.h:6
Definition Roll.h:6
Definition RunningMan.h:17
Definition GenericSequencing.h:422
AnchorSequencer _as
Definition GenericSequencing.h:438
CalcMovingWindow< float > _mw_any_ms
Definition GenericSequencing.h:428
Definition Stream.h:13
Definition Ulbu.h:56
void full_hand_reset() override
Definition Ulbu.h:430
void update_sequenced_base_diffs(const col_type &ct, const int &itv, const int &jack_counter, const float &row_time, const float &any_ms)
update base difficulty stuff
Definition Ulbu.h:476
void handle_row_dependent_pattern_advancement(const float &row_time)
Definition Ulbu.h:355
Definition TheThingFinder.h:73
Definition TheThingFinder.h:12
Definition VOHT.h:13
Definition WideRangeAnchor.h:8
Definition WideRangeBalance.h:7
Definition WideRangeJJ.h:7
Definition WideRangeJumptrill.h:13
Definition WideRangeRoll.h:9
Definition SequencedBaseDiffCalc.h:997
this may prove to be overkill
Definition MetaIntervalHandInfo.h:6
void zero()
Definition MetaIntervalHandInfo.h:21
void interval_end()
handle end of interval
Definition MetaIntervalHandInfo.h:10
static void grindscale(Calc &calc)
determine grindscaler using smoothed npsbase
Definition SequencedBaseDiffCalc.h:153
static void actual_cancer(Calc &calc, const int &hand)
determine NPSBase, itv_points, CJBase for this hand
Definition SequencedBaseDiffCalc.h:68