home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / CMCD1104.ISO / Software / Complet / ZynAddFX / Setup_ZynAddSubFX-2.1.1.exe / Distorsion.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-07-26  |  2.2 KB  |  74 lines

  1. /*
  2.   ZynAddSubFX - a software synthesizer
  3.  
  4.   Distorsion.h - Distorsion Effect
  5.   Copyright (C) 2002-2004 Nasca Octavian Paul
  6.   Author: Nasca Octavian Paul
  7.  
  8.   This program is free software; you can redistribute it and/or modify
  9.   it under the terms of version 2 of the GNU General Public License 
  10.   as published by the Free Software Foundation.
  11.  
  12.   This program is distributed in the hope that it will be useful,
  13.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.   GNU General Public License (version 2) for more details.
  16.  
  17.   You should have received a copy of the GNU General Public License (version 2)
  18.   along with this program; if not, write to the Free Software Foundation,
  19.   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  20.  
  21. */
  22.  
  23. #ifndef DISTORSION_H
  24. #define DISTORSION_H
  25.  
  26. #include "../globals.h"
  27. #include "../DSP/AnalogFilter.h"
  28. #include "Effect.h"
  29.  
  30. //Waveshaping(called by Distorsion effect and waveshape from OscilGen)
  31. void waveshapesmps(int n,REALTYPE *smps,unsigned char type,unsigned char drive);
  32.  
  33. class Distorsion:public Effect{
  34.     public:
  35.     Distorsion(int insertion,REALTYPE *efxoutl_,REALTYPE *efxoutr_);
  36.     ~Distorsion();
  37.     void out(REALTYPE *smpsl,REALTYPE *smpr);
  38.     void setpreset(unsigned char npreset);
  39.     void changepar(int npar,unsigned char value);
  40.     unsigned char getpar(int npar);
  41.     void cleanup();
  42.     void applyfilters(REALTYPE *efxoutl,REALTYPE *efxoutr);
  43.  
  44.     private:
  45.     //Parametrii
  46.     unsigned char Pvolume; //Volumul or E/R
  47.     unsigned char Ppanning;//Panning
  48.     unsigned char Plrcross;// L/R Mixing
  49.     unsigned char Pdrive;  //the input amplification
  50.     unsigned char Plevel;  //the ouput amplification
  51.     unsigned char Ptype;   //Distorsion type
  52.     unsigned char Pnegate; //if the input is negated 
  53.     unsigned char Plpf;    //lowpass filter
  54.     unsigned char Phpf;    //highpass filter
  55.     unsigned char Pstereo; //0=mono,1=stereo
  56.     unsigned char Pprefiltering;//if you want to do the filtering before the distorsion
  57.     
  58.     void setvolume(unsigned char Pvolume);
  59.     void setpanning(unsigned char Ppanning);
  60.     void setlrcross(unsigned char Plrcross);
  61.     void setlpf(unsigned char Plpf);
  62.     void sethpf(unsigned char Phpf);
  63.     
  64.     //Parametrii reali
  65.     REALTYPE panning,lrcross;
  66.     AnalogFilter *lpfl,*lpfr,*hpfl,*hpfr;
  67.  
  68. };
  69.  
  70.  
  71. #endif
  72.  
  73.  
  74.