Changeset b4f5967 for examples/utils.c
- Timestamp:
- Oct 15, 2009, 5:09:34 PM (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:
- cd77c15
- Parents:
- 27fa522
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.c
r27fa522 rb4f5967 46 46 47 47 /* energy,specdiff,hfc,complexdomain,phase */ 48 aubio_onsetdetection_type type_onset = aubio_onset_kl; 49 aubio_onsetdetection_type type_onset2 = aubio_onset_complex; 48 char_t * onset_mode = "default"; 50 49 smpl_t threshold = 0.3; 51 50 smpl_t silence = -90.; … … 92 91 93 92 /* badly redeclare some things */ 94 aubio_onsetdetection_type type_onset;95 93 smpl_t threshold; 96 94 smpl_t averaging; … … 164 162 break; 165 163 case 'O': /*onset type */ 166 if (strcmp (optarg, "energy") == 0) 167 type_onset = aubio_onset_energy; 168 else if (strcmp (optarg, "specdiff") == 0) 169 type_onset = aubio_onset_specdiff; 170 else if (strcmp (optarg, "hfc") == 0) 171 type_onset = aubio_onset_hfc; 172 else if (strcmp (optarg, "complexdomain") == 0) 173 type_onset = aubio_onset_complex; 174 else if (strcmp (optarg, "complex") == 0) 175 type_onset = aubio_onset_complex; 176 else if (strcmp (optarg, "phase") == 0) 177 type_onset = aubio_onset_phase; 178 else if (strcmp (optarg, "mkl") == 0) 179 type_onset = aubio_onset_mkl; 180 else if (strcmp (optarg, "kl") == 0) 181 type_onset = aubio_onset_kl; 182 else if (strcmp (optarg, "specflux") == 0) 183 type_onset = aubio_onset_specflux; 184 else { 185 errmsg ("unknown onset type.\n"); 186 abort (); 187 } 188 usedoubled = 0; 164 onset_mode = optarg; 189 165 break; 190 166 case 's': /* threshold value for onset */ … … 332 308 /* onsets */ 333 309 parms = new_aubio_peakpicker (threshold); 334 o = new_aubio_onsetdetection ( type_onset, buffer_size, channels);310 o = new_aubio_onsetdetection (onset_mode, buffer_size, channels); 335 311 onset = new_fvec (1, channels); 336 if (usedoubled) {337 o2 = new_aubio_onsetdetection (type_onset2, buffer_size, channels);338 onset2 = new_fvec (1, channels);339 }340 312 341 313 }
Note: See TracChangeset
for help on using the changeset viewer.