Changeset f44b111
- Timestamp:
- May 17, 2006, 9:44:51 PM (19 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:
- 2afdb0f
- Parents:
- ab0b69b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitchdetection.c
rab0b69b rf44b111 33 33 typedef smpl_t (*aubio_pitchdetection_conv_t)(smpl_t value,uint_t srate,uint_t bufsize); 34 34 void aubio_pitchdetection_slideblock(aubio_pitchdetection_t *p, fvec_t *ibuf); 35 36 smpl_t aubio_pitchdetection_mcomb(aubio_pitchdetection_t *p, fvec_t * ibuf); 37 smpl_t aubio_pitchdetection_yin(aubio_pitchdetection_t *p, fvec_t *ibuf); 38 smpl_t aubio_pitchdetection_schmitt(aubio_pitchdetection_t *p, fvec_t *ibuf); 39 smpl_t aubio_pitchdetection_fcomb(aubio_pitchdetection_t *p, fvec_t *ibuf); 40 smpl_t aubio_pitchdetection_yinfft(aubio_pitchdetection_t *p, fvec_t *ibuf); 35 41 36 42 struct _aubio_pitchdetection_t { … … 125 131 break; 126 132 case aubio_pitchm_cent: 127 /* *bug: not implemented */133 /* bug: not implemented */ 128 134 p->freqconv = freqconvmidi; 129 135 break; -
src/pitchdetection.h
rab0b69b rf44b111 24 24 #endif 25 25 26 /** \file 27 28 Generic method for pitch detection 29 30 This file creates the objects required for the computation of the selected 31 pitch detection algorithm and output the results, in midi note or Hz. 32 33 */ 34 35 /** pitch detection algorithm */ 26 36 typedef enum { 27 aubio_pitch_yin, 28 aubio_pitch_mcomb, 29 aubio_pitch_schmitt, 30 aubio_pitch_fcomb, 31 aubio_pitch_yinfft 37 aubio_pitch_yin, /**< YIN algorithm */ 38 aubio_pitch_mcomb, /**< Multi-comb filter */ 39 aubio_pitch_schmitt, /**< Schmitt trigger */ 40 aubio_pitch_fcomb, /**< Fast comb filter */ 41 aubio_pitch_yinfft /**< Spectral YIN */ 32 42 } aubio_pitchdetection_type; 33 43 44 /** pitch detection output mode */ 34 45 typedef enum { 35 aubio_pitchm_freq, 36 aubio_pitchm_midi, 37 aubio_pitchm_cent, 38 aubio_pitchm_bin 46 aubio_pitchm_freq, /**< Frequency (Hz) */ 47 aubio_pitchm_midi, /**< MIDI note (0.,127) */ 48 aubio_pitchm_cent, /**< Cent */ 49 aubio_pitchm_bin /**< Frequency bin (0,bufsize) */ 39 50 } aubio_pitchdetection_mode; 40 51 52 /** pitch detection object */ 41 53 typedef struct _aubio_pitchdetection_t aubio_pitchdetection_t; 42 54 55 /** execute pitch detection on an input signal frame 56 57 \param p pitch detection object as returned by new_aubio_pitchdetection 58 \param ibuf input signal of length hopsize 59 60 */ 43 61 smpl_t aubio_pitchdetection(aubio_pitchdetection_t * p, fvec_t * ibuf); 44 smpl_t aubio_pitchdetection_mcomb(aubio_pitchdetection_t *p, fvec_t * ibuf);45 smpl_t aubio_pitchdetection_yin(aubio_pitchdetection_t *p, fvec_t *ibuf);46 smpl_t aubio_pitchdetection_schmitt(aubio_pitchdetection_t *p, fvec_t *ibuf);47 smpl_t aubio_pitchdetection_fcomb(aubio_pitchdetection_t *p, fvec_t *ibuf);48 smpl_t aubio_pitchdetection_yinfft(aubio_pitchdetection_t *p, fvec_t *ibuf);49 62 63 /** change yin or yinfft tolerance threshold 64 65 default is 0.15 for yin and 0.85 for yinfft 66 67 */ 50 68 void aubio_pitchdetection_set_yinthresh(aubio_pitchdetection_t *p, smpl_t thres); 69 70 /** deletion of the pitch detection object 71 72 \param p pitch detection object as returned by new_aubio_pitchdetection 73 74 */ 51 75 void del_aubio_pitchdetection(aubio_pitchdetection_t * p); 52 76 77 /** creation of the pitch detection object 78 79 \param bufsize size of the input buffer to analyse 80 \param hopsize step size between two consecutive analysis instant 81 \param channels number of channels to analyse 82 \param samplerate sampling rate of the signal 83 \param type set pitch detection algorithm 84 \param mode set pitch units for output 85 86 */ 53 87 aubio_pitchdetection_t * new_aubio_pitchdetection(uint_t bufsize, 54 55 56 57 58 88 uint_t hopsize, 89 uint_t channels, 90 uint_t samplerate, 91 aubio_pitchdetection_type type, 92 aubio_pitchdetection_mode mode); 59 93 60 94 #ifdef __cplusplus -
swig/aubio.i
rab0b69b rf44b111 204 204 205 205 smpl_t aubio_pitchdetection(aubio_pitchdetection_t * p, fvec_t * ibuf); 206 smpl_t aubio_pitchdetection_mcomb(aubio_pitchdetection_t *p, fvec_t * ibuf);207 smpl_t aubio_pitchdetection_yin(aubio_pitchdetection_t *p, fvec_t *ibuf);208 206 209 207 void aubio_pitchdetection_set_yinthresh(aubio_pitchdetection_t *p, smpl_t thres);
Note: See TracChangeset
for help on using the changeset viewer.