}
int main(int argc, char **argv) {
+ int ret = 0;
// change some default params
buffer_size = 512;
hop_size = 256;
fftgrain = new_cvec (buffer_size);
mfcc = new_aubio_mfcc(buffer_size, n_filters, n_coefs, samplerate);
mfcc_out = new_fvec(n_coefs);
+ if (pv == NULL || fftgrain == NULL || mfcc == NULL || mfcc_out == NULL) {
+ ret = 1;
+ goto beach;
+ }
examples_common_process((aubio_process_func_t)process_block, process_print);
del_aubio_mfcc(mfcc);
del_fvec(mfcc_out);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
-
}
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 ("tolerance: %f\n", pitch_tolerance);
notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate);
+ if (notes == NULL) { ret = 1; goto beach; }
examples_common_process((aubio_process_func_t)process_block, process_print);
del_aubio_notes (notes);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
-
}
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 ("threshold: %f\n", onset_threshold);
o = new_aubio_onset (onset_method, buffer_size, hop_size, samplerate);
+ if (o == NULL) { ret = 1; goto beach; }
if (onset_threshold != 0.)
aubio_onset_set_threshold (o, onset_threshold);
if (silence_threshold != -90.)
del_aubio_wavetable (wavetable);
del_fvec (onset);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
}
int main(int argc, char **argv) {
+ int ret = 0;
buffer_size = 2048;
verbmsg ("tolerance: %f\n", pitch_tolerance);
o = new_aubio_pitch (pitch_method, buffer_size, hop_size, samplerate);
+ if (o == NULL) { ret = 1; goto beach; }
if (pitch_tolerance != 0.)
aubio_pitch_set_tolerance (o, pitch_tolerance);
if (silence_threshold != -90.)
del_aubio_wavetable (wavetable);
del_fvec (pitch);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
-
}
int main(int argc, char **argv) {
+ int ret = 0;
// override general settings from utils.c
buffer_size = 1024;
hop_size = 512;
tempo_out = new_fvec(2);
tempo = new_aubio_tempo(tempo_method, buffer_size, hop_size, samplerate);
+ if (tempo == NULL) { ret = 1; goto beach; }
// set silence threshold very low to output beats even during silence
// aubio_tempo_set_silence(tempo, -1000.);
if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);
del_aubio_wavetable (wavetable);
del_fvec(tempo_out);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
-