1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __AActionParamMapper_H__ 22 #define __AActionParamMapper_H__ 23 24 #include "../../config/common.h" 25 26 class AActionParamMapper 27 { 28 public: 29 AActionParamMapper(double defaultValue=0.0,int defaultScalar=0,int _minScalar=0,int _maxScalar=0); 30 virtual ~AActionParamMapper(); 31 32 double getDefaultValue() const; 33 34 virtual double interpretValue(double x)=0; // implement to convert [0,1] to parameter's value 35 virtual double uninterpretValue(double x)=0; // implement to convert parameter's value to [0,1] 36 37 void setScalar(int _scalar); 38 int getScalar() const; 39 40 int getDefaultScalar() const; 41 int getMinScalar() const; 42 int getMaxScalar() const; 43 44 private: 45 const double defaultValue; 46 47 const int defaultScalar,minScalar,maxScalar; 48 49 int scalar; 50 }; 51 52 #endif 53