/[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 674 by letz, Fri Apr 29 14:20:22 2005 UTC revision 675 by schoenebeck, Wed Jun 22 22:09:28 2005 UTC
# 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                midi_chan_t    __GetMidiChannel();
159    
160              Sampler*           pSampler;              Sampler*           pSampler;
161              EngineChannel*     pEngineChannel;              EngineChannel*     pEngineChannel;
162              AudioOutputDevice* pAudioOutputDevice;              AudioOutputDevice* pAudioOutputDevice;
163              MidiInputDevice*   pMidiInputDevice;              MidiInputDevice*   pMidiInputDevice;
             int                midiPort;  
             MidiInputPort::midi_chan_t midiChannel;  
164              int                iIndex;              int                iIndex;
165    
166              friend class Sampler;              friend class Sampler;
167            private:
168                int                iMidiPort;   ///< Don't access directly, read GetMidiInputPort() instead !
169                midi_chan_t        midiChannel; ///< Don't access directly, read GetMidiInputChannel() instead !
170      };      };
171    
172      /** @brief LinuxSampler main class      /** @brief LinuxSampler main class
# Line 175  namespace LinuxSampler { Line 177  namespace LinuxSampler {
177       * sampler channel can individually be deployed with it's own sampler       * sampler channel can individually be deployed with it's own sampler
178       * engine, connected to an arbitrary MIDI input device and connected to       * engine, connected to an arbitrary MIDI input device and connected to
179       * an arbitrary audio output device. Here an example setup:       * an arbitrary audio output device. Here an example setup:
180         * @code
181         * S.Channel.       MIDI in         S.Engine                Audio out
182         * -------------------------------------------------------------------
183         * 0                Alsa    ->      gig::Engine     ->      Jack
184         * 1                VSTi    ->      Akai::Engine    ->      VSTi
185         * 2                Jack    ->      DLS::Engine     ->      Jack
186         * 3                Jack    ->      SF::Engine      ->      Alsa
187       *       *
188       *  S.Channel.      MIDI in         S.Engine                Audio out       * ... (and so on) ...
189       *  -------------------------------------------------------------------       * @endcode
      *  0               Alsa    ->      gig::Engine     ->      Jack  
      *  1               VSTi    ->      Akai::Engine    ->      VSTi  
      *  2               Jack    ->      DLS::Engine     ->      Jack  
      *  3               Jack    ->      SF::Engine      ->      Alsa  
      *  
      *  ... (and so on) ...  
190       *       *
191       * Note that not all audio and MIDI backends and sampler engines listed       * Note that not all audio and MIDI backends and sampler engines listed
192       * in the example above are already implemented!       * in the example above are already implemented!
# Line 192  namespace LinuxSampler { Line 195  namespace LinuxSampler {
195       * several, different audio output and MIDI input systems       * several, different audio output and MIDI input systems
196       * simultaniously at the same time. Here the example setup shown in the       * simultaniously at the same time. Here the example setup shown in the
197       * ascpect of MIDI input and audio output devices / drivers:       * ascpect of MIDI input and audio output devices / drivers:
198       *       * @code
199       *                            ######################### #########################       *                    ######################### #########################
200       *                            # AudioOutputDeviceJack # # AudioOutputDeviceVSTi #       *                    # AudioOutputDeviceJack # # AudioOutputDeviceVSTi #
201       *                            ######################### #########################       *                    ######################### #########################
202       *                                          ^   ^           ^       *                                   ^   ^           ^
203       *    /------------>|Sampler Channel 0|-----/   |           |       *   /------------>|Sampler Channel 0|-----/   |             |
204       *    |  /--------->|Sampler Channel 1|---------------------/       *   |  /--------->|Sampler Channel 1|---------------------/
205       *    |  |    /---->|Sampler Channel 2|---------/       *   |  |    /------>|Sampler Channel 2|---------/
206       *    |  |    |  /->|Sampler Channel 3|------------>#########################       *   |  |    |  /--->|Sampler Channel 3|------------>#########################
207       *    |  |    |  |  ... (and so on) ...             # AudioOutputDeviceAlsa #       *   |  |    |  |    ... (and so on) ...             # AudioOutputDeviceAlsa #
208       *    |  |    |  |                                  #########################       *   |  |    |  |                                    #########################
209       *    |  |    |  \----------------------------------------------------\       *   |  |    |  \-----------------------------------------------------\
210       *    |  |    \-------------------------------------------\           |       *   |  |    \--------------------------------------------\           |
211       *    |  \--------------------\                           |           |       *   |  \--------------------\                            |           |
212       *    |                       |                           |           |       *   |                         |                          |           |
213       *  ####################### ####################### #######################       * ####################### ####################### #######################
214       *  # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack #       * # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack #
215       *  ####################### ####################### #######################       * ####################### ####################### #######################
216         * @endcode
217       *       *
218       * 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
219       * driver / audio output driver) can be connected multiple times to       * driver / audio output driver) can be connected multiple times to

Legend:
Removed from v.674  
changed lines
  Added in v.675

  ViewVC Help
Powered by ViewVC