shithub: aubio

Download patch

ref: 1186c982db888488e0426adfdc1b2b128c17421d
parent: 90581a84f706d10a73c68075dcbddc3e91930495
author: Paul Brossier <piem@piem.org>
date: Sun Dec 11 11:04:17 EST 2016

examples/: only send a last note off when using jack

--- a/examples/aubionotes.c
+++ b/examples/aubionotes.c
@@ -72,7 +72,9 @@
   examples_common_process((aubio_process_func_t)process_block, process_print);
 
   // send a last note off
-  send_noteon (lastmidi, 0);
+  if (usejack) {
+    send_noteon (lastmidi, 0);
+  }
 
   del_aubio_notes (notes);
 
--- a/examples/aubioonset.c
+++ b/examples/aubioonset.c
@@ -84,7 +84,9 @@
   examples_common_process((aubio_process_func_t)process_block, process_print);
 
   // send a last note off
-  send_noteon (miditap_note, 0);
+  if (usejack) {
+    send_noteon (miditap_note, 0);
+  }
 
   del_aubio_onset (o);
   del_aubio_wavetable (wavetable);
--- a/examples/aubiotrack.c
+++ b/examples/aubiotrack.c
@@ -88,7 +88,9 @@
   examples_common_process((aubio_process_func_t)process_block,process_print);
 
   // send a last note off
-  send_noteon (miditap_note, 0);
+  if (usejack) {
+    send_noteon (miditap_note, 0);
+  }
 
   del_aubio_tempo(tempo);
   del_aubio_wavetable (wavetable);