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