1 |
// qsamplerChannel.h |
// qsamplerChannel.h |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2003-2004, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2003-2005, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
7 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
69 |
// Instrument file and index. |
// Instrument file and index. |
70 |
QString& instrumentFile(); |
QString& instrumentFile(); |
71 |
int instrumentNr(); |
int instrumentNr(); |
72 |
|
QString& instrumentName(); |
73 |
int instrumentStatus(); |
int instrumentStatus(); |
74 |
bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
75 |
|
// Special instrument file/name/number settler. |
76 |
|
bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); |
77 |
|
|
78 |
// MIDI input driver (DEPRECATED). |
// MIDI input driver (DEPRECATED). |
79 |
QString& midiDriver(); |
QString& midiDriver(); |
80 |
bool setMidiDriver(const QString& sMidiDriver); |
bool setMidiDriver(const QString& sMidiDriver); |
103 |
float volume(); |
float volume(); |
104 |
bool setVolume(float fVolume); |
bool setVolume(float fVolume); |
105 |
|
|
106 |
|
// Istrument name remapper. |
107 |
|
void updateInstrumentName(); |
108 |
|
|
109 |
// Channel info structure map executive. |
// Channel info structure map executive. |
110 |
bool updateChannelInfo(); |
bool updateChannelInfo(); |
111 |
|
|
112 |
// Reset channel method. |
// Reset channel method. |
113 |
bool resetChannel(); |
bool resetChannel(); |
114 |
|
|
115 |
|
// Channel setup dialog form. |
116 |
|
bool channelSetup(QWidget *pParent); |
117 |
|
|
118 |
// Message logging methods (brainlessly mapped to main form's). |
// Message logging methods (brainlessly mapped to main form's). |
119 |
void appendMessages (const QString & s); |
void appendMessages (const QString & s); |
120 |
void appendMessagesColor (const QString & s, const QString & c); |
void appendMessagesColor (const QString & s, const QString & c); |
121 |
void appendMessagesText (const QString & s); |
void appendMessagesText (const QString & s); |
122 |
void appendMessagesError (const QString & s); |
void appendMessagesError (const QString & s); |
123 |
void appendMessagesClient (const QString & s); |
void appendMessagesClient (const QString & s); |
124 |
|
|
125 |
|
// Context menu event handler. |
126 |
|
void contextMenuEvent(QContextMenuEvent *pEvent); |
127 |
|
|
128 |
|
// Common (invalid) name-helpers. |
129 |
|
static QString noEngineName(); |
130 |
|
static QString noInstrumentName(); |
131 |
|
|
132 |
|
// Check whether a given file is an instrument file. |
133 |
|
static bool isInstrumentFile (const QString& sInstrumentFile); |
134 |
|
|
135 |
// Retrieve the available instrument name(s) of an instrument file (.gig). |
// Retrieve the available instrument name(s) of an instrument file (.gig). |
136 |
static QString getInstrumentName (const QString& sInstrumentFile, int iInstrumentNr); |
static QString getInstrumentName (const QString& sInstrumentFile, |
137 |
static QStringList getInstrumentList (const QString& sInstrumentFile); |
int iInstrumentNr, bool bInstrumentNames); |
138 |
|
static QStringList getInstrumentList (const QString& sInstrumentFile, |
139 |
|
bool bInstrumentNames); |
140 |
|
|
141 |
private: |
private: |
142 |
|
|
148 |
|
|
149 |
// Sampler channel info map. |
// Sampler channel info map. |
150 |
QString m_sEngineName; |
QString m_sEngineName; |
151 |
|
QString m_sInstrumentName; |
152 |
QString m_sInstrumentFile; |
QString m_sInstrumentFile; |
153 |
int m_iInstrumentNr; |
int m_iInstrumentNr; |
154 |
int m_iInstrumentStatus; |
int m_iInstrumentStatus; |