File: Shifter.h

package info (click to toggle)
rakarrack 0.6.1-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,136 kB
  • sloc: cpp: 27,705; sh: 787; makefile: 303
file content (106 lines) | stat: -rw-r--r-- 2,110 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
  rakarrack - a guitar effects software

  PitchShifter.h  -  Shifterr definitions
  Copyright (C) 2008-2010 Josep Andreu
  Author: Josep Andreu

 This program is free software; you can redistribute it and/or modify
 it under the terms of version 2 of the GNU General Public License
 as published by the Free Software Foundation.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License (version 2) for more details.

 You should have received a copy of the GNU General Public License
 (version2)  along with this program; if not, write to the Free Software
 Foundation,
 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

*/

#ifndef SHIFTER_H
#define SHIFTER_H

#include "global.h"
#include "smbPitchShift.h"


#define IDLE 0
#define UP   1
#define WAIT 2
#define DOWN 3



class Shifter
{

public:
  Shifter (float *efxoutl_, float *efxoutr_, long int Quality, int DS, int uq, int dq);
   ~Shifter ();
  void out (float *smpsl, float *smpsr);
  void setpreset (int npreset);
  void changepar (int npar, int value);
  int getpar (int npar);
  void cleanup ();
  void applyfilters (float * efxoutl);
  void adjust(int DS);

  int Ppreset;
  long int hq;
  float outvolume;

  float *efxoutl;
  float *efxoutr;
  float *outi;
  float *outo;




private:

  void setvolume (int Pvolume);
  void setpanning (int Ppan);
  void setinterval (int Pinterval);
  void setgain (int Pgain);

  int Pvolume;
  int Pgain;
  int Ppan;
  int Pinterval;
  int Pupdown;
  int Pmode;
  int Pattack;
  int Pdecay;
  int Pthreshold;
  int Pwhammy;
  int state;
  int DS_state;
  int nPERIOD;
  int nSAMPLE_RATE;
  long window;
  
  double u_up;
  double u_down;
  float nfSAMPLE_RATE;
  float env, t_level, td_level, tz_level;
  float a_rate,d_rate,tune, range, whammy;
  float panning;
  float gain;
  float interval;
  float *templ, *tempr;
  
  Resample *U_Resample;
  Resample *D_Resample;


  PitchShifter *PS;

  class FPreset *Fpre;
};

#endif