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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 371 by capela, Fri Feb 11 15:36:06 2005 UTC revision 490 by capela, Fri Apr 1 00:34:58 2005 UTC
# Line 40  class qsamplerChannel Line 40  class qsamplerChannel
40  {  {
41  public:  public:
42    
43      // Constructor.          // Constructor.
44      qsamplerChannel(qsamplerMainForm *pMainForm, int iChannelID = -1);          qsamplerChannel(qsamplerMainForm *pMainForm, int iChannelID = -1);
45      // Default destructor.          // Default destructor.
46      ~qsamplerChannel();          ~qsamplerChannel();
   
     // Main application options accessor.  
     qsamplerOptions *options();  
   
     // LSCP client descriptor accessor.  
     lscp_client_t * client();  
   
     // Add/remove sampler channel methods.  
     bool     addChannel();  
     bool     removeChannel();  
   
     // Sampler channel ID accessors.  
     int      channelID();  
     void     setChannelID(int iChannelID);  
       
     // Readable channel name.  
     QString  channelName();  
   
     // Engine name property.  
     QString& engineName();  
     bool     loadEngine(const QString& sEngineName);  
       
     // Instrument file and index.  
     QString& instrumentName();  
     QString& instrumentFile();  
     int      instrumentNr();  
     int      instrumentStatus();  
     bool     loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);  
   
     // MIDI input driver (DEPRECATED).  
     QString& midiDriver();  
     bool     setMidiDriver(const QString& sMidiDriver);  
       
     // MIDI input device.  
     int      midiDevice();  
     bool     setMidiDevice(int iMidiDevice);  
       
     // MIDI input port.  
     int      midiPort();  
     bool     setMidiPort(int iMidiPort);  
       
     // MIDI input channel.  
     int      midiChannel();  
     bool     setMidiChannel(int iMidiChannel);  
       
     // Audio output driver (DEPRECATED).  
     QString& audioDriver();  
     bool     setAudioDriver(const QString& sAudioDriver);  
   
     // Audio output device.  
     int      audioDevice();  
     bool     setAudioDevice(int iAudioDevice);  
       
     // Sampler channel volume.  
     float    volume();  
     bool     setVolume(float fVolume);  
   
     // Istrument name remapper.  
     void     updateInstrumentName();  
   
     // Channel info structure map executive.  
     bool     updateChannelInfo();  
   
     // Reset channel method.  
     bool     resetChannel();  
   
     // Channel setup dialog form.  
     bool     channelSetup(QWidget *pParent);  
   
     // Message logging methods (brainlessly mapped to main form's).  
     void     appendMessages       (const QString & s);  
     void     appendMessagesColor  (const QString & s, const QString & c);  
     void     appendMessagesText   (const QString & s);  
     void     appendMessagesError  (const QString & s);  
     void     appendMessagesClient (const QString & s);  
47    
48      // Context menu event handler.          // Main application form accessor.
49      void contextMenuEvent(QContextMenuEvent *pEvent);          qsamplerMainForm *mainForm() const;
50    
51      // Retrieve the available instrument name(s) of an instrument file (.gig).          // Main application options accessor.
52      static QString     getInstrumentName (const QString& sInstrumentFile,          qsamplerOptions *options() const;
53    
54            // LSCP client descriptor accessor.
55            lscp_client_t * client() const;
56    
57            // Add/remove sampler channel methods.
58            bool     addChannel();
59            bool     removeChannel();
60    
61            // Sampler channel ID accessors.
62            int      channelID() const;
63            void     setChannelID(int iChannelID);
64    
65            // Readable channel name.
66            QString  channelName() const;
67    
68            // Engine name property.
69            const QString& engineName() const;
70            bool     loadEngine(const QString& sEngineName);
71    
72            // Instrument file and index.
73            const QString& instrumentFile() const;
74            int      instrumentNr() const;
75            const QString& instrumentName() const;
76            int      instrumentStatus() const;
77    
78            // Instrument file loader.
79            bool     loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);
80            // Special instrument file/name/number settler.
81            bool     setInstrument(const QString& sInstrumentFile, int iInstrumentNr);
82    
83            // MIDI input driver (DEPRECATED).
84            const QString& midiDriver() const;
85            bool     setMidiDriver(const QString& sMidiDriver);
86    
87            // MIDI input device.
88            int      midiDevice() const;
89            bool     setMidiDevice(int iMidiDevice);
90    
91            // MIDI input port.
92            int      midiPort() const;
93            bool     setMidiPort(int iMidiPort);
94    
95            // MIDI input channel.
96            int      midiChannel() const;
97            bool     setMidiChannel(int iMidiChannel);
98    
99            // Audio output driver (DEPRECATED).
100            const QString& audioDriver() const;
101            bool     setAudioDriver(const QString& sAudioDriver);
102    
103            // Audio output device.
104            int      audioDevice() const;
105            bool     setAudioDevice(int iAudioDevice);
106    
107            // Sampler channel volume.
108            float    volume() const;
109            bool     setVolume(float fVolume);
110    
111            // Istrument name remapper.
112            void     updateInstrumentName();
113    
114            // Channel info structure map executive.
115            bool     updateChannelInfo();
116    
117            // Channel setup dialog form.
118            bool     channelSetup(QWidget *pParent);
119    
120            // Reset channel method.
121            bool     channelReset();
122    
123            // Message logging methods (brainlessly mapped to main form's).
124            void     appendMessages       (const QString & s) const;
125            void     appendMessagesColor  (const QString & s, const QString & c) const;
126            void     appendMessagesText   (const QString & s) const;
127            void     appendMessagesError  (const QString & s) const;
128            void     appendMessagesClient (const QString & s) const;
129    
130            // Context menu event handler.
131            void contextMenuEvent(QContextMenuEvent *pEvent);
132    
133            // Common (invalid) name-helpers.
134            static QString noEngineName();
135            static QString noInstrumentName();
136    
137            // Check whether a given file is an instrument file.
138            static bool isInstrumentFile (const QString& sInstrumentFile);
139    
140            // Retrieve the available instrument name(s) of an instrument file (.gig).
141            static QString getInstrumentName (const QString& sInstrumentFile,
142                                                          int iInstrumentNr, bool bInstrumentNames);                                                          int iInstrumentNr, bool bInstrumentNames);
143      static QStringList getInstrumentList (const QString& sInstrumentFile,          static QStringList getInstrumentList (const QString& sInstrumentFile,
144                                                          bool bInstrumentNames);                                                          bool bInstrumentNames);
145    
146  private:  private:
147    
148      // Main application form reference.          // Main application form reference.
149      qsamplerMainForm *m_pMainForm;          qsamplerMainForm *m_pMainForm;
150    
151      // Unique channel identifier.          // Unique channel identifier.
152      int     m_iChannelID;          int     m_iChannelID;
153    
154      // Sampler channel info map.          // Sampler channel info map.
155      QString m_sEngineName;          QString m_sEngineName;
156      QString m_sInstrumentName;          QString m_sInstrumentName;
157      QString m_sInstrumentFile;          QString m_sInstrumentFile;
158      int     m_iInstrumentNr;          int     m_iInstrumentNr;
159      int     m_iInstrumentStatus;          int     m_iInstrumentStatus;
160      QString m_sMidiDriver;          // DEPRECATED.          QString m_sMidiDriver;
161      int     m_iMidiDevice;          int     m_iMidiDevice;
162      int     m_iMidiPort;          int     m_iMidiPort;
163      int     m_iMidiChannel;          int     m_iMidiChannel;
164      QString m_sAudioDriver;         // DEPRECATED.          QString m_sAudioDriver;
165      int     m_iAudioDevice;          int     m_iAudioDevice;
166      float   m_fVolume;          float   m_fVolume;
167  };  };
168    
169  #endif  // __qsamplerChannel_h  #endif  // __qsamplerChannel_h

Legend:
Removed from v.371  
changed lines
  Added in v.490

  ViewVC Help
Powered by ViewVC