/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputPort.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInputPort.h

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

revision 2379 by persson, Sat Apr 18 08:17:16 2009 UTC revision 2380 by schoenebeck, Wed Nov 21 21:52:15 2012 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2009 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2012 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 133  namespace LinuxSampler { Line 133  namespace LinuxSampler {
133               * Disconnect the previously connected virtual MIDI device.               * Disconnect the previously connected virtual MIDI device.
134               */               */
135              void Disconnect(VirtualMidiDevice* pDevice);              void Disconnect(VirtualMidiDevice* pDevice);
136                
137                /**
138                 * Registers the given @a filter to be applied against all note on
139                 * events, adjusting their MIDI velocity data. The vector supplied
140                 * here must exactly be either of size 128 or 0. In case the given
141                 * vector is of size 128, it will be used as lookup table by this
142                 * MIDI inpurt port to remap any incoming MIDI note on velocity
143                 * data to the respective value in that vector, or exactly:
144                 * @code
145                 * velocity = filter[velocity];
146                 * @endcode
147                 * Accordingly the values in the vector have to be in the range
148                 * 0..127, however note that a value 0 should actually never be
149                 * used, since by MIDI specification, a note on with velocity 0 is
150                 * interpreted as note off event instead!
151                 *
152                 * If a vector of size 0 is supplied, this note on velocity filter
153                 * mechanism will be disabled.
154                 *
155                 * @param filter - lookup table in the format described above
156                 * @throws MidiInputException - if filter is in invalid format
157                 */
158                void SetNoteOnVelocityFilter(const std::vector<uint8_t>& filter);
159    
160    
161              /////////////////////////////////////////////////////////////////              /////////////////////////////////////////////////////////////////
# Line 341  namespace LinuxSampler { Line 364  namespace LinuxSampler {
364              SynchronizedConfig<std::vector<VirtualMidiDevice*> > virtualMidiDevices;              SynchronizedConfig<std::vector<VirtualMidiDevice*> > virtualMidiDevices;
365              SynchronizedConfig<std::vector<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader;              SynchronizedConfig<std::vector<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader;
366              Mutex virtualMidiDevicesMutex;              Mutex virtualMidiDevicesMutex;
367                SynchronizedConfig<std::vector<uint8_t> > noteOnVelocityFilter;
368                SynchronizedConfig<std::vector<uint8_t> >::Reader noteOnVelocityFilterReader;
369                Mutex noteOnVelocityFilterMutex;
370    
371              /**              /**
372               * Constructor               * Constructor

Legend:
Removed from v.2379  
changed lines
  Added in v.2380

  ViewVC Help
Powered by ViewVC