resonance 1.0.1
Loading...
Searching...
No Matches
riff.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <iostream>
5
6#include "gs/multimuse.h"
7#include "mid/tick.h"
8
25class Riff : public MultiMuse {
26public:
35 void *operator new(size_t nSize);
36
44 void operator delete(void *pBlock);
45
53 explicit Riff(int nId);
54
62 virtual void Print(std::ostream &stream);
63
79 void AddNoteMsg(int nTick,
80 unsigned char nNote,
81 unsigned char nVelocity,
82 int nLength,
83 unsigned char nChannel);
84
99 void AddMidiMsg(int nTick,
100 unsigned char nStatus,
101 unsigned char nData1,
102 unsigned char nData2,
103 unsigned char nChannel);
104
105 int mId;
106
107private:
108 // AutoRiffer::PlayRiff() at 0x00199758 reads mLength directly.
109 friend class AutoRiffer;
110 // LevelConverter::NextRiff() at 0x001e7eb0 writes mLength directly.
111 friend class LevelConverter;
112
113 // The length the riff repeats over. Zero on construction.
114 Sch::Tick mLength; // +0x18
115};
Sequence of messages, each at a song position.
Definition multimuse.h:30
Riff(int nId)
Construct an empty riff for one difficulty level.
friend class AutoRiffer
Definition riff.h:109
int mId
Definition riff.h:105
void AddMidiMsg(int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2, unsigned char nChannel)
Schedule a StdMidiMsg built from a status byte and two data bytes.
friend class LevelConverter
Definition riff.h:111
virtual void Print(std::ostream &stream)
Write riff[id= and the level, then the sequence through MultiMuse::Print().
void AddNoteMsg(int nTick, unsigned char nNote, unsigned char nVelocity, int nLength, unsigned char nChannel)
Schedule a NoteMsg.
Song position in MIDI ticks, printed as measure, beat, and tick.
Definition tick.h:70