1 |
// qsamplerFxSend.h |
2 |
// |
3 |
/**************************************************************************** |
4 |
Copyright (C) 2008, Christian Schoenebeck |
5 |
|
6 |
This program is free software; you can redistribute it and/or |
7 |
modify it under the terms of the GNU General Public License |
8 |
as published by the Free Software Foundation; either version 2 |
9 |
of the License, or (at your option) any later version. |
10 |
|
11 |
This program is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
GNU General Public License for more details. |
15 |
|
16 |
You should have received a copy of the GNU General Public License along |
17 |
with this program; if not, write to the Free Software Foundation, Inc., |
18 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 |
|
20 |
*****************************************************************************/ |
21 |
|
22 |
#ifndef __qsamplerFxSend_h |
23 |
#define __qsamplerFxSend_h |
24 |
|
25 |
#include <QStringList> |
26 |
#include <QMap> |
27 |
#include <QList> |
28 |
|
29 |
namespace QSampler { |
30 |
|
31 |
// Typedef'd QMap. |
32 |
typedef QMap<int, int> FxSendRoutingMap; |
33 |
|
34 |
class FxSend { |
35 |
public: |
36 |
// retrieve existing FX send |
37 |
FxSend(int SamplerChannelID, int FxSendID); |
38 |
|
39 |
// create a new FX send |
40 |
FxSend(int SamplerChannelID); |
41 |
|
42 |
~FxSend(); |
43 |
|
44 |
int id() const; |
45 |
|
46 |
// whether FX send exists on sampler side yet |
47 |
bool isNew() const; |
48 |
|
49 |
// whether scheduled for deletion |
50 |
bool deletion() const; |
51 |
void setDeletion(bool bDelete); |
52 |
|
53 |
bool isModified() const; |
54 |
|
55 |
void setName(const QString& sName); |
56 |
const QString& name() const; |
57 |
|
58 |
void setSendDepthMidiCtrl(int iMidiController); |
59 |
int sendDepthMidiCtrl() const; |
60 |
|
61 |
void setCurrentDepth(float depth); |
62 |
float currentDepth() const; |
63 |
|
64 |
// Audio routing accessors. |
65 |
int audioChannel(int iAudioSrc) const; |
66 |
bool setAudioChannel(int iAudioSrc, int iAudioDst); |
67 |
// The audio routing map itself. |
68 |
const FxSendRoutingMap& audioRouting() const; |
69 |
|
70 |
bool getFromSampler(); |
71 |
bool applyToSampler(); |
72 |
|
73 |
static QList<int> allFxSendsOfSamplerChannel(int samplerChannelID); |
74 |
|
75 |
private: |
76 |
int m_iSamplerChannelID; |
77 |
int m_iFxSendID; |
78 |
bool m_bDelete; |
79 |
bool m_bModified; |
80 |
|
81 |
QString m_FxSendName; |
82 |
int m_MidiCtrl; |
83 |
float m_Depth; |
84 |
FxSendRoutingMap m_AudioRouting; |
85 |
}; |
86 |
|
87 |
} // namespace QSampler |
88 |
|
89 |
#endif // __qsamplerFxSend_h |
90 |
|
91 |
// end of __qsamplerFxSend.h |