1
//===========================================================================
3
// PanDelay, panoramic rotating delay
10
// Copyright (c) 2006 Nil Geisweiller
14
// This program is free software; you can redistribute it and/or
15
// modify it under the terms of the GNU General Public License
16
// as published by the Free Software Foundation; either version 2
17
// of the License, or (at your option) any later version.
19
// This program is distributed in the hope that it will be useful,
20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
// GNU General Public License for more details.
24
// You should have received a copy of the GNU General Public License
25
// along with this program; if not, write to the Free Software
26
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27
// 02111-1307, USA or point your web browser to http://www.gnu.org.
28
//===========================================================================
30
#ifndef __PANDELAYMODEL_H
31
#define __PANDELAYMODEL_H
35
#define MAXBUFFERLENGTH 192000
36
#define MINFREQ 0.1 //in Hz
37
#define MAXFREQ 10.0 //in Hz
40
#define MINBEATRATIO 0.125
41
#define MAXBEATRATIO 2.0
42
#define MINDELAYTIME 0.01 //in second
43
#define MAXDELAYTIME 2.0 //in second
51
//bool _beatFraction; //if true then the delay is calculated in beat fraction
54
float _delayTime; //delay is calculated according to BMP and ratioBMP
58
float _dryWet; //0.0 : dry, 1.0 : wet
67
float _leftBuffer[MAXBUFFERLENGTH];
68
float _rightBuffer[MAXBUFFERLENGTH];
72
PanDelayModel(int samplerate);
75
void setSamplerate(int sr);
76
void setBeatRatio(float br);
77
void setBPM(float bpm);
78
void setDelayTime(float dt);
79
void setFeedback(float dt);
80
void setPanLFOFreq(float pf);
81
void setPanLFODepth(float pd);
82
void setDryWet(float dw);
85
void processMix(float* leftInSamples, float* rightInSamples,
86
float* leftOutSamples, float* rightOutSamples,
88
void processReplace(float* leftInSamples, float* rightInSamples,
89
float* leftOutSamples, float* rightOutSamples,
93
#endif /* __PANDELAYMODEL_H */