45 |
// Default destructor. |
// Default destructor. |
46 |
~qsamplerChannel(); |
~qsamplerChannel(); |
47 |
|
|
48 |
|
// Main application form accessor. |
49 |
|
qsamplerMainForm *mainForm() const; |
50 |
|
|
51 |
// Main application options accessor. |
// Main application options accessor. |
52 |
qsamplerOptions *options(); |
qsamplerOptions *options() const; |
53 |
|
|
54 |
// LSCP client descriptor accessor. |
// LSCP client descriptor accessor. |
55 |
lscp_client_t * client(); |
lscp_client_t * client() const; |
56 |
|
|
57 |
// Add/remove sampler channel methods. |
// Add/remove sampler channel methods. |
58 |
bool addChannel(); |
bool addChannel(); |
59 |
bool removeChannel(); |
bool removeChannel(); |
60 |
|
|
61 |
// Sampler channel ID accessors. |
// Sampler channel ID accessors. |
62 |
int channelID(); |
int channelID() const; |
63 |
void setChannelID(int iChannelID); |
void setChannelID(int iChannelID); |
64 |
|
|
65 |
// Readable channel name. |
// Readable channel name. |
66 |
QString channelName(); |
QString channelName() const; |
67 |
|
|
68 |
// Engine name property. |
// Engine name property. |
69 |
QString& engineName(); |
const QString& engineName() const; |
70 |
bool loadEngine(const QString& sEngineName); |
bool loadEngine(const QString& sEngineName); |
71 |
|
|
72 |
// Instrument file and index. |
// Instrument file and index. |
73 |
QString& instrumentFile(); |
const QString& instrumentFile() const; |
74 |
int instrumentNr(); |
int instrumentNr() const; |
75 |
QString& instrumentName(); |
const QString& instrumentName() const; |
76 |
int instrumentStatus(); |
int instrumentStatus() const; |
77 |
|
|
78 |
|
// Instrument file loader. |
79 |
bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
80 |
// Special instrument file/name/number settler. |
// Special instrument file/name/number settler. |
81 |
bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
82 |
|
|
83 |
// MIDI input driver (DEPRECATED). |
// MIDI input driver (DEPRECATED). |
84 |
QString& midiDriver(); |
const QString& midiDriver() const; |
85 |
bool setMidiDriver(const QString& sMidiDriver); |
bool setMidiDriver(const QString& sMidiDriver); |
86 |
|
|
87 |
// MIDI input device. |
// MIDI input device. |
88 |
int midiDevice(); |
int midiDevice() const; |
89 |
bool setMidiDevice(int iMidiDevice); |
bool setMidiDevice(int iMidiDevice); |
90 |
|
|
91 |
// MIDI input port. |
// MIDI input port. |
92 |
int midiPort(); |
int midiPort() const; |
93 |
bool setMidiPort(int iMidiPort); |
bool setMidiPort(int iMidiPort); |
94 |
|
|
95 |
// MIDI input channel. |
// MIDI input channel. |
96 |
int midiChannel(); |
int midiChannel() const; |
97 |
bool setMidiChannel(int iMidiChannel); |
bool setMidiChannel(int iMidiChannel); |
98 |
|
|
99 |
// Audio output driver (DEPRECATED). |
// Audio output driver (DEPRECATED). |
100 |
QString& audioDriver(); |
const QString& audioDriver() const; |
101 |
bool setAudioDriver(const QString& sAudioDriver); |
bool setAudioDriver(const QString& sAudioDriver); |
102 |
|
|
103 |
// Audio output device. |
// Audio output device. |
104 |
int audioDevice(); |
int audioDevice() const; |
105 |
bool setAudioDevice(int iAudioDevice); |
bool setAudioDevice(int iAudioDevice); |
106 |
|
|
107 |
// Sampler channel volume. |
// Sampler channel volume. |
108 |
float volume(); |
float volume() const; |
109 |
bool setVolume(float fVolume); |
bool setVolume(float fVolume); |
110 |
|
|
111 |
|
// Sampler channel mute state. |
112 |
|
bool channelMute() const; |
113 |
|
bool setChannelMute(bool bMute); |
114 |
|
|
115 |
|
// Sampler channel solo state. |
116 |
|
bool channelSolo() const; |
117 |
|
bool setChannelSolo(bool bSolo); |
118 |
|
|
119 |
// Istrument name remapper. |
// Istrument name remapper. |
120 |
void updateInstrumentName(); |
void updateInstrumentName(); |
121 |
|
|
129 |
bool channelReset(); |
bool channelReset(); |
130 |
|
|
131 |
// Message logging methods (brainlessly mapped to main form's). |
// Message logging methods (brainlessly mapped to main form's). |
132 |
void appendMessages (const QString & s); |
void appendMessages (const QString & s) const; |
133 |
void appendMessagesColor (const QString & s, const QString & c); |
void appendMessagesColor (const QString & s, const QString & c) const; |
134 |
void appendMessagesText (const QString & s); |
void appendMessagesText (const QString & s) const; |
135 |
void appendMessagesError (const QString & s); |
void appendMessagesError (const QString & s) const; |
136 |
void appendMessagesClient (const QString & s); |
void appendMessagesClient (const QString & s) const; |
137 |
|
|
138 |
// Context menu event handler. |
// Context menu event handler. |
139 |
void contextMenuEvent(QContextMenuEvent *pEvent); |
void contextMenuEvent(QContextMenuEvent *pEvent); |
141 |
// Common (invalid) name-helpers. |
// Common (invalid) name-helpers. |
142 |
static QString noEngineName(); |
static QString noEngineName(); |
143 |
static QString noInstrumentName(); |
static QString noInstrumentName(); |
144 |
|
static QString loadingInstrument(); |
145 |
|
|
146 |
// Check whether a given file is an instrument file. |
// Check whether a given file is an instrument file. |
147 |
static bool isInstrumentFile (const QString& sInstrumentFile); |
static bool isInstrumentFile (const QString& sInstrumentFile); |
166 |
QString m_sInstrumentFile; |
QString m_sInstrumentFile; |
167 |
int m_iInstrumentNr; |
int m_iInstrumentNr; |
168 |
int m_iInstrumentStatus; |
int m_iInstrumentStatus; |
169 |
QString m_sMidiDriver; // DEPRECATED. |
QString m_sMidiDriver; |
170 |
int m_iMidiDevice; |
int m_iMidiDevice; |
171 |
int m_iMidiPort; |
int m_iMidiPort; |
172 |
int m_iMidiChannel; |
int m_iMidiChannel; |
173 |
QString m_sAudioDriver; // DEPRECATED. |
QString m_sAudioDriver; |
174 |
int m_iAudioDevice; |
int m_iAudioDevice; |
175 |
float m_fVolume; |
float m_fVolume; |
176 |
|
bool m_bMute; |
177 |
|
bool m_bSolo; |
178 |
}; |
}; |
179 |
|
|
180 |
#endif // __qsamplerChannel_h |
#endif // __qsamplerChannel_h |