Changeset 9562f08 for examples/utils.c


Ignore:
Timestamp:
Jul 22, 2016, 9:30:31 PM (8 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, pitchshift, sampler, timestretch, yinfft+
Children:
65fc06f
Parents:
f280ebd
Message:

examples/utils.c: change send_noteon to accept floating point midi note number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rf280ebd r9562f08  
    182182
    183183void
    184 send_noteon (int pitch, int velo)
    185 {
    186   smpl_t mpitch = floor (aubio_freqtomidi (pitch) + .5);
     184send_noteon (smpl_t pitch, smpl_t velo)
     185{
    187186#ifdef HAVE_JACK
    188187  jack_midi_event_t ev;
     
    192191  if (usejack) {
    193192    ev.buffer[2] = velo;
    194     ev.buffer[1] = mpitch;
     193    ev.buffer[1] = pitch;
    195194    if (velo == 0) {
    196195      ev.buffer[0] = 0x80;      /* note off */
     
    205204    outmsg ("\n");
    206205  } else {
    207     outmsg ("%f\t", mpitch);
     206    outmsg ("%f\t", pitch);
    208207    print_time (blocks * hop_size);
    209208    outmsg ("\t");
Note: See TracChangeset for help on using the changeset viewer.