/[svn]/linuxsampler/trunk/src/Sampler.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/Sampler.h

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

revision 502 by letz, Fri Apr 29 14:20:22 2005 UTC revision 840 by persson, Sun Feb 26 13:00:08 2006 UTC
# Line 39  namespace LinuxSampler { Line 39  namespace LinuxSampler {
39    
40      /** @brief LinuxSampler sampler channel      /** @brief LinuxSampler sampler channel
41       *       *
42       * Encapsulates a channel of a specific sampler engine typ, one       * Encapsulates a channel of a specific sampler engine type, one
43       * connection to a MIDI input device and one connection to an audio       * connection to a MIDI input device and one connection to an audio
44       * output device. You cannot create an instance of this class on your       * output device. You cannot create an instance of this class on your
45       * own, you have to use the AddSamplerChannel() method of the Sampler       * own, you have to use the AddSamplerChannel() method of the Sampler
# Line 87  namespace LinuxSampler { Line 87  namespace LinuxSampler {
87               *               *
88               * @param MidiChannel - MIDI channel to listen               * @param MidiChannel - MIDI channel to listen
89               */               */
90              void SetMidiInputChannel(MidiInputPort::midi_chan_t MidiChannel);              void SetMidiInputChannel(midi_chan_t MidiChannel);
91    
92              /**              /**
93               * Connect this sampler channel to a MIDI input triplet.               * Connect this sampler channel to a MIDI input triplet.
# Line 98  namespace LinuxSampler { Line 98  namespace LinuxSampler {
98               *                      sampler channel should listen to               *                      sampler channel should listen to
99               *                      (default: listen on all MIDI channels)               *                      (default: listen on all MIDI channels)
100               */               */
101              void SetMidiInput(MidiInputDevice* pDevice, int iMidiPort, MidiInputPort::midi_chan_t MidiChannel = MidiInputPort::midi_chan_all);              void SetMidiInput(MidiInputDevice* pDevice, int iMidiPort, midi_chan_t MidiChannel = midi_chan_all);
102    
103              /**              /**
104               * Returns the EngineChannel object that was deployed on this               * Returns the EngineChannel object that was deployed on this
# Line 115  namespace LinuxSampler { Line 115  namespace LinuxSampler {
115               * @returns  The MIDI input channel on which the sampler               * @returns  The MIDI input channel on which the sampler
116               *           channel is listening to.               *           channel is listening to.
117               */               */
118              MidiInputPort::midi_chan_t GetMidiInputChannel();              midi_chan_t GetMidiInputChannel();
119    
120              /**              /**
121               * Returns the MIDI input port number to which this sampler               * Returns the MIDI input port number to which this sampler
# Line 154  namespace LinuxSampler { Line 154  namespace LinuxSampler {
154              virtual ~SamplerChannel();              virtual ~SamplerChannel();
155    
156              /** Getting MIDI input device port given its index number. */              /** Getting MIDI input device port given its index number. */
157              MidiInputPort* GetMidiInputDevicePort(int iMidiPort);              MidiInputPort* __GetMidiInputDevicePort(int iMidiPort);
158    
159              Sampler*           pSampler;              Sampler*           pSampler;
160              EngineChannel*     pEngineChannel;              EngineChannel*     pEngineChannel;
161              AudioOutputDevice* pAudioOutputDevice;              AudioOutputDevice* pAudioOutputDevice;
162              MidiInputDevice*   pMidiInputDevice;              MidiInputDevice*   pMidiInputDevice;
             int                midiPort;  
             MidiInputPort::midi_chan_t midiChannel;  
163              int                iIndex;              int                iIndex;
164    
165              friend class Sampler;              friend class Sampler;
166            private:
167                int                iMidiPort;   ///< Don't access directly, read GetMidiInputPort() instead !
168                midi_chan_t        midiChannel; ///< Don't access directly, read GetMidiInputChannel() instead !
169      };      };
170    
171      /** @brief LinuxSampler main class      /** @brief LinuxSampler main class
# Line 175  namespace LinuxSampler { Line 176  namespace LinuxSampler {
176       * sampler channel can individually be deployed with it's own sampler       * sampler channel can individually be deployed with it's own sampler
177       * engine, connected to an arbitrary MIDI input device and connected to       * engine, connected to an arbitrary MIDI input device and connected to
178       * an arbitrary audio output device. Here an example setup:       * an arbitrary audio output device. Here an example setup:
179         * @code
180         * S.Channel.       MIDI in         S.Engine                Audio out
181         * -------------------------------------------------------------------
182         * 0                Alsa    ->      gig::Engine     ->      Jack
183         * 1                VSTi    ->      Akai::Engine    ->      VSTi
184         * 2                Jack    ->      DLS::Engine     ->      Jack
185         * 3                Jack    ->      SF::Engine      ->      Alsa
186       *       *
187       *  S.Channel.      MIDI in         S.Engine                Audio out       * ... (and so on) ...
188       *  -------------------------------------------------------------------       * @endcode
      *  0               Alsa    ->      gig::Engine     ->      Jack  
      *  1               VSTi    ->      Akai::Engine    ->      VSTi  
      *  2               Jack    ->      DLS::Engine     ->      Jack  
      *  3               Jack    ->      SF::Engine      ->      Alsa  
      *  
      *  ... (and so on) ...  
189       *       *
190       * Note that not all audio and MIDI backends and sampler engines listed       * Note that not all audio and MIDI backends and sampler engines listed
191       * in the example above are already implemented!       * in the example above are already implemented!
# Line 192  namespace LinuxSampler { Line 194  namespace LinuxSampler {
194       * several, different audio output and MIDI input systems       * several, different audio output and MIDI input systems
195       * simultaniously at the same time. Here the example setup shown in the       * simultaniously at the same time. Here the example setup shown in the
196       * ascpect of MIDI input and audio output devices / drivers:       * ascpect of MIDI input and audio output devices / drivers:
197       *       * @code
198       *                            ######################### #########################       *                    ######################### #########################
199       *                            # AudioOutputDeviceJack # # AudioOutputDeviceVSTi #       *                    # AudioOutputDeviceJack # # AudioOutputDeviceVSTi #
200       *                            ######################### #########################       *                    ######################### #########################
201       *                                          ^   ^           ^       *                                   ^   ^           ^
202       *    /------------>|Sampler Channel 0|-----/   |           |       *   /------------>|Sampler Channel 0|-----/   |             |
203       *    |  /--------->|Sampler Channel 1|---------------------/       *   |  /--------->|Sampler Channel 1|---------------------/
204       *    |  |    /---->|Sampler Channel 2|---------/       *   |  |    /------>|Sampler Channel 2|---------/
205       *    |  |    |  /->|Sampler Channel 3|------------>#########################       *   |  |    |  /--->|Sampler Channel 3|------------>#########################
206       *    |  |    |  |  ... (and so on) ...             # AudioOutputDeviceAlsa #       *   |  |    |  |    ... (and so on) ...             # AudioOutputDeviceAlsa #
207       *    |  |    |  |                                  #########################       *   |  |    |  |                                    #########################
208       *    |  |    |  \----------------------------------------------------\       *   |  |    |  \-----------------------------------------------------\
209       *    |  |    \-------------------------------------------\           |       *   |  |    \--------------------------------------------\           |
210       *    |  \--------------------\                           |           |       *   |  \--------------------\                            |           |
211       *    |                       |                           |           |       *   |                         |                          |           |
212       *  ####################### ####################### #######################       * ####################### ####################### #######################
213       *  # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack #       * # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack #
214       *  ####################### ####################### #######################       * ####################### ####################### #######################
215         * @endcode
216       *       *
217       * As you can see in this example setup, one device (that is midi input       * As you can see in this example setup, one device (that is midi input
218       * driver / audio output driver) can be connected multiple times to       * driver / audio output driver) can be connected multiple times to
# Line 339  namespace LinuxSampler { Line 342  namespace LinuxSampler {
342              void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (LinuxSamplerException);              void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (LinuxSamplerException);
343    
344              /**              /**
345                 * Gets the current number of all active voices.
346                 * @returns The current number of all active voices.
347                 */
348                int GetVoiceCount();
349    
350                /**
351               * Reset the whole sampler. Destroy all engines, sampler               * Reset the whole sampler. Destroy all engines, sampler
352               * channels, MIDI input devices and audio output devices.               * channels, MIDI input devices and audio output devices.
353               */               */

Legend:
Removed from v.502  
changed lines
  Added in v.840

  ViewVC Help
Powered by ViewVC