- Timestamp:
- Jul 13, 2008, 9:56:02 PM (17 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:
- 6f9615c
- Parents:
- 5288874
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/puredata/aubiopitch~.c
r5288874 r4d7ced9 10 10 #include <m_pd.h> 11 11 #include <aubio.h> 12 #include <string.h> 12 13 13 14 char aubiopitch_version[] = "aubiopitch~ version 0.1"; … … 70 71 71 72 //static void *aubiopitch_tilde_new (t_floatarg f) 72 static void *aubiopitch_tilde_new ( void)73 static void *aubiopitch_tilde_new (t_symbol * s) 73 74 { 74 75 t_aubiopitch_tilde *x = … … 78 79 x->hopsize = x->bufsize / 2; 79 80 81 if (strcmp(s->s_name,"mcomb") == 0) 82 type_pitch = aubio_pitch_mcomb; 83 else if (strcmp(s->s_name,"yinfft") == 0) 84 type_pitch = aubio_pitch_yin; 85 else if (strcmp(s->s_name,"yin") == 0) 86 type_pitch = aubio_pitch_yin; 87 else if (strcmp(s->s_name,"schmitt") == 0) 88 type_pitch = aubio_pitch_schmitt; 89 else if (strcmp(s->s_name,"fcomb") == 0) 90 type_pitch = aubio_pitch_fcomb; 91 else { 92 post("unknown pitch type, using default.\n"); 93 } 94 80 95 //FIXME: get the real samplerate 81 x->o = new_aubio_pitchdetection(x->bufsize *4,96 x->o = new_aubio_pitchdetection(x->bufsize, 82 97 x->hopsize, 1, 44100., type_pitch, mode_pitch); 83 98 aubio_pitchdetection_set_yinthresh(x->o, 0.7); … … 104 119 (t_method)aubiopitch_tilde_del, 105 120 sizeof (t_aubiopitch_tilde), 106 CLASS_DEFAULT, A_DEF FLOAT, 0);121 CLASS_DEFAULT, A_DEFSYMBOL, 0); 107 122 class_addmethod(aubiopitch_tilde_class, 108 123 (t_method)aubiopitch_tilde_dsp,
Note: See TracChangeset
for help on using the changeset viewer.