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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 264 - (hide annotations) (download) (as text)
Wed Sep 29 13:12:45 2004 UTC (19 years, 6 months ago) by capela
File MIME type: text/x-c++hdr
File size: 3881 byte(s)
Initial rewrite of sampler channel strips internal control structures.

1 capela 264 // qsamplerChannel.h
2     //
3     /****************************************************************************
4     Copyright (C) 2003-2004, 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     // Sampler channel ID accessors.
55     int channelID();
56     void setChannelID(int iChannelID);
57    
58     // Engine name property.
59     QString& engineName();
60     bool loadEngine(const QString& sEngineName);
61    
62     // Instrument file and index.
63     QString& instrumentFile();
64     int instrumentNr();
65     int instrumentStatus();
66     bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);
67    
68     // MIDI input driver (DEPRECATED).
69     QString& midiDriver();
70     bool setMidiDriver(const QString& sMidiDriver);
71    
72     // MIDI input device.
73     int midiDevice();
74     bool setMidiDevice(int iMidiDevice);
75    
76     // MIDI input port.
77     int midiPort();
78     bool setMidiPort(int iMidiPort);
79    
80     // MIDI input channel.
81     int midiChannel();
82     bool setMidiChannel(int iMidiChannel);
83    
84     // Audio output driver (DEPRECATED).
85     QString& audioDriver();
86     bool setAudioDriver(const QString& sAudioDriver);
87    
88     // Audio output device.
89     int audioDevice();
90     bool setAudioDevice(int iAudioDevice);
91    
92     // Sampler channel volume.
93     float volume();
94     bool setVolume(float fVolume);
95    
96     // Channel info structure map executive.
97     void updateChannelInfo();
98    
99     // Reset channel method.
100     void resetChannel();
101    
102     // Message logging methods (brainlessly mapped to main form's).
103     void appendMessages (const QString & s);
104     void appendMessagesColor (const QString & s, const QString & c);
105     void appendMessagesText (const QString & s);
106     void appendMessagesError (const QString & s);
107     void appendMessagesClient (const QString & s);
108    
109     private:
110    
111     // Main application form reference.
112     qsamplerMainForm *m_pMainForm;
113    
114     // Unique channel identifier.
115     int m_iChannelID;
116    
117     // Sampler channel info map.
118     QString m_sEngineName;
119     QString m_sInstrumentFile;
120     int m_iInstrumentNr;
121     int m_iInstrumentStatus;
122     QString m_sMidiDriver; // DEPRECATED.
123     int m_iMidiDevice;
124     int m_iMidiPort;
125     int m_iMidiChannel;
126     QString m_sAudioDriver; // DEPRECATED.
127     int m_iAudioDevice;
128     float m_fVolume;
129     };
130    
131     #endif // __qsamplerChannel_h
132    
133    
134     // end of qsamplerChannel.h

  ViewVC Help
Powered by ViewVC