summaryrefslogtreecommitdiff
path: root/libs/plugins/reasonablesynth.lv2
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-06-26 17:15:46 +0200
committerRobin Gareus <robin@gareus.org>2016-06-26 17:15:46 +0200
commit741428b6fde72d7d33edd15742948bfcc20f8d01 (patch)
tree73e04c83a7180cf5c5316ce3cf06fef9704f70b4 /libs/plugins/reasonablesynth.lv2
parentb027d9df42196c1abb593e4eff0c400fc06ae264 (diff)
add a debug mode (in synth) to track down lost note-on
Diffstat (limited to 'libs/plugins/reasonablesynth.lv2')
-rw-r--r--libs/plugins/reasonablesynth.lv2/lv2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/plugins/reasonablesynth.lv2/lv2.c b/libs/plugins/reasonablesynth.lv2/lv2.c
index 4698cb9131..bc3715ac4e 100644
--- a/libs/plugins/reasonablesynth.lv2/lv2.c
+++ b/libs/plugins/reasonablesynth.lv2/lv2.c
@@ -153,6 +153,13 @@ run(LV2_Handle handle, uint32_t n_samples)
)
{
if (ev->body.type == self->midi_MidiEvent) {
+#ifdef DEBUG_MIDI_EVENT // debug midi messages in synth -- not rt-safe(!)
+ printf ("%5d (%d):", ev->time.frames, ev->body.size);
+ for (uint8_t i = 0; i < ev->body.size; ++i) {
+ printf (" %02x", ((const uint8_t*)(ev+1))[i]);
+ }
+ printf ("\n");
+#endif
if (written + BUFFER_SIZE_SAMPLES < ev->time.frames
&& ev->time.frames < n_samples) {
/* first synthesize sound up until the message timestamp */