Chris@10
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@10
|
2
|
Chris@10
|
3 /*
|
Chris@10
|
4 Rubber Band Library
|
Chris@10
|
5 An audio time-stretching and pitch-shifting library.
|
Chris@10
|
6 Copyright 2007-2012 Particular Programs Ltd.
|
Chris@10
|
7
|
Chris@10
|
8 This program is free software; you can redistribute it and/or
|
Chris@10
|
9 modify it under the terms of the GNU General Public License as
|
Chris@10
|
10 published by the Free Software Foundation; either version 2 of the
|
Chris@10
|
11 License, or (at your option) any later version. See the file
|
Chris@10
|
12 COPYING included with this distribution for more information.
|
Chris@10
|
13
|
Chris@10
|
14 Alternatively, if you have a valid commercial licence for the
|
Chris@10
|
15 Rubber Band Library obtained by agreement with the copyright
|
Chris@10
|
16 holders, you may redistribute and/or modify it under the terms
|
Chris@10
|
17 described in that licence.
|
Chris@10
|
18
|
Chris@10
|
19 If you wish to distribute code using the Rubber Band Library
|
Chris@10
|
20 under terms other than those of the GNU General Public License,
|
Chris@10
|
21 you must obtain a valid commercial licence before doing so.
|
Chris@10
|
22 */
|
Chris@10
|
23
|
Chris@10
|
24 #ifndef _PERCUSSIVE_AUDIO_CURVE_H_
|
Chris@10
|
25 #define _PERCUSSIVE_AUDIO_CURVE_H_
|
Chris@10
|
26
|
Chris@10
|
27 #include "dsp/AudioCurveCalculator.h"
|
Chris@10
|
28
|
Chris@10
|
29 namespace RubberBand
|
Chris@10
|
30 {
|
Chris@10
|
31
|
Chris@10
|
32 class PercussiveAudioCurve : public AudioCurveCalculator
|
Chris@10
|
33 {
|
Chris@10
|
34 public:
|
Chris@10
|
35 PercussiveAudioCurve(Parameters parameters);
|
Chris@10
|
36
|
Chris@10
|
37 virtual ~PercussiveAudioCurve();
|
Chris@10
|
38
|
Chris@10
|
39 virtual void setFftSize(int newSize);
|
Chris@10
|
40
|
Chris@10
|
41 virtual float processFloat(const float *R__ mag, int increment);
|
Chris@10
|
42 virtual double processDouble(const double *R__ mag, int increment);
|
Chris@10
|
43
|
Chris@10
|
44
|
Chris@10
|
45 virtual void reset();
|
Chris@10
|
46 virtual const char *getUnit() const { return "bin/total"; }
|
Chris@10
|
47
|
Chris@10
|
48 protected:
|
Chris@10
|
49 double *R__ m_prevMag;
|
Chris@10
|
50 };
|
Chris@10
|
51
|
Chris@10
|
52 }
|
Chris@10
|
53
|
Chris@10
|
54 #endif
|