Changeset 6c85b3a


Ignore:
Timestamp:
Dec 17, 2016, 12:16:59 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
Children:
ef55aa0
Parents:
0b6a8a8
Message:

examples/aubionotes.c: use new notes, set minioi, send last note off when needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubionotes.c

    r0b6a8a8 r6c85b3a  
    3535  // did we get a note off?
    3636  if (obuf->data[2] != 0) {
    37     lastmidi = aubio_freqtomidi (obuf->data[2]) + .5;
     37    lastmidi = obuf->data[2];
    3838    send_noteon(lastmidi, 0);
    3939  }
    4040  // did we get a note on?
    4141  if (obuf->data[0] != 0) {
    42     lastmidi = aubio_freqtomidi (obuf->data[0]) + .5;
     42    lastmidi = obuf->data[0];
    4343    send_noteon(lastmidi, obuf->data[1]);
    4444  }
     
    7171
    7272  if (onset_minioi != 0.) {
    73     errmsg ("warning: onset minioio not supported yet\n");
    74     //aubio_onset_set_minioi_ms(aubio_notes_get_aubio_onset(o), onset_minioi);
     73    aubio_notes_set_minioi_ms(notes, onset_minioi);
    7574  }
    7675  if (onset_threshold != 0.) {
     
    8786  examples_common_process((aubio_process_func_t)process_block, process_print);
    8887
    89   // send a last note off
    90   if (usejack) {
     88  // send a last note off if required
     89  if (lastmidi) {
    9190    send_noteon (lastmidi, 0);
    9291  }
Note: See TracChangeset for help on using the changeset viewer.