/[svn]/qsampler/trunk/src/qsamplerChannel.h
ViewVC logotype

Contents of /qsampler/trunk/src/qsamplerChannel.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 371 - (show annotations) (download) (as text)
Fri Feb 11 15:36:06 2005 UTC (14 years, 9 months ago) by capela
File MIME type: text/x-c++hdr
File size: 4672 byte(s)
Instrument names display mode update on all channels.

1 // qsamplerChannel.h
2 //
3 /****************************************************************************
4 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
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
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 *****************************************************************************/
21
22 #ifndef __qsamplerChannel_h
23 #define __qsamplerChannel_h
24
25 #include <qobject.h>
26
27 #include <lscp/client.h>
28 #include <lscp/device.h>
29
30 #include "qsamplerOptions.h"
31
32 class qsamplerMainForm;
33
34
35 //-------------------------------------------------------------------------
36 // qsamplerChannel - Sampler channel structure.
37 //
38
39 class qsamplerChannel
40 {
41 public:
42
43 // Constructor.
44 qsamplerChannel(qsamplerMainForm *pMainForm, int iChannelID = -1);
45 // Default destructor.
46 ~qsamplerChannel();
47
48 // Main application options accessor.
49 qsamplerOptions *options();
50
51 // LSCP client descriptor accessor.
52 lscp_client_t * client();
53
54 // Add/remove sampler channel methods.
55 bool addChannel();
56 bool removeChannel();
57
58 // Sampler channel ID accessors.
59 int channelID();
60 void setChannelID(int iChannelID);
61
62 // Readable channel name.
63 QString channelName();
64
65 // Engine name property.
66 QString& engineName();
67 bool loadEngine(const QString& sEngineName);
68
69 // Instrument file and index.
70 QString& instrumentName();
71 QString& instrumentFile();
72 int instrumentNr();
73 int instrumentStatus();
74 bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);
75
76 // MIDI input driver (DEPRECATED).
77 QString& midiDriver();
78 bool setMidiDriver(const QString& sMidiDriver);
79
80 // MIDI input device.
81 int midiDevice();
82 bool setMidiDevice(int iMidiDevice);
83
84 // MIDI input port.
85 int midiPort();
86 bool setMidiPort(int iMidiPort);
87
88 // MIDI input channel.
89 int midiChannel();
90 bool setMidiChannel(int iMidiChannel);
91
92 // Audio output driver (DEPRECATED).
93 QString& audioDriver();
94 bool setAudioDriver(const QString& sAudioDriver);
95
96 // Audio output device.
97 int audioDevice();
98 bool setAudioDevice(int iAudioDevice);
99
100 // Sampler channel volume.
101 float volume();
102 bool setVolume(float fVolume);
103
104 // Istrument name remapper.
105 void updateInstrumentName();
106
107 // Channel info structure map executive.
108 bool updateChannelInfo();
109
110 // Reset channel method.
111 bool resetChannel();
112
113 // Channel setup dialog form.
114 bool channelSetup(QWidget *pParent);
115
116 // Message logging methods (brainlessly mapped to main form's).
117 void appendMessages (const QString & s);
118 void appendMessagesColor (const QString & s, const QString & c);
119 void appendMessagesText (const QString & s);
120 void appendMessagesError (const QString & s);
121 void appendMessagesClient (const QString & s);
122
123 // Context menu event handler.
124 void contextMenuEvent(QContextMenuEvent *pEvent);
125
126 // Retrieve the available instrument name(s) of an instrument file (.gig).
127 static QString getInstrumentName (const QString& sInstrumentFile,
128 int iInstrumentNr, bool bInstrumentNames);
129 static QStringList getInstrumentList (const QString& sInstrumentFile,
130 bool bInstrumentNames);
131
132 private:
133
134 // Main application form reference.
135 qsamplerMainForm *m_pMainForm;
136
137 // Unique channel identifier.
138 int m_iChannelID;
139
140 // Sampler channel info map.
141 QString m_sEngineName;
142 QString m_sInstrumentName;
143 QString m_sInstrumentFile;
144 int m_iInstrumentNr;
145 int m_iInstrumentStatus;
146 QString m_sMidiDriver; // DEPRECATED.
147 int m_iMidiDevice;
148 int m_iMidiPort;
149 int m_iMidiChannel;
150 QString m_sAudioDriver; // DEPRECATED.
151 int m_iAudioDevice;
152 float m_fVolume;
153 };
154
155 #endif // __qsamplerChannel_h
156
157
158 // end of qsamplerChannel.h

  ViewVC Help
Powered by ViewVC