Index: examples/utils.c
===================================================================
--- examples/utils.c	(revision 13d57e84ea99c209c516b67a4b9553e5cf89f060)
+++ examples/utils.c	(revision fb615ebd7e57253d9f19a29b22147e822bdd8d5b)
@@ -59,5 +59,6 @@
 smpl_t pitch               = 0.;
 aubio_pitchdetection_t * pitchdet;
-aubio_pitchdetection_type mode = aubio_pitch_yin; // aubio_pitch_mcomb
+aubio_pitchdetection_type type_pitch = aubio_pitch_schmitt; // aubio_pitch_mcomb
+aubio_pitchdetection_mode mode_pitch = aubio_pitchm_freq;
 uint_t median         = 6;
 
@@ -88,9 +89,14 @@
         fprintf(stream, "usage: %s [ options ] \n", prog_name);
         fprintf(stream, 
-                        "	-j	--jack		Use Jack.\n"
-                        "	-o	--output	Output type.\n"
-                        "	-i	--input		Input type.\n"
-                        "	-h	--help		Display this message.\n"
-                        "	-v	--verbose	Print verbose message.\n"
+                        "       -h      --help          Display this message.\n"
+                        "       -j      --jack          Use Jack.\n"
+                        "       -o      --output        Output type.\n"
+                        "       -i      --input         Input type.\n"
+                        "       -O      --onset         Select onset detection algorithm.\n"
+                        "       -t      --threshold     Set onset detection threshold.\n"
+                        "       -s      --silence       Select silence threshold.\n"
+                        "       -p      --pitch         Select pitch detection algorithm.\n"
+                        "       -H      --hopsize       Set hopsize.\n"
+                        "       -a      --averaging     Use averaging.\n"
                );
         exit(exit_code);
@@ -98,5 +104,5 @@
 
 int parse_args (int argc, char **argv) {
-        const char *options = "hvjo:i:O:t:s:H:a";
+        const char *options = "hvjo:i:O:t:s:p:H:a";
         int next_option;
         struct option long_options[] =
@@ -110,9 +116,10 @@
                 {"threshold", 1, NULL, 't'},
                 {"silence"  , 1, NULL, 's'},
+                {"pitch"    , 1, NULL, 'p'},
                 {"averaging", 0, NULL, 'a'},
                 {"hopsize",   1, NULL, 'H'},
                 {NULL       , 0, NULL, 0}
         };
-        prog_name = argv[0];	
+        prog_name = argv[0];
         if( argc < 1 ) {
                 usage (stderr, 1);
@@ -129,11 +136,11 @@
                                 input_filename = optarg;
                                 break;
-                        case 'h': 	/* help */
+                        case 'h': /* help */
                                 usage (stdout, 0);
                                 return -1;
-                        case 'v':		/* verbose */
+                        case 'v': /* verbose */
                                 verbose = 1;
                                 break;
-                        case 'j':		/* verbose */
+                        case 'j':
                                 usejack = 1;
                                 break;
@@ -173,4 +180,18 @@
                                    */
                                 break;
+                        case 'p':
+                                if (strcmp(optarg,"mcomb") == 0) 
+                                        type_pitch = aubio_pitch_mcomb;
+                                else if (strcmp(optarg,"yin") == 0) 
+                                        type_pitch = aubio_pitch_yin;
+                                else if (strcmp(optarg,"schmitt") == 0) 
+                                        type_pitch = aubio_pitch_schmitt;
+                                else if (strcmp(optarg,"fcomb") == 0) 
+                                        type_pitch = aubio_pitch_fcomb;
+                                else {
+                                        debug("could not get pitch type.\n");
+                                        abort();
+                                }
+                                break;
                         case 'a':
                                 averaging = 1;
@@ -179,10 +200,10 @@
                                 overlap_size = atoi(optarg);
                                 break;
-                        case '?': 	/* unknown options */
+                        case '?': /* unknown options */
                                 usage(stderr, 1);
                                 break;
-                        case -1: 		/* done with options */
-                                break;
-                        default: 		/*something else unexpected */
+                        case -1: /* done with options */
+                                break;
+                        default: /*something else unexpected */
                                 abort ();
                 }
@@ -204,5 +225,5 @@
                         exit(1);
                 }
-        }	
+        }
         return 0;
 }
@@ -243,5 +264,5 @@
   if (usepitch) {
     pitchdet = new_aubio_pitchdetection(buffer_size*4, 
-                    overlap_size, channels, samplerate, mode, aubio_pitchm_freq);
+                    overlap_size, channels, samplerate, type_pitch, mode_pitch);
   
   if (median) {
