Changeset ffd10fb for src/notes/notes.c
- Timestamp:
- Oct 3, 2016, 8:46:46 PM (8 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, sampler, yinfft+
- Children:
- 54eba9d
- Parents:
- 61a1e5d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/notes/notes.c
r61a1e5d rffd10fb 25 25 #include "notes/notes.h" 26 26 27 #define DEFAULT_NOTES_SILENCE -50. 28 27 29 struct _aubio_notes_t { 28 30 … … 91 93 o->newnote = 0.; 92 94 93 o->silence_threshold = -90.;95 aubio_notes_set_silence(o, DEFAULT_NOTES_SILENCE); 94 96 95 97 return o; … … 98 100 del_aubio_notes(o); 99 101 return NULL; 102 } 103 104 uint_t aubio_notes_set_silence(aubio_notes_t *o, smpl_t silence) 105 { 106 uint_t err = AUBIO_OK; 107 if (aubio_pitch_set_silence(o->pitch, silence) != AUBIO_OK) { 108 err = AUBIO_FAIL; 109 } 110 if (aubio_onset_set_silence(o->onset, silence) != AUBIO_OK) { 111 err = AUBIO_FAIL; 112 } 113 return err; 114 } 115 116 smpl_t aubio_notes_get_silence(const aubio_notes_t *o) 117 { 118 return aubio_pitch_get_silence(o->pitch); 100 119 } 101 120
Note: See TracChangeset
for help on using the changeset viewer.