wavelength 1.0.0
Loading...
Searching...
No Matches
pitchtrackriffdata.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "gs/muse.h"
6#include "mid/tickobj.h"
7#include "os/ptr.h"
8#include "os/string.h"
9
17public:
19 struct RiffSet {
21 };
22
30
38
49 void AddRiffs(int nTick, Muse *pRiff0, Muse *pRiff1, Muse *pRiff2);
50
61 void GetRiffs(int nIndex, Muse **ppRiff0, Muse **ppRiff1, Muse **ppRiff2) const;
62
73 Muse *GetRiff(int nTick, int nSlot) const;
74
83 int FindRiffs(int nTick) const;
84
92 void SetEnabled(bool bEnabled);
93
101 bool IsEnabled() const;
102
104 const String &GetName() const {
105 return mName;
106 }
107
109 void SetName(const char *pszName) {
110 mName = pszName;
111 }
112
113private:
125 static TickObj<RiffSet> MakeEntry(int nTick, Muse *pRiff0, Muse *pRiff1, Muse *pRiff2) {
126 return TickObj<RiffSet>{nTick, {{Ptr<Muse>(pRiff0), Ptr<Muse>(pRiff1), Ptr<Muse>(pRiff2)}}};
127 }
128
138 static bool TickBefore(const TickObj<RiffSet> &first, const TickObj<RiffSet> &second) {
139 return first.mPosition < second.mPosition;
140 }
141
142 std::vector<TickObj<RiffSet>> mRiffSets;
143 int mReserved10; // +0x10, set to 1 and not read by any routine here.
144 int mEnabled;
145 String mName;
146};
Piece of MIDI performance that a Scheduler plays.
Definition muse.h:12
Muse * GetRiff(int nTick, int nSlot) const
Report the riff of one gem button at a tick.
void SetEnabled(bool bEnabled)
Set whether the track takes part in a remix.
bool IsEnabled() const
Report whether the track takes part in a remix.
void GetRiffs(int nIndex, Muse **ppRiff0, Muse **ppRiff1, Muse **ppRiff2) const
Report the riffs of a set.
int FindRiffs(int nTick) const
Find the last set that starts at or before a tick.
~PitchTrackRiffData()
Release the riffs.
const String & GetName() const
Definition pitchtrackriffdata.h:104
PitchTrackRiffData()
Construct riff data with no riffs.
void AddRiffs(int nTick, Muse *pRiff0, Muse *pRiff1, Muse *pRiff2)
Add the riffs that start at a tick.
void SetName(const char *pszName)
Definition pitchtrackriffdata.h:109
Owner of one reference to an Attachment.
Definition ptr.h:16
Growable text buffer that is also a PrnStream.
Definition string.h:19
The riff of each gem button.
Definition pitchtrackriffdata.h:19
Ptr< Muse > mRiffs[3]
Definition pitchtrackriffdata.h:20
One value at one song position.
Definition tickobj.h:18
int mPosition
Definition tickobj.h:19