Changeset a07fdb4 for examples


Ignore:
Timestamp:
Oct 30, 2018, 12:53:49 PM (6 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
Children:
4724f60
Parents:
f8c5452
Message:

[tools] add release_drop option to aubionotes

Location:
examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/aubionotes.c

    rf8c5452 ra07fdb4  
    2222#define PROG_HAS_PITCH 1
    2323#define PROG_HAS_ONSET 1
     24#define PROG_HAS_NOTES 1
    2425#define PROG_HAS_SILENCE 1
    2526#define PROG_HAS_JACK 1
     
    8384    }
    8485  }
     86  if (release_drop != 10.) {
     87    if (aubio_notes_set_release_drop (notes, release_drop) != 0) {
     88      errmsg ("failed setting notes release drop to %.2f\n",
     89          release_drop);
     90    }
     91  }
    8592
    8693  examples_common_process((aubio_process_func_t)process_block, process_print);
  • examples/parse_args.h

    rf8c5452 ra07fdb4  
    4848// more general stuff
    4949extern smpl_t silence_threshold;
     50extern smpl_t release_drop;
    5051extern uint_t mix_input;
    5152// midi tap
     
    108109      "                 a value in dB, for instance -70, or -100; default=-90\n"
    109110#endif /* PROG_HAS_SILENCE */
     111#ifdef PROG_HAS_NOTES
     112      "       -d      --release-drop     select release drop threshold\n"
     113      "                 a positive value in dB; default=10\n"
     114#endif
    110115      "       -T      --time-format      select time values output format\n"
    111116      "                 (samples, ms, seconds) default=seconds\n"
     
    158163    "s:"
    159164#endif /* PROG_HAS_SILENCE */
     165#ifdef PROG_HAS_NOTES
     166    "d:"
     167#endif /* PROG_HAS_SILENCE */
    160168#ifdef PROG_HAS_OUTPUT
    161169    "mf"
     
    193201    {"silence",               1, NULL, 's'},
    194202#endif /* PROG_HAS_SILENCE */
     203#ifdef PROG_HAS_NOTES
     204    {"release-drop",          1, NULL, 'd'},
     205#endif /* PROG_HAS_NOTES */
    195206    {"time-format",           1, NULL, 'T'},
    196207#ifdef PROG_HAS_OUTPUT
     
    274285      case 's':                /* silence threshold */
    275286        silence_threshold = (smpl_t) atof (optarg);
     287        break;
     288      case 'd':                /* release-drop threshold */
     289        release_drop = (smpl_t) atof (optarg);
    276290        break;
    277291      case 'm':                /* mix_input flag */
  • examples/utils.c

    rf8c5452 ra07fdb4  
    5555// more general stuff
    5656smpl_t silence_threshold = -90.;
     57smpl_t release_drop = 10.;
    5758uint_t mix_input = 0;
    5859
Note: See TracChangeset for help on using the changeset viewer.