wavelength 1.0.0
Loading...
Searching...
No Matches
pitchtrackplaygems.h
Go to the documentation of this file.
1#pragma once
2
3#include "game/gemslice.h"
5#include "game/playmap.h"
7#include "game/slotgrid.h"
8#include "os/binstream.h"
9
16public:
30 PlayMap *pPlayMap,
31 SectionBoundaries *pSections,
32 SlotGrid *pPatterns,
33 int nNumBars,
34 int nTicksPerBar);
35
43
56 bool ToggleGem(signed char nSlot, int nTick, signed char nOwner, bool bRepeat);
57
66 int GetOwner(int nBar);
67
76 void ClearBar(int nBar, bool bRepeat);
77
85 void ClearSection(int nBar);
86
96 void CopyBars(PitchTrackPlayGems *pSource, int nStartBar, int nEndBar);
97
105
114 GemSlice GetBar(int nBar);
115
123 void Save(BinStream &stream);
124
132 void Load(BinStream &stream);
133
134private:
135 PitchTrackGems *mGems;
136 PlayMap *mPlayMap;
137 SectionBoundaries *mSections;
138 SlotGrid *mPatterns;
139 int mTicksPerBar;
140};
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
View of the gems of one bar of a pitch track's song as written, moved to a bar the song plays.
Definition gemslice.h:13
The gems of a pitch track, by the bar of the song as written they lie in.
Definition pitchtrackgems.h:17
PitchTrackPlayGems(PitchTrackGems *pGems, PlayMap *pPlayMap, SectionBoundaries *pSections, SlotGrid *pPatterns, int nNumBars, int nTicksPerBar)
Construct a view of gems.
void ApplyPatterns()
Copy the gems of each section's pattern into the section.
void Load(BinStream &stream)
Read the gems.
void ClearSection(int nBar)
Remove every gem of the section a bar lies in.
bool ToggleGem(signed char nSlot, int nTick, signed char nOwner, bool bRepeat)
Place or remove the gem at a tick, and on request at the same tick of every other bar of the section.
void Save(BinStream &stream)
Write the gems.
GemSlice GetBar(int nBar)
Report the gems of a bar the song plays.
void CopyBars(PitchTrackPlayGems *pSource, int nStartBar, int nEndBar)
Copy the gems of a range of bars of other gems.
int GetOwner(int nBar)
Report the owner of the section a bar lies in.
void ClearBar(int nBar, bool bRepeat)
Remove every gem of a bar, and on request of every other bar of the section.
~PitchTrackPlayGems()
Release the view.
Map from the bars a song plays to the bars of the song as written, with the loops that repeat stretch...
Definition playmap.h:11
Ascending list of the measures at which the sections of a song end.
Definition sectionboundaries.h:12
The pattern each section of a remixed song repeats, as the section the pattern comes from.
Definition slotgrid.h:10