/[svn]/gigedit/trunk/src/plugin/linuxsamplerplugin.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/plugin/linuxsamplerplugin.cpp

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

revision 1664 by schoenebeck, Mon Feb 4 00:40:03 2008 UTC revision 1680 by schoenebeck, Tue Feb 12 14:14:26 2008 UTC
# Line 21  Line 21 
21    
22  #include <linuxsampler/plugins/InstrumentEditorFactory.h>  #include <linuxsampler/plugins/InstrumentEditorFactory.h>
23  #include "../gigedit/gigedit.h"  #include "../gigedit/gigedit.h"
24    #include "../gigedit/global.h"
25    
26  #include <iostream>  #include <iostream>
27  #include <sigc++/bind.h>  #include <sigc++/bind.h>
# Line 123  int LinuxSamplerPlugin::Main(void* pInst Line 124  int LinuxSamplerPlugin::Main(void* pInst
124  }  }
125    
126  bool LinuxSamplerPlugin::__onPollPeriod() {  bool LinuxSamplerPlugin::__onPollPeriod() {
127        #if HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE
128      GigEdit* app = (GigEdit*) pApp;      GigEdit* app = (GigEdit*) pApp;
129      if (!NotesChanged()) return true;      if (!NotesChanged()) return true;
130      for (int iKey = 0; iKey < 128; iKey++)      for (int iKey = 0; iKey < 128; iKey++)
# Line 131  bool LinuxSamplerPlugin::__onPollPeriod( Line 133  bool LinuxSamplerPlugin::__onPollPeriod(
133                  app->on_note_on_event(iKey, NoteOnVelocity(iKey)) :                  app->on_note_on_event(iKey, NoteOnVelocity(iKey)) :
134                  app->on_note_off_event(iKey, NoteOffVelocity(iKey));                  app->on_note_off_event(iKey, NoteOffVelocity(iKey));
135      return true;      return true;
136        #else
137        return false;
138        #endif
139  }  }
140    
141  void LinuxSamplerPlugin::__onSamplesToBeRemoved(std::list<gig::Sample*> lSamples) {  void LinuxSamplerPlugin::__onSamplesToBeRemoved(std::list<gig::Sample*> lSamples) {
# Line 145  void LinuxSamplerPlugin::__onSamplesToBe Line 150  void LinuxSamplerPlugin::__onSamplesToBe
150  }  }
151    
152  void LinuxSamplerPlugin::__onVirtualKeyboardKeyHit(int Key, int Velocity) {  void LinuxSamplerPlugin::__onVirtualKeyboardKeyHit(int Key, int Velocity) {
153        #if HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE
154      SendNoteOnToSampler(Key, Velocity);      SendNoteOnToSampler(Key, Velocity);
155        #endif
156  }  }
157    
158  void LinuxSamplerPlugin::__onVirtualKeyboardKeyReleased(int Key, int Velocity) {  void LinuxSamplerPlugin::__onVirtualKeyboardKeyReleased(int Key, int Velocity) {
159        #if HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE
160      SendNoteOffToSampler(Key, Velocity);      SendNoteOffToSampler(Key, Velocity);
161        #endif
162  }  }
163    
164  bool LinuxSamplerPlugin::IsTypeSupported(String sTypeName, String sTypeVersion) {  bool LinuxSamplerPlugin::IsTypeSupported(String sTypeName, String sTypeVersion) {

Legend:
Removed from v.1664  
changed lines
  Added in v.1680

  ViewVC Help
Powered by ViewVC