- Timestamp:
- May 17, 2006, 9:49:03 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:
- 2a04c2c
- Parents:
- 0dc5fe3
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/scale.c
r0dc5fe3 r680137a 15 15 along with this program; if not, write to the Free Software 16 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 17 */ 18 18 19 19 #include "aubio_priv.h" … … 36 36 }; 37 37 38 39 /********************************************************40 * Object Memory Allocation41 */42 43 38 static aubio_scale_t * aubio_scale_malloc(void); 44 39 static void aubio_scale_free(aubio_scale_t * s); … … 53 48 } 54 49 55 /***56 * Object creation/deletion calls57 */58 50 aubio_scale_t * new_aubio_scale (smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig ){ 59 51 aubio_scale_t * s = aubio_scale_malloc(); … … 66 58 } 67 59 68 /***69 * set parmams70 */71 60 void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig) 72 61 { … … 86 75 } 87 76 88 /***89 * do it90 */91 77 void aubio_scale_do (aubio_scale_t *s, fvec_t *input) 92 78 { -
src/scale.h
r0dc5fe3 r680137a 15 15 along with this program; if not, write to the Free Software 16 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 17 */ 18 18 19 /** \file 20 21 Vector scaling function 22 23 This object, inspired from the scale object in FTS, the jMax engine, scales 24 the values of a vector according to an affine function defined as follow: 25 26 \f$ y = (x - ilow)*(ohig-olow)/(ihig-ilow) + olow \f$ 27 28 */ 19 29 #ifndef SCALE_H 20 30 #define SCALE_H … … 24 34 #endif 25 35 26 /* inspired from the scale object in fts (jmax) */ 27 36 /** scale object */ 28 37 typedef struct _aubio_scale_t aubio_scale_t; 29 38 30 /* buffer function */ 39 /** create a scale object 40 41 \param flow lower value of output function 42 \param fhig higher value of output function 43 \param ilow lower value of input function 44 \param ihig higher value of output function 45 46 */ 31 47 aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig ); 48 /** delete a scale object 49 50 \param s scale object as returned by new_aubio_scale 51 52 */ 32 53 void del_aubio_scale(aubio_scale_t *s); 33 void aubio_scale_do(aubio_scale_t *s, 34 fvec_t * input); 54 /** scale input vector 55 56 \param s scale object as returned by new_aubio_scale 57 \param input vector to scale 58 59 */ 60 void aubio_scale_do(aubio_scale_t *s, fvec_t * input); 61 /** modify scale parameters after object creation 62 63 \param s scale object as returned by new_aubio_scale 64 \param olow lower value of output function 65 \param ohig higher value of output function 66 \param ilow lower value of input function 67 \param ihig higher value of output function 68 69 */ 35 70 void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); 36 71
Note: See TracChangeset
for help on using the changeset viewer.