/[svn]/linuxsampler/trunk/src/plugins/InstrumentEditor.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/plugins/InstrumentEditor.h

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

revision 1658 by schoenebeck, Wed Jan 30 20:22:47 2008 UTC revision 1659 by schoenebeck, Sun Feb 3 00:13:27 2008 UTC
# Line 23  Line 23 
23    
24  #include "../common/global.h"  #include "../common/global.h"
25  #include "../common/Thread.h"  #include "../common/Thread.h"
26    #include "../drivers/midi/VirtualMidiDevice.h"
27    
28  #include <set>  #include <set>
29    
# Line 46  namespace LinuxSampler { Line 47  namespace LinuxSampler {
47       * launch a matching registered editor, by calling the respective       * launch a matching registered editor, by calling the respective
48       * plugin's @c Main() method.       * plugin's @c Main() method.
49       */       */
50      class InstrumentEditor : protected Thread {      class InstrumentEditor : public VirtualMidiDevice, protected Thread {
51      public:      public:
52    
53          /////////////////////////////////////////////////////////////////          /////////////////////////////////////////////////////////////////
# Line 203  namespace LinuxSampler { Line 204  namespace LinuxSampler {
204           */           */
205          void RemoveListener(InstrumentEditorListener* pListener);          void RemoveListener(InstrumentEditorListener* pListener);
206    
   
         /**  
          * Informs the instrument editor that a @e note @e on event occured  
          * (e.g. caused by a MIDI keyboard connected to the sampler).  
          * Communication acts asynchronously, that is this method call doesn't  
          * lock in any way and returns immediately. It is thus realtime safe.  
          *  
          * @e Note: this method is usually only called by the sampler.  
          *  
          * @see ActiveNotesChanged(), NoteIsActive()  
          */  
         void SendNoteOnToEditor(uint8_t Key, uint8_t Velocity);  
   
         /**  
          * Informs the instrument editor that a @e note @e off event occured  
          * (e.g. caused by a MIDI keyboard connected to the sampler).  
          * Communication acts asynchronously, that is this method call doesn't  
          * lock in any way and returns immediately. It is thus realtime safe.  
          *  
          * @e Note: this method is usually only called by the sampler.  
          *  
          * @see ActiveNotesChanged(), NoteIsActive()  
          */  
         void SendNoteOffToEditor(uint8_t Key, uint8_t Velocity);  
   
         /**  
          * Can be called by the instrument editor to check whether a new note  
          * on or note off MIDI event arrived to the sampler during the last  
          * call to this method. So this is a asynchronously, "polling" based  
          * communication mechanism, which works in conjunction with the  
          * NoteIsActive() method call.  
          */  
         bool NotesChanged();  
   
         /**  
          * Can be called by the instrument editor to check whether a new note  
          * on or note off MIDI event arrived to the sampler for @a Key during  
          * the last call to this method. So this is a asynchronously,  
          * "polling" based communication mechanism, which works in  
          * conjunction with the NoteIsActive() method call.  
          */  
         bool NoteChanged(uint8_t Key);  
   
         /**  
          * Can be called by the instrument editor to check which key / note  
          * is currently active by the sampler, e.g. to highlight the  
          * respective keys of a virtual keyboard in the instrument editor.  
          *  
          * @see NotesChanged(), NoteChanged()  
          */  
         bool NoteIsActive(uint8_t Key);  
   
207          /**          /**
208           * Constructor           * Constructor
209           */           */
# Line 274  namespace LinuxSampler { Line 223  namespace LinuxSampler {
223          void*    pInstrument;          void*    pInstrument;
224          String   sTypeName;          String   sTypeName;
225          String   sTypeVersion;          String   sTypeVersion;
         void*    pPrivateData;  
226      };      };
227    
228      /** @brief Instrument Editor Notifications      /** @brief Instrument Editor Notifications

Legend:
Removed from v.1658  
changed lines
  Added in v.1659

  ViewVC Help
Powered by ViewVC