wavelength 1.0.0
Loading...
Searching...
No Matches
axetrackdata.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5
6#include "gs/axecontour.h"
7#include "gs/axeharmony.h"
8#include "mid/tickobj.h"
9
18public:
20 static constexpr int kSetSize = 3;
21
23 struct ContourSet {
24 std::unique_ptr<AxeContour> mContours[kSetSize];
25 };
26
36 AxeTrackData(int nEndTick, int nReserved);
37
45
56 void AddHarmony(int nTick, const AxeHarmony *pHarmony);
57
70 void AddContours(int nTick, AxeContour *pFirst, AxeContour *pSecond, AxeContour *pThird);
71
85 int
86 GetContours(int nTick, AxeContour **ppFirst, AxeContour **ppSecond, AxeContour **ppThird) const;
87
99 int GetHarmony(int nTick, const AxeHarmony **ppHarmony) const;
100
102 int GetEndTick() const {
103 return mEndTick;
104 }
105
107 int GetReserved() const {
108 return mReserved;
109 }
110
111private:
112 int mEndTick;
113 int mReserved;
114 std::vector<TickObj<ContourSet>> mContours;
116 std::vector<TickObj<std::unique_ptr<const AxeHarmony>>> mHarmonies;
117};
The notes AxeTrack plays on a guitar track, looped over the length of the track.
Definition axecontour.h:19
The notes of one harmony of a guitar track, from one song position onward.
Definition axeharmony.h:13
static constexpr int kSetSize
The number of gem buttons, each with the notes of one AxeContour.
Definition axetrackdata.h:20
int GetReserved() const
Definition axetrackdata.h:107
int GetContours(int nTick, AxeContour **ppFirst, AxeContour **ppSecond, AxeContour **ppThird) const
Report the notes of the set that plays at a tick.
int GetHarmony(int nTick, const AxeHarmony **ppHarmony) const
Report the chord that plays at a tick.
void AddContours(int nTick, AxeContour *pFirst, AxeContour *pSecond, AxeContour *pThird)
Add the notes of the gem buttons that play from a tick on.
void AddHarmony(int nTick, const AxeHarmony *pHarmony)
Add the chord that plays from a tick on.
int GetEndTick() const
Definition axetrackdata.h:102
~AxeTrackData()
Release every set of notes and every chord.
AxeTrackData(int nEndTick, int nReserved)
Construct empty data.
The notes of the gem buttons from one tick on, deleted with the data.
Definition axetrackdata.h:23
std::unique_ptr< AxeContour > mContours[kSetSize]
Definition axetrackdata.h:24