-
Notifications
You must be signed in to change notification settings - Fork 0
/
OrganSynth.h
65 lines (50 loc) · 1.24 KB
/
OrganSynth.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
#ifndef OrganSynth_H
#define OrganSynth_H
#include <QApplication>
#include <QObject>
#include <QDebug>
#include <QThread>
#include "SineWave.h"
#include "RtWvOut.h"
#include "Stk.h"
#include "OrganSynth.h"
#include "RtAudio.h"
#include "RtMidi.h"
#include "BlowBotl.h"
#include "Clarinet.h"
#include "Saxofony.h"
#include "Instrmnt.h"
#include "Voicer.h"
#include "OrganRank.h"
using namespace stk;
class OrganSynth : public QObject
{
Q_OBJECT
public:
explicit OrganSynth(QObject *parent = 0);
~OrganSynth();
void run();
void stopDac() { running = false; }
QStringList getMidiPorts();
signals:
void sendStopSig(int stop, bool active);
public slots:
void runSynth();
void initMidi();
int selectMidiPort(int port);
void stopSynth() {
qDebug() << "stop called\n";
running = false;
}
bool getIsRankActive(int rank) {return rank_active[rank]; }
void toggleSound();
private:
static int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *dataPointer );
void toggleStop(int rank_number);
RtAudio *dac;
RtMidiIn *midi_in;
bool running;
bool rank_active[4];
};
#endif // OrganSynth_H