1 /* 2 Copyright (C) 2003 Fons Adriaensen 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 */ 18 19 20 #ifndef __VCOSAWPULSE_H 21 #define __VCOSAWPULSE_H 22 23 #include "ladspaplugin.h" 24 25 26 class Ladspa_VCO_pulse1 : public LadspaPlugin 27 { 28 public: 29 30 enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 }; 31 enum { OUTP, FREQ, EXPM, LINM, OCTN, TUNE, EXPG, LING, FILT, NPORT }; 32 Ladspa_VCO_pulse1(SampleRate fsam)33 Ladspa_VCO_pulse1 (SampleRate fsam) : LadspaPlugin (fsam) {} 34 virtual void setport (PortIndex port, PortData *data); 35 virtual void active (bool act); 36 virtual void runproc (SampleCount len, bool add); ~Ladspa_VCO_pulse1(void)37 virtual ~Ladspa_VCO_pulse1 (void) {} 38 39 private: 40 41 float *_port [NPORT]; 42 float _p, _w, _y, _z; 43 float _f [FILLEN + NCOEFF]; 44 int _j; 45 }; 46 47 48 class Ladspa_VCO_saw1 : public LadspaPlugin 49 { 50 public: 51 52 enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 }; 53 enum { OUTP, FREQ, EXPM, LINM, SYNC, OCTN, TUNE, EXPG, LING, FILT, NPORT }; 54 Ladspa_VCO_saw1(SampleRate fsam)55 Ladspa_VCO_saw1 (SampleRate fsam) : LadspaPlugin (fsam) {} 56 virtual void setport (PortIndex port, PortData *data); 57 virtual void active (bool act); 58 virtual void runproc (SampleCount len, bool add); ~Ladspa_VCO_saw1(void)59 virtual ~Ladspa_VCO_saw1 (void) {} 60 61 private: 62 63 float *_port [NPORT]; 64 float _p, _w, _x, _y, _z, _d; 65 float _f [FILLEN + NCOEFF]; 66 int _j; 67 }; 68 69 70 class Ladspa_VCO_rec1 : public LadspaPlugin 71 { 72 public: 73 74 enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 }; 75 enum { OUTP, FREQ, EXPM, LINM, WAVM, SYNC, OCTN, TUNE, EXPG, LING, WAVE, WMOD, FILT, NPORT }; 76 Ladspa_VCO_rec1(SampleRate fsam)77 Ladspa_VCO_rec1 (SampleRate fsam) : LadspaPlugin (fsam) {} 78 virtual void setport (PortIndex port, PortData *data); 79 virtual void active (bool act); 80 virtual void runproc (SampleCount len, bool add); ~Ladspa_VCO_rec1(void)81 virtual ~Ladspa_VCO_rec1 (void) {} 82 83 private: 84 85 float *_port [NPORT]; 86 float _p, _w, _b, _x, _y, _z, _d; 87 float _f [FILLEN + NCOEFF]; 88 int _j, _k; 89 }; 90 91 92 #endif 93