Etterna
0.74.4
Loading...
Searching...
No Matches
src
Etterna
MinaCalc
Agnostic
IntervalInfo.h
1
#pragma once
2
#include <array>
3
4
enum
tap_size
5
{
6
single,
7
jump,
8
hand,
9
quad,
10
five_chord,
11
six_chord,
12
seven_chord,
13
eight_chord,
14
nine_chord,
15
ten_chord,
16
eleven_chord,
17
twelve_chord,
18
thirteen_chord,
19
fourteen_chord,
20
fifteen_chord,
21
sixteen_chord,
22
num_tap_size
23
};
24
27
struct
ItvInfo
28
{
30
int
total_taps
= 0;
32
int
chord_taps
= 0;
34
std::array<int, num_tap_size>
taps_by_size
= { 0, 0, 0, 0, 0, 0, 0, 0,
35
0, 0, 0, 0, 0, 0, 0, 0 };
38
int
mixed_hs_density_tap_bonus
= 0;
39
41
void
handle_interval_end
()
42
{
43
total_taps
= 0;
44
45
chord_taps
= 0;
46
mixed_hs_density_tap_bonus
= 0;
47
48
taps_by_size
.fill(0);
49
}
50
51
void
update_tap_counts(
const
int
& row_count)
52
{
53
total_taps
+= row_count;
54
55
// ALWAYS COUNT NUMBER OF TAPS IN CHORDS
56
if
(row_count > 1) {
57
chord_taps
+= row_count;
58
}
59
60
// ALWAYS COUNT NUMBER OF TAPS IN CHORDS
61
taps_by_size
.at(row_count - 1) += row_count;
62
63
// maybe move this to metaitvinfo?
64
// we want mixed hs/js to register as hs, even at relatively sparse hand
65
// density
66
if
(
taps_by_size
[hand] > 0) {
67
// this seems kinda extreme? it'll add the number of jumps in the
68
// whole interval every hand? maybe it needs to be that extreme?
69
mixed_hs_density_tap_bonus
+=
taps_by_size
[jump];
70
}
71
}
72
};
ItvInfo
Definition
IntervalInfo.h:28
ItvInfo::taps_by_size
std::array< int, num_tap_size > taps_by_size
count of taps for each tap_size
Definition
IntervalInfo.h:34
ItvInfo::handle_interval_end
void handle_interval_end()
resets all the stuff that accumulates across intervals
Definition
IntervalInfo.h:41
ItvInfo::mixed_hs_density_tap_bonus
int mixed_hs_density_tap_bonus
Definition
IntervalInfo.h:38
ItvInfo::total_taps
int total_taps
total taps
Definition
IntervalInfo.h:30
ItvInfo::chord_taps
int chord_taps
non single taps
Definition
IntervalInfo.h:32
Generated by
1.9.8