Etterna 0.74.4
Loading...
Searching...
No Matches
MetaIntervalInfo.h
1#pragma once
2#include "IntervalInfo.h"
3
4/* meta info is information that is derived from two or more consecutive
5 * noteinfos, the first level of pattern abstraction is generated from noteinfo,
6 * the second level of abstraction is generated from the meta info produced by
7 * the first level of abstraction, and so on and so forth. meta info is
8 * constructed on the fly per row and each row's meta info is able to look back
9 * 3-4 rows into the past for relevant pattern information, in that sense meta
10 * info contains information that persists beyond the explicit bounds of its
11 * generation point, and that information may carry forward into the next
12 * generation point, functionally speaking this has the effect of carrying
13 * pattern sequence detection through intervals, reducing the error caused by
14 * interval splicing*/
15
20{
21 ItvInfo _itvi;
22
23 int _idx = 0;
24 // meta info for this interval extracted from the base noterow progression
25 int seriously_not_js = 0;
26 int definitely_not_jacks = 0;
27 int actual_jacks = 0;
28 int actual_jacks_cj = 0;
29 int not_js = 0;
30 int not_hs = 0;
31 int zwop = 0;
32 int shared_chord_jacks = 0;
33 bool dunk_it = false;
34
35 // ok new plan instead of a map, keep an array of 3, run a comparison loop
36 // that sets 0s to a new value if that value doesn't match any non 0 value,
37 // and set a bool flag if we have filled the array with unique values
38 std::array<unsigned, 3> row_variations = { 0, 0, 0 };
39 int num_var = 0;
40 // unique(noteinfos for interval) < 3, or row_variations[2] == 0 by interval
41 // end
42 bool basically_vibro = true;
43
44 void reset()
45 {
46 // at the moment this also resets to default
47 _itvi.handle_interval_end();
48
49 _idx = 0;
50 seriously_not_js = 0;
51 definitely_not_jacks = 0;
52 actual_jacks = 0;
53 actual_jacks_cj = 0;
54 not_js = 0;
55 not_hs = 0;
56 zwop = 0;
57 shared_chord_jacks = 0;
58 dunk_it = false;
59
60 row_variations.fill(0);
61 num_var = 0;
62
63 basically_vibro = 0;
64 }
65
66 void handle_interval_end()
67 {
68 // isn't reset, preserve behavior. this essentially just tracks longer
69 // sequences of single notes, we don't want it to be reset with
70 // intervals, also there's probably a better way to implement this setup
71 // seriously_not_js = 0;
72
73 // alternating chordstream detected (used by cj only atm)
74 definitely_not_jacks = 0;
75
76 // number of shared jacks between to successive rows, used by js/hs to
77 // depress jumpjacks
78 actual_jacks = 0;
79
80 // almost same thing as above (see comment in jack_scan)
81 actual_jacks_cj = 0;
82
83 // increased by detecting either long runs of single notes
84 // (definitely_not_jacks > 3) or by encountering jumptrills, either
85 // splithand or two hand, not_js and not_hs are the same thing, this
86 // entire operation and setup should probably be split up and made more
87 // explicit in each thing it detects and how those things are used
88 not_js = 0;
89 not_hs = 0;
90
91 // recycle var for any int assignments
92 zwop = 0;
93
94 // self explanatory and unused atm
95 shared_chord_jacks = 0;
96
97 row_variations.fill(0);
98 num_var = 0;
99
100 // see def
101 basically_vibro = true;
102 dunk_it = false;
103
104 // reset our interval info
105 _itvi.handle_interval_end();
106 }
107};
Definition IntervalInfo.h:28
void handle_interval_end()
resets all the stuff that accumulates across intervals
Definition IntervalInfo.h:41
Definition MetaIntervalInfo.h:20