2 Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
4 This file is part of aubio.
6 aubio is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 aubio is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with aubio. If not, see <http://www.gnu.org/licenses/>.
26 #include <stdio.h> // for fprintf
29 #include <stdlib.h> // for exit
32 #include <unistd.h> // for access
33 #elif defined(HAVE_WIN_HACKS)
35 #define access _access
39 #include <math.h> // for isfinite
42 #include <string.h> // for strcmp
45 #ifdef HAVE_C99_VARARGS_MACROS
47 #define debug(...) fprintf (stderr, __VA_ARGS__)
51 #define verbmsg(...) if (verbose) fprintf (stderr, __VA_ARGS__)
52 #define errmsg(...) fprintf (stderr, __VA_ARGS__)
53 #define outmsg(...) fprintf (stdout, __VA_ARGS__)
56 #define debug(...) fprintf (stderr, format , **args)
60 #define verbmsg(format, args...) if (verbose) fprintf(stderr, format , ##args)
61 #define errmsg(format, args...) fprintf(stderr, format , ##args)
62 #define outmsg(format, args...) fprintf(stdout, format , ##args)
65 typedef void (aubio_print_func_t) (void);
66 void send_noteon (smpl_t pitch, smpl_t velo);
68 /** common process function */
69 typedef void (*aubio_process_func_t) (fvec_t * input, fvec_t * output);
71 void process_block (fvec_t *ibuf, fvec_t *obuf);
72 void process_print (void);
74 void print_time (uint_t samples);