#include "utils.h"
#define PROG_HAS_PITCH 1
#define PROG_HAS_ONSET 1
#define PROG_HAS_NOTES 1
#define PROG_HAS_SILENCE 1
#define PROG_HAS_JACK 1
#include "parse_args.h"
{
if (obuf->
data[2] != 0) {
lastmidi = obuf->
data[2];
send_noteon(lastmidi, 0);
}
if (obuf->
data[0] != 0) {
lastmidi = obuf->
data[0];
send_noteon(lastmidi, obuf->
data[1]);
}
}
void process_print (void)
{
}
int main(int argc, char **argv) {
int ret = 0;
examples_common_init(argc,argv);
verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
verbmsg ("onset method: %s, ", onset_method);
verbmsg ("buffer_size: %d, ", buffer_size);
verbmsg ("hop_size: %d, ", hop_size);
verbmsg ("threshold: %f\n", onset_threshold);
verbmsg ("pitch method: %s, ", pitch_method);
verbmsg ("buffer_size: %d, ", buffer_size * 4);
verbmsg ("hop_size: %d, ", hop_size);
verbmsg ("tolerance: %f\n", pitch_tolerance);
if (notes == NULL) { ret = 1; goto beach; }
if (onset_minioi != 0.) {
}
if (onset_threshold != 0.) {
errmsg ("warning: onset threshold not supported yet\n");
}
if (silence_threshold != -90.) {
errmsg ("failed setting notes silence threshold to %.2f\n",
silence_threshold);
}
}
if (release_drop != 10.) {
errmsg ("failed setting notes release drop to %.2f\n",
release_drop);
}
}
examples_common_process(process_block, process_print);
if (lastmidi) {
send_noteon (lastmidi, 0);
}
beach:
examples_common_del();
return ret;
}
uint_t aubio_notes_set_minioi_ms(aubio_notes_t *o, smpl_t minioi_ms)
set notes detection minimum inter-onset interval, in millisecond
void aubio_notes_do(aubio_notes_t *o, const fvec_t *input, fvec_t *output)
execute note detection on an input signal frame
uint_t aubio_notes_set_release_drop(aubio_notes_t *o, smpl_t release_drop)
set note release drop level, in dB
void del_aubio_notes(aubio_notes_t *o)
delete notes detection object
aubio_notes_t * new_aubio_notes(const char_t *method, uint_t buf_size, uint_t hop_size, uint_t samplerate)
create notes detection object
uint_t aubio_notes_set_silence(aubio_notes_t *o, smpl_t silence)
set notes detection silence threshold
struct _aubio_notes_t aubio_notes_t
notes detection object
smpl_t * data
data vector of length fvec_t.length
float smpl_t
short sample format (32 or 64 bits)