Changeset 41b985f for examples/aubionotes.c
- Timestamp:
- Mar 12, 2017, 11:26:24 AM (7 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubionotes.c
r71f2e5f r41b985f 35 35 // did we get a note off? 36 36 if (obuf->data[2] != 0) { 37 lastmidi = aubio_freqtomidi (obuf->data[2]) + .5;37 lastmidi = obuf->data[2]; 38 38 send_noteon(lastmidi, 0); 39 39 } 40 40 // did we get a note on? 41 41 if (obuf->data[0] != 0) { 42 lastmidi = aubio_freqtomidi (obuf->data[0]) + .5;42 lastmidi = obuf->data[0]; 43 43 send_noteon(lastmidi, obuf->data[1]); 44 44 } … … 70 70 if (notes == NULL) { ret = 1; goto beach; } 71 71 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 72 86 examples_common_process((aubio_process_func_t)process_block, process_print); 73 87 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 } 76 92 77 93 del_aubio_notes (notes);
Note: See TracChangeset
for help on using the changeset viewer.