Changeset 35f73b8c for src/onset/onset.h
- Timestamp:
- Mar 15, 2013, 11:48:10 PM (11 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:
- 7e9e311
- Parents:
- f5e0a54
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.h
rf5e0a54 r35f73b8c 20 20 21 21 /** \file 22 22 23 23 Onset detection object 24 24 … … 49 49 50 50 /** create onset detection object 51 51 52 52 \param method onset detection type as specified in specdesc.h 53 53 \param buf_size buffer size for phase vocoder 54 54 \param hop_size hop size for phase vocoder 55 \param samplerate sampling rate of the input signal 56 57 */ 58 aubio_onset_t * new_aubio_onset (char_t * method, 55 \param samplerate sampling rate of the input signal 56 57 */ 58 aubio_onset_t * new_aubio_onset (char_t * method, 59 59 uint_t buf_size, uint_t hop_size, uint_t samplerate); 60 60 61 61 /** execute onset detection 62 62 63 \param o onset detection object as returned by new_aubio_onset63 \param o onset detection object as returned by ::new_aubio_onset 64 64 \param input new audio vector of length hop_size 65 \param onset output vector, 1 if onset is found, 0 otherwise 65 \param onset output vector of length 1, containing 0 if no onset was found, 66 and a value equal or greater than 1 otherwise 67 68 When no onset was detected, the first element of the output vector `onset` 69 is set to 0. 70 71 When an onset is found, the first element of the output vector `onset` is set 72 to `offset = 1 + a` where `a` is a number in the range`[0, 1]`. 73 74 The final onset detection time, in samples, can be obtained with 75 ::aubio_onset_get_last_onset. It can also be derived from `offset` as 76 follows: 77 78 \code 79 t = total_frames + offset * hop_size - delay 80 \endcode 81 82 where `total_frames` is the total number of frames processed so far, and 83 `delay` is the current delay of the onset object, as returned by 84 ::aubio_onset_get_delay. 66 85 67 86 */ … … 70 89 /** get the time of the latest onset detected, in samples 71 90 72 \param o onset detection object as returned by new_aubio_onset91 \param o onset detection object as returned by ::new_aubio_onset 73 92 74 93 */ … … 77 96 /** get the time of the latest onset detected, in seconds 78 97 79 \param o onset detection object as returned by new_aubio_onset98 \param o onset detection object as returned by ::new_aubio_onset 80 99 81 100 */ … … 84 103 /** get the time of the latest onset detected, in milliseconds 85 104 86 \param o onset detection object as returned by new_aubio_onset105 \param o onset detection object as returned by ::new_aubio_onset 87 106 88 107 */ … … 91 110 /** set onset detection silence threshold 92 111 93 \param o onset detection object as returned by new_aubio_onset112 \param o onset detection object as returned by ::new_aubio_onset 94 113 \param silence new silence detection threshold 95 114 … … 99 118 /** get onset detection function 100 119 101 \param o onset detection object as returned by new_aubio_onset120 \param o onset detection object as returned by ::new_aubio_onset 102 121 \return the current value of the descriptor 103 122 … … 107 126 /** get thresholded onset detection function 108 127 109 \param o onset detection object as returned by new_aubio_onset128 \param o onset detection object as returned by ::new_aubio_onset 110 129 \return the value of the thresholded descriptor 111 130 … … 113 132 smpl_t aubio_onset_get_thresholded_descriptor ( aubio_onset_t *o); 114 133 115 /** set onset detection peak picking threshold 116 117 \param o onset detection object as returned by new_aubio_onset134 /** set onset detection peak picking threshold 135 136 \param o onset detection object as returned by ::new_aubio_onset 118 137 \param threshold new peak-picking threshold 119 138 … … 121 140 uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold); 122 141 123 /** set minimum inter onset interval 124 125 \param o onset detection object as returned by new_aubio_onset 142 /** set minimum inter onset interval in samples 143 144 \param o onset detection object as returned by ::new_aubio_onset 145 \param minioi minimum interval between two consecutive onsets (in 146 samples) 147 148 */ 149 uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi); 150 151 /** set minimum inter onset interval in seconds 152 153 \param o onset detection object as returned by ::new_aubio_onset 154 \param minioi minimum interval between two consecutive onsets (in 155 seconds) 156 157 */ 158 uint_t aubio_onset_set_minioi_s(aubio_onset_t * o, smpl_t minioi); 159 160 /** set minimum inter onset interval in milliseconds 161 162 \param o onset detection object as returned by ::new_aubio_onset 126 163 \param minioi minimum interval between two consecutive onsets (in 127 164 milliseconds) 128 165 129 166 */ 130 uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi); 167 uint_t aubio_onset_set_minioi_ms(aubio_onset_t * o, smpl_t minioi); 168 169 /** set minimum inter onset interval in samples 170 171 \param o onset detection object as returned by ::new_aubio_onset 172 \param delay constant system delay to take back from detection time 173 (in samples) 174 175 */ 176 uint_t aubio_onset_set_delay(aubio_onset_t * o, uint_t delay); 177 178 /** set minimum inter onset interval in seconds 179 180 \param o onset detection object as returned by ::new_aubio_onset 181 \param delay constant system delay to take back from detection time 182 (in seconds) 183 184 */ 185 uint_t aubio_onset_set_delay_s(aubio_onset_t * o, smpl_t delay); 186 187 /** set minimum inter onset interval in milliseconds 188 189 \param o onset detection object as returned by ::new_aubio_onset 190 \param delay constant system delay to take back from detection time 191 (in milliseconds) 192 193 */ 194 uint_t aubio_onset_set_delay_ms(aubio_onset_t * o, smpl_t delay); 195 196 /** get minimum inter onset interval in samples 197 198 \param o onset detection object as returned by ::new_aubio_onset 199 \return minimum interval between two consecutive onsets (in 200 samples) 201 202 */ 203 uint_t aubio_onset_get_minioi(aubio_onset_t * o); 204 205 /** get minimum inter onset interval in seconds 206 207 \param o onset detection object as returned by ::new_aubio_onset 208 \return minimum interval between two consecutive onsets (in 209 seconds) 210 211 */ 212 smpl_t aubio_onset_get_minioi_s(aubio_onset_t * o); 213 214 /** get minimum inter onset interval in milliseconds 215 216 \param o onset detection object as returned by ::new_aubio_onset 217 \return minimum interval between two consecutive onsets (in 218 milliseconds) 219 220 */ 221 smpl_t aubio_onset_get_minioi_ms(aubio_onset_t * o); 222 223 /** get minimum inter onset interval in samples 224 225 \param o onset detection object as returned by ::new_aubio_onset 226 \return constant system delay to take back from detection time 227 (in samples) 228 229 */ 230 uint_t aubio_onset_get_delay(aubio_onset_t * o); 231 232 /** get minimum inter onset interval in seconds 233 234 \param o onset detection object as returned by ::new_aubio_onset 235 \return constant system delay to take back from detection time 236 (in seconds) 237 238 */ 239 smpl_t aubio_onset_get_delay_s(aubio_onset_t * o); 240 241 /** get minimum inter onset interval in milliseconds 242 243 \param o onset detection object as returned by ::new_aubio_onset 244 \return constant system delay to take back from detection time 245 (in milliseconds) 246 247 */ 248 smpl_t aubio_onset_get_delay_ms(aubio_onset_t * o); 131 249 132 250 /** delete onset detection object 133 251 134 \param o onset detection object to delete 252 \param o onset detection object to delete 135 253 136 254 */
Note: See TracChangeset
for help on using the changeset viewer.