Changeset 50bc5f2 for examples/utils.h
- Timestamp:
- Sep 25, 2009, 7:08:59 AM (15 years ago)
- 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:
- 04ceeab
- Parents:
- c3f4173
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.h
rc3f4173 r50bc5f2 1 1 /* 2 Copyright (C) 2003 Paul Brossier 2 Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org> 3 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 4 This file is part of aubio. 8 5 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details.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. 13 10 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 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. 15 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/>. 18 18 19 */ 19 20 … … 23 24 #include <getopt.h> 24 25 #include <unistd.h> 25 #include <math.h> 26 #include <math.h> /* for isfinite */ 26 27 #include <aubio.h> 27 28 #include <aubioext.h> … … 44 45 extern int frames_delay; 45 46 extern unsigned int median; 46 extern const char * 47 extern const char * 47 extern const char *output_filename; 48 extern const char *input_filename; 48 49 /* defined in utils.c */ 49 50 void usage (FILE * stream, int exit_code); 50 51 int parse_args (int argc, char **argv); 51 void examples_common_init (int argc, char **argv);52 void examples_common_del (void);53 typedef void (aubio_print_func_t) (void);52 void examples_common_init (int argc, char **argv); 53 void examples_common_del (void); 54 typedef void (aubio_print_func_t) (void); 54 55 #ifndef HAVE_JACK 55 56 typedef int (*aubio_process_func_t) 56 (smpl_t **input, smpl_t **output, int nframes);57 (smpl_t ** input, smpl_t ** output, int nframes); 57 58 #endif 58 void examples_common_process(aubio_process_func_t process_func, aubio_print_func_t print); 59 void flush_process(aubio_process_func_t process_func, aubio_print_func_t print); 59 void examples_common_process (aubio_process_func_t process_func, 60 aubio_print_func_t print); 61 void flush_process (aubio_process_func_t process_func, 62 aubio_print_func_t print); 60 63 61 64 62 void send_noteon (int pitch, int velo);65 void send_noteon (int pitch, int velo); 63 66 /** append new note candidate to the note_buffer and return filtered value. we 64 67 * need to copy the input array as vec_median destroy its input data.*/ 65 void note_append (fvec_t * note_buffer, smpl_t curnote);66 uint_t get_note (fvec_t *note_buffer, fvec_t *note_buffer2);68 void note_append (fvec_t * note_buffer, smpl_t curnote); 69 uint_t get_note (fvec_t * note_buffer, fvec_t * note_buffer2); 67 70 68 extern const char * 69 extern const char * 70 extern const char * 71 extern const char *output_filename; 72 extern const char *input_filename; 73 extern const char *onset_filename; 71 74 extern int verbose; 72 75 extern int usejack; … … 85 88 86 89 87 extern aubio_sndfile_t * 88 extern aubio_sndfile_t * 90 extern aubio_sndfile_t *file; 91 extern aubio_sndfile_t *fileout; 89 92 90 extern aubio_pvoc_t * 91 extern fvec_t * 92 extern fvec_t * 93 extern cvec_t * 94 extern fvec_t * 93 extern aubio_pvoc_t *pv; 94 extern fvec_t *ibuf; 95 extern fvec_t *obuf; 96 extern cvec_t *fftgrain; 97 extern fvec_t *woodblock; 95 98 extern aubio_onsetdetection_t *o; 96 99 extern aubio_onsetdetection_t *o2; … … 98 101 extern fvec_t *onset2; 99 102 extern int isonset; 100 extern aubio_pickpeak_t * 103 extern aubio_pickpeak_t *parms; 101 104 102 105 103 106 /* pitch objects */ 104 107 extern smpl_t pitch; 105 extern aubio_pitchdetection_t * 108 extern aubio_pitchdetection_t *pitchdet; 106 109 extern aubio_pitchdetection_type mode; 107 110 extern uint_t median; 108 111 109 extern fvec_t * 110 extern fvec_t * 112 extern fvec_t *note_buffer; 113 extern fvec_t *note_buffer2; 111 114 extern smpl_t curlevel; 112 115 extern smpl_t maxonset; 113 116 114 117 /* midi objects */ 115 extern aubio_midi_player_t * mplay;116 extern aubio_midi_driver_t * mdriver;117 extern aubio_midi_event_t *event;118 extern aubio_midi_player_t *mplay; 119 extern aubio_midi_driver_t *mdriver; 120 extern aubio_midi_event_t *event; 118 121 119 122 extern smpl_t curnote; … … 123 126 /* per example param */ 124 127 extern uint_t usepitch; 125
Note: See TracChangeset
for help on using the changeset viewer.