forked from dliganov/Chaotic-DAW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Awful_tracks_lanes.h
95 lines (80 loc) · 2.18 KB
/
Awful_tracks_lanes.h
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef TRACKS_LANES_H
#define TRACKS_LANES_H
#include "awful.h"
typedef struct TrkBunch
{
int start_track;
int end_track;
Trk* trk_start;
Trk* trk_end;
int startpix;
int endpix;
ParamSet* params;
TrkBunch* prev;
TrkBunch* next;
}TrkBunch;
class Lane
{
public:
LaneType type;
int lnum;
Toggle* fold;
bool visible;
bool folded;
int height;
int y;
int base_line;
Lane* next;
Lane();
Lane(bool vis, int hgt, LaneType lt);
bool CheckMouse(int mouse_x, int mouse_y);
};
class Trk
{
public:
TrkType trktype;
int trknum;
// all lines occupied by the track
int start_line;
int end_line;
// only text lines (excepting vol/pan lanes)
int trk_start_line;
int trk_end_line;
bool active;
ParamSet* params;
TrkBunch* trkbunch;
bool buncho;
bool bunched;
bool bunchito;
Command* envelopes;
Instrument* defined_instr;
Lane vol_lane;
Lane pan_lane;
SliderHVol* vol;
SliderHPan* pan;
Toggle* mute;
Toggle* solo;
Scope scope;
FXState fxstate;
Mixcell* mcell;
MixChannel* mchan;
Trk* next;
Trk* prev;
Trk();
~Trk();
void Init(int track_num, bool controls);
void UpdateLaneBases();
};
extern void Bunch_Tracks(int y1, int y2);
extern int GetActualTrack(int trk_num);
extern TrkBunch* CheckIfTrackBunched(int trk_num, Pattern* pt);
extern Trk* GetTrkDataForTrkNum(int trknum, Pattern* pt);
extern int GetTrkNumForLine(int line, Pattern* pt);
extern Trk* GetTrkDataForLine(int line, Pattern* pt);
extern void DeleteTrack();
extern void InsertTrack();
extern void AdvanceTracks(Trk* trkdata, int num, Pattern* pt);
extern void Remove_Bunch(TrkBunch* tb, Pattern* pt);
extern void Add_Bunch(int start, int end, ParamSet* params, Pattern* pattern);
extern void ResetTrackControls();
#endif //TRACKS_LANES_H