Ignore:
Timestamp:
Mar 12, 2017, 11:26:24 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
sampler
Children:
bde49c4a
Parents:
71f2e5f (diff), 67b6618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge 'origin/master' into sampler

Conflicts:

.travis.yml
Makefile
examples/aubionotes.c
examples/parse_args.h
python/demos/demo_timestretch_online.py
python/lib/moresetuptools.py
python/tests/test_source.py
setup.py
src/io/source.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubionotes.c

    r71f2e5f r41b985f  
    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  }
     
    7070  if (notes == NULL) { ret = 1; goto beach; }
    7171
     72  if (onset_minioi != 0.) {
     73    aubio_notes_set_minioi_ms(notes, onset_minioi);
     74  }
     75  if (onset_threshold != 0.) {
     76    errmsg ("warning: onset threshold not supported yet\n");
     77    //aubio_onset_set_threshold(aubio_notes_get_aubio_onset(o), onset_threshold);
     78  }
     79  if (silence_threshold != -90.) {
     80    if (aubio_notes_set_silence (notes, silence_threshold) != 0) {
     81      errmsg ("failed setting notes silence threshold to %.2f\n",
     82          silence_threshold);
     83    }
     84  }
     85
    7286  examples_common_process((aubio_process_func_t)process_block, process_print);
    7387
    74   // send a last note off
    75   send_noteon (lastmidi, 0);
     88  // send a last note off if required
     89  if (lastmidi) {
     90    send_noteon (lastmidi, 0);
     91  }
    7692
    7793  del_aubio_notes (notes);
Note: See TracChangeset for help on using the changeset viewer.