1 /* SpiralSynth 2 * Copyleft (C) 2000 David Griffiths <dave@pawfal.org> 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #include <math.h> 20 #include "NoteTable.h" 21 #include "SpiralInfo.h" 22 23 #ifndef MIX 24 #define MIX 25 26 27 class Mixer 28 { 29 public: 30 enum Type{NONE,ADD,RING,XMOD}; 31 32 Mixer(); 33 34 void GetOutput(short *data1, short *data2); SetType(Type t)35 void SetType(Type t) {m_Type=t;} IsXMod()36 bool IsXMod() {return (m_Type==XMOD);} SetAmount(float s)37 void SetAmount(float s) {m_Amount=s;} GetType()38 Type GetType() {return m_Type;} GetAmount()39 float GetAmount() {return m_Amount;} 40 void Randomise(); 41 42 private: 43 44 Type m_Type; 45 float m_Amount; 46 47 friend istream &operator>>(istream &s, Mixer &o); 48 friend ostream &operator<<(ostream &s, Mixer &o); 49 }; 50 51 istream &operator>>(istream &s, Mixer &o); 52 ostream &operator<<(ostream &s, Mixer &o); 53 54 #endif 55