source: src/utils/scale.h @ f1771f9

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since f1771f9 was 32d6958, checked in by Paul Brossier <piem@piem.org>, 17 years ago

src/: more moving and splitting

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2   Copyright (C) 2003 Paul Brossier
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17*/
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*/
29#ifndef SCALE_H
30#define SCALE_H
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/** scale object */
37typedef struct _aubio_scale_t aubio_scale_t;
38
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*/
47aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig,
48    smpl_t ilow, smpl_t ihig);
49/** delete a scale object
50
51  \param s scale object as returned by new_aubio_scale
52
53*/
54void del_aubio_scale(aubio_scale_t *s);
55/** scale input vector
56
57  \param s scale object as returned by new_aubio_scale
58  \param input vector to scale
59
60*/
61void aubio_scale_do(aubio_scale_t *s, fvec_t * input);
62/** modify scale parameters after object creation
63
64  \param s scale object as returned by new_aubio_scale
65  \param olow lower value of output function
66  \param ohig higher value of output function
67  \param ilow lower value of input function
68  \param ihig higher value of output function
69
70*/
71void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig,
72    smpl_t olow, smpl_t ohig);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
Note: See TracBrowser for help on using the repository browser.