forked from dliganov/Chaotic-DAW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Awful_preview.h
44 lines (36 loc) · 1.63 KB
/
Awful_preview.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
#ifndef PREVIEW_H
#define PREVIEW_H
#include "awful.h"
#include "awful_elements.h"
#include "awful_instruments.h"
#include "awful_panels.h"
extern PreviewSlot PrevSlot[MAX_PREVIEW_ELEMENTS];
extern HANDLE hPreviewMutex;
typedef struct PreviewSlot
{
NoteInstance* ii;
PrevState state;
Trigger trigger;
bool sustainable; // Indicates immediate release after trigger activation. Useful shit.
bool mouse_preview;
bool keybound_pianokey;
long start_frame;
int key;
int note;
}PreviewSlot;
extern unsigned int NumPrevs;
extern void Preview_Init();
extern void Preview_StopAll();
extern void Preview_MouseRelease();
extern void Preview_FinishAll();
extern void Preview_ReleaseAll();
extern int Preview_Add(NoteInstance* ii, Instrument* i, int key, int note, Pattern* pt, Trk* trk, Mixcell* mcell, bool noauto = false, bool setrelative = false);
extern void Preview_Release(Instrument* i, int note);
extern void Preview_Release(int key);
extern inline void Preview_SetNoteVolume(unsigned int note, float volume);
extern inline void Preview_SetVolume(float volume);
extern bool Preview_StopPerPattern(Element* el);
extern void Preview_ReleaseData(unsigned int ic);
extern void Preview_CheckStates(long num_frames);
extern void Preview_ForceCleanForInstrument(Instrument* instr);
#endif