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> |
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++) |
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) { |
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) { |