-
Notifications
You must be signed in to change notification settings - Fork 0
/
XMTrack.hpp
49 lines (38 loc) · 1 KB
/
XMTrack.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef XMTRACK_H
#define XMTRACK_H
#include <stdbool.h>
#include "XMFile.hpp"
#include "XMController.hpp"
class XMFile;
class XMController;
class XMChannel;
#define NO_NOTE 255
#define NOTE_OFF 97
#define SILD_SCALE 128
class XMTrack {
public:
bool volSild = false;
int8_t volSildVal = 0;
bool freqSildUp = false;
uint8_t freqSildUpVal = 0;
bool freqSildDown = false;
uint8_t freqSildDownVal = 0;
bool portToNote = false;
bool portToNoteActv = false;
uint8_t portToNoteSpeed = 0;
int32_t portToNoteCur = 0;
int32_t portToNoteSource = 0;
int32_t portToNoteTarget = 0;
void eraseEffectState();
void init(XMFile* xmfileRef, XMController* controllerRef, XMChannel* channelRef);
void processEffect(uint8_t type, uint8_t param);
void processVolCtrl(uint8_t val);
void processRows(pattern_cell_t* cell);
void processTick();
private:
uint8_t cur_note;
XMFile* xmfile;
XMController* controller;
XMChannel* channel;
};
#endif // XMTRACK_H