uint_t n_filters = 40;
uint_t n_coefs = 13;
-static void
-process_block(fvec_t *ibuf, fvec_t *obuf) {
+void process_block (fvec_t *ibuf, fvec_t *obuf)
+{
fvec_zeros(obuf);
//compute mag spectrum
aubio_pvoc_do (pv, ibuf, fftgrain);
aubio_mfcc_do(mfcc, fftgrain, mfcc_out);
}
-static void process_print (void) {
+void process_print (void)
+{
/* output times in seconds and extracted mfccs */
outmsg("%f\t",blocks*hop_size/(float)samplerate);
fvec_print(mfcc_out);
void note_append (fvec_t * note_buffer, smpl_t curnote);
uint_t get_note (fvec_t * note_buffer, fvec_t * note_buffer2);
-static void
-process_block(fvec_t *ibuf, fvec_t *obuf) {
+void process_block (fvec_t *ibuf, fvec_t *obuf)
+{
fvec_zeros(obuf);
aubio_onset_do(o, ibuf, onset);
}
}
-static void
-process_print (void) {
+void process_print (void)
+{
//if (verbose) outmsg("%f\n",pitch_obuf->data[0]);
}
fvec_t *onset;
smpl_t is_onset;
-void
-process_block(fvec_t *ibuf, fvec_t *obuf) {
+void process_block(fvec_t *ibuf, fvec_t *obuf)
+{
aubio_onset_do (o, ibuf, onset);
is_onset = fvec_get_sample(onset, 0);
if ( !usejack && ! sink_uri ) return;
aubio_wavetable_do (wavetable, obuf, obuf);
}
-void
-process_print (void)
+void process_print (void)
{
if ( is_onset ) {
outmsg ("%f\n", aubio_onset_get_last_s (o) );
aubio_wavetable_t *wavetable;
fvec_t *pitch;
-void
-process_block(fvec_t * ibuf, fvec_t * obuf) {
+void process_block(fvec_t * ibuf, fvec_t * obuf)
+{
aubio_pitch_do (o, ibuf, pitch);
if ( !usejack && ! sink_uri ) return;
fvec_zeros(obuf);
aubio_wavetable_do (wavetable, obuf, obuf);
}
-void
-process_print (void) {
+void process_print (void)
+{
smpl_t pitch_found = fvec_get_sample(pitch, 0);
outmsg("%f %f\n",(blocks)
*hop_size/(float)samplerate, pitch_found);
}
}
-static void process_print (void) {
+void process_print (void) {
int curblocks = (blocks - 4) > 0 ? blocks - 4 : 0;
if (issilence == -1) {
outmsg("NOISY: %f\n",curblocks*hop_size/(float)samplerate);
extern void examples_common_del (void);
extern void examples_common_process (aubio_process_func_t process_func,
aubio_print_func_t print);
+int parse_args (int argc, char **argv);
// internal stuff
extern int blocks;
const char *prog_name;
-void
-usage (FILE * stream, int exit_code)
+void usage (FILE * stream, int exit_code);
+
+void usage (FILE * stream, int exit_code)
{
fprintf (stream, "usage: %s [ options ] \n", prog_name);
fprintf (stream,
aubio_jack_t *jack_setup;
#endif
-void
-examples_common_init (int argc, char **argv)
+void examples_common_init (int argc, char **argv);
+void examples_common_del (void);
+void examples_common_process (aubio_process_func_t process_func,
+ aubio_print_func_t print);
+
+void examples_common_init (int argc, char **argv)
{
/* parse command line arguments */
}
-void
-examples_common_del (void)
+void examples_common_del (void)
{
del_fvec (ibuf);
del_fvec (obuf);
fflush(stdout);
}
-void
-examples_common_process (aubio_process_func_t process_func,
+void examples_common_process (aubio_process_func_t process_func,
aubio_print_func_t print)
{
/** common process function */
typedef int (*aubio_process_func_t) (fvec_t * input, fvec_t * output);
+
+void process_block (fvec_t *ibuf, fvec_t *obuf);
+void process_print (void);