source: src/effects/pitchshift.h @ 124acfb

feature/cnnfeature/crepefeature/timestretchfix/ffmpeg5
Last change on this file since 124acfb was 124acfb, checked in by Paul Brossier <piem@piem.org>, 5 years ago

[effects] wrap long lines

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[80b5bbd]1/*
2  Copyright (C) 2016 Paul Brossier <piem@aubio.org>
3
4  This file is part of aubio.
5
6  aubio is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10
11  aubio is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15
16  You should have received a copy of the GNU General Public License
17  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
18
19*/
20
21#ifndef AUBIO_PITCHSHIFT_H
22#define AUBIO_PITCHSHIFT_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/** \file
29
30  Pitch shifting object
31
[683d52f5]32  ::aubio_pitchshift_t can be used to transpose a stream of blocks of frames.
[80b5bbd]33
34  \example effects/test-pitchshift.c
35
36*/
37
38/** pitch shifting object */
39typedef struct _aubio_pitchshift_t aubio_pitchshift_t;
40
41/** execute pitch shifting on an input signal frame
42
43  \param o pitch shifting object as returned by new_aubio_pitchshift()
44  \param in input signal of size [hop_size]
45  \param out output pitch candidates of size [1]
46
47*/
[124acfb]48void aubio_pitchshift_do (aubio_pitchshift_t * o, const fvec_t * in,
49        fvec_t * out);
[80b5bbd]50
51/** deletion of the pitch shifting object
52
53  \param o pitch shifting object as returned by new_aubio_pitchshift()
54
55*/
56void del_aubio_pitchshift (aubio_pitchshift_t * o);
57
58/** creation of the pitch shifting object
59
[732cf3a]60  \param method set pitch shifting algorithm ("default")
[a9eb93e]61  \param transpose initial pitch transposition
[80b5bbd]62  \param hop_size step size between two consecutive analysis instant
63  \param samplerate sampling rate of the signal
64
65  \return newly created ::aubio_pitchshift_t
66
67*/
68aubio_pitchshift_t *new_aubio_pitchshift (const char_t * method,
[a9eb93e]69    smpl_t transpose, uint_t hop_size, uint_t samplerate);
[80b5bbd]70
[2d128da]71/** get the latency of the pitch shifting object, in samples
72
73  \param o pitch shifting object as returned by ::new_aubio_pitchshift()
74
75  \return latency of the pitch shifting object in samples
76
77*/
78uint_t aubio_pitchshift_get_latency (aubio_pitchshift_t * o);
79
[80b5bbd]80/** set the pitch scale of the pitch shifting object
81
82  \param o pitch shifting object as returned by new_aubio_pitchshift()
83  \param pitchscale new pitch scale of the pitch shifting object
84
[24198a1]85  pitchscale is a frequency ratio. It should be in the range [0.25, 4].
86
[80b5bbd]87  \return 0 if successfull, non-zero otherwise
88
89*/
[124acfb]90uint_t aubio_pitchshift_set_pitchscale (aubio_pitchshift_t * o,
91        smpl_t pitchscale);
[80b5bbd]92
[a6ba2ed1]93/** get the pitchscale of the pitch shifting object
[80b5bbd]94
95  \param o pitch shifting object as returned by ::new_aubio_pitchshift()
96
97  \return pitchscale of the pitch shifting object
98
99*/
100smpl_t aubio_pitchshift_get_pitchscale (aubio_pitchshift_t * o);
101
[a6ba2ed1]102/** set the transposition of the pitch shifting object, in semitones
[80b5bbd]103
104  \param o pitch shifting object as returned by new_aubio_pitchshift()
[124acfb]105  \param transpose new pitch transposition of the pitch shifting object,
106  expressed in semitones (should be in the range [-24;+24])
[80b5bbd]107
108  \return 0 if successfull, non-zero otherwise
109
110*/
[124acfb]111uint_t aubio_pitchshift_set_transpose (aubio_pitchshift_t * o,
112        smpl_t transpose);
[80b5bbd]113
[a6ba2ed1]114/** get the transposition of the pitch shifting object, in semitones
[80b5bbd]115
116  \param o pitch shifting object as returned by ::new_aubio_pitchshift()
117
[a6ba2ed1]118  \return transposition of the pitch shifting object, in semitones
[80b5bbd]119
120*/
121smpl_t aubio_pitchshift_get_transpose (aubio_pitchshift_t * o);
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif /* AUBIO_PITCHSHIFT_H */
Note: See TracBrowser for help on using the repository browser.