/[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 341 by capela, Tue Jan 18 11:29:01 2005 UTC revision 484 by capela, Tue Mar 22 12:55:29 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();
47    
48      // Main application options accessor.          // Main application form accessor.
49      qsamplerOptions *options();          qsamplerMainForm *mainForm() const;
50            
51      // LSCP client descriptor accessor.          // Main application options accessor.
52      lscp_client_t * client();          qsamplerOptions *options() const;
53    
54      // Add/remove sampler channel methods.          // LSCP client descriptor accessor.
55      bool     addChannel();          lscp_client_t * client() const;
56      bool     removeChannel();  
57            // Add/remove sampler channel methods.
58      // Sampler channel ID accessors.          bool     addChannel();
59      int      channelID();          bool     removeChannel();
60      void     setChannelID(int iChannelID);  
61                // Sampler channel ID accessors.
62      // Readable channel name.          int      channelID() const;
63      QString  channelName();          void     setChannelID(int iChannelID);
64    
65      // Engine name property.          // Readable channel name.
66      QString& engineName();          QString  channelName() const;
67      bool     loadEngine(const QString& sEngineName);  
68                // Engine name property.
69      // Instrument file and index.          const QString& engineName() const;
70      QString& instrumentFile();          bool     loadEngine(const QString& sEngineName);
71      int      instrumentNr();  
72      int      instrumentStatus();          // Instrument file and index.
73      bool     loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);          const QString& instrumentFile() const;
74                int      instrumentNr() const;
75      // MIDI input driver (DEPRECATED).          const QString& instrumentName() const;
76      QString& midiDriver();          int      instrumentStatus() const;
77      bool     setMidiDriver(const QString& sMidiDriver);          
78                // Instrument file loader.
79      // MIDI input device.          bool     loadInstrument(const QString& sInstrumentFile, int iInstrumentNr);
80      int      midiDevice();          // Special instrument file/name/number settler.
81      bool     setMidiDevice(int iMidiDevice);          bool     setInstrument(const QString& sInstrumentFile, int iInstrumentNr);
82        
83      // MIDI input port.          // MIDI input driver (DEPRECATED).
84      int      midiPort();          const QString& midiDriver() const;
85      bool     setMidiPort(int iMidiPort);          bool     setMidiDriver(const QString& sMidiDriver);
86        
87      // MIDI input channel.          // MIDI input device.
88      int      midiChannel();          int      midiDevice() const;
89      bool     setMidiChannel(int iMidiChannel);          bool     setMidiDevice(int iMidiDevice);
90        
91      // Audio output driver (DEPRECATED).          // MIDI input port.
92      QString& audioDriver();          int      midiPort() const;
93      bool     setAudioDriver(const QString& sAudioDriver);          bool     setMidiPort(int iMidiPort);
94    
95      // Audio output device.          // MIDI input channel.
96      int      audioDevice();          int      midiChannel() const;
97      bool     setAudioDevice(int iAudioDevice);          bool     setMidiChannel(int iMidiChannel);
98        
99      // Sampler channel volume.          // Audio output driver (DEPRECATED).
100      float    volume();          const QString& audioDriver() const;
101      bool     setVolume(float fVolume);          bool     setAudioDriver(const QString& sAudioDriver);
102    
103      // Channel info structure map executive.          // Audio output device.
104      bool     updateChannelInfo();          int      audioDevice() const;
105            bool     setAudioDevice(int iAudioDevice);
106      // Reset channel method.  
107      bool     resetChannel();          // Sampler channel volume.
108            float    volume() const;
109      // Channel setup dialog form.          bool     setVolume(float fVolume);
110      bool     channelSetup(QWidget *pParent);  
111            // Istrument name remapper.
112      // Message logging methods (brainlessly mapped to main form's).          void     updateInstrumentName();
113      void     appendMessages       (const QString & s);  
114      void     appendMessagesColor  (const QString & s, const QString & c);          // Channel info structure map executive.
115      void     appendMessagesText   (const QString & s);          bool     updateChannelInfo();
116      void     appendMessagesError  (const QString & s);  
117      void     appendMessagesClient (const QString & s);          // Channel setup dialog form.
118            bool     channelSetup(QWidget *pParent);
119      // Context menu event handler.  
120      void contextMenuEvent(QContextMenuEvent *pEvent);          // Reset channel method.
121            bool     channelReset();
122      // Retrieve the available instrument name(s) of an instrument file (.gig).  
123      static QString     getInstrumentName (const QString& sInstrumentFile, int iInstrumentNr);          // Message logging methods (brainlessly mapped to main form's).
124      static QStringList getInstrumentList (const QString& sInstrumentFile);          void     appendMessages       (const QString & s) const;
125            void     appendMessagesColor  (const QString & s, const QString & c) const;
126      // Instrument name(s) retrieval mode.          void     appendMessagesText   (const QString & s) const;
127      static bool instrumentNames();          void     appendMessagesError  (const QString & s) const;
128      static void setInstrumentNames (bool bInstrumentNames);          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);
143            static QStringList getInstrumentList (const QString& sInstrumentFile,
144                                                            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_sInstrumentFile;          QString m_sInstrumentName;
157      int     m_iInstrumentNr;          QString m_sInstrumentFile;
158      int     m_iInstrumentStatus;          int     m_iInstrumentNr;
159      QString m_sMidiDriver;          // DEPRECATED.          int     m_iInstrumentStatus;
160      int     m_iMidiDevice;          QString m_sMidiDriver;          // DEPRECATED.
161      int     m_iMidiPort;          int     m_iMidiDevice;
162      int     m_iMidiChannel;          int     m_iMidiPort;
163      QString m_sAudioDriver;         // DEPRECATED.          int     m_iMidiChannel;
164      int     m_iAudioDevice;          QString m_sAudioDriver;         // DEPRECATED.
165      float   m_fVolume;          int     m_iAudioDevice;
166            float   m_fVolume;
     // Retrieve mode for available instrument name(s)  
         // from an instrument file (.gig).  
         static bool g_bInstrumentNames;  
167  };  };
168    
169  #endif  // __qsamplerChannel_h  #endif  // __qsamplerChannel_h

Legend:
Removed from v.341  
changed lines
  Added in v.484

  ViewVC Help
Powered by ViewVC