Changeset 2293d6a


Ignore:
Timestamp:
Jul 22, 2016, 9:28:15 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
f280ebd
Parents:
1b7f369
Message:

examples/: also emit midi note from aubioonset, thanks to topas-rec (closes #62)

Location:
examples
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioonset.c

    r1b7f369 r2293d6a  
    3838  if ( is_onset ) {
    3939    aubio_wavetable_play ( wavetable );
     40    /* send a midi tap (default to C0) out to the midi output */
     41    if (usejack) send_noteon(miditap_note, miditap_velo);
    4042  } else {
    4143    aubio_wavetable_stop ( wavetable );
     
    7981  examples_common_process((aubio_process_func_t)process_block, process_print);
    8082
     83  // send a last note off
     84  send_noteon (miditap_note, 0);
     85
    8186  del_aubio_onset (o);
    8287  del_aubio_wavetable (wavetable);
  • examples/aubiotrack.c

    r1b7f369 r2293d6a  
    4141  if ( is_beat && !is_silence ) {
    4242    aubio_wavetable_play ( wavetable );
    43     /* Send tap over midi output */
    44     /* Is called without jack use so ask for jack use */
    45     if (usejack)
    46     {
    47        /* Note on midi clock: Midi clock looks like it is more suitable here,
    48        * but it is send 24 times between the detected bpm which is impossible
    49        * to do since we get here only once per peat.
    50        * Therefore midinote is used as a good workaround.
    51        * Reference:
    52        * http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midispec/clock.htm */
    53       send_noteon(0, 0);
    54     }
     43    /* send a midi tap (default to C0) out to the midi output */
     44    if (usejack) send_noteon(miditap_note, miditap_velo);
    5545  } else {
    5646    aubio_wavetable_stop ( wavetable );
     
    9585  examples_common_process((aubio_process_func_t)process_block,process_print);
    9686
     87  // send a last note off
     88  send_noteon (miditap_note, 0);
     89
    9790  del_aubio_tempo(tempo);
    9891  del_aubio_wavetable (wavetable);
  • examples/parse_args.h

    r1b7f369 r2293d6a  
    4848extern smpl_t silence_threshold;
    4949extern uint_t mix_input;
     50// midi tap
     51extern smpl_t miditap_note;
     52extern smpl_t miditap_velo;
    5053
    5154extern uint_t force_overwrite;
  • examples/utils.c

    r1b7f369 r2293d6a  
    6565fvec_t *obuf;
    6666
     67smpl_t miditap_note = 69.;
     68smpl_t miditap_velo = 65.;
     69
    6770/* settings */
    6871int blocks = 0;
Note: See TracChangeset for help on using the changeset viewer.