f@0: /* f@0: Cross-Modal DAW Prototype - Prototype of a simple Cross-Modal Digital Audio Workstation. f@0: f@0: Copyright (C) 2015 Queen Mary University of London (http://depic.eecs.qmul.ac.uk/) f@0: f@0: This program is free software: you can redistribute it and/or modify f@0: it under the terms of the GNU General Public License as published by f@0: the Free Software Foundation, either version 3 of the License, or f@0: (at your option) any later version. f@0: f@0: This program is distributed in the hope that it will be useful, f@0: but WITHOUT ANY WARRANTY; without even the implied warranty of f@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the f@0: GNU General Public License for more details. f@0: f@0: You should have received a copy of the GNU General Public License f@0: along with this program. If not, see . f@0: */ f@0: package uk.ac.qmul.eecs.depic.daw; f@0: f@0: import uk.ac.qmul.eecs.depic.patterns.Range; f@0: f@1: /** f@1: * f@1: * A parameter of the audio computation f@1: * f@1: */ f@0: public interface Parameter { f@0: public interface Type { f@0: String getLabel(); f@0: f@0: String getUnitofMeasurment(); f@0: } f@0: f@0: public Type GAIN_TYPE = new Type(){ f@0: @Override f@0: public String getLabel() { f@0: return "Gain "; f@0: } f@0: f@0: @Override f@0: public String getUnitofMeasurment(){ f@0: return "db"; f@0: } f@0: }; f@0: f@0: public Type PAN_TYPE = new Type(){ f@0: @Override f@0: public String getLabel() { f@0: return "Pan "; f@0: } f@0: f@0: @Override f@0: public String getUnitofMeasurment(){ f@0: return ""; f@0: } f@0: }; f@0: f@0: public float getValue(); f@0: f@0: public void setValue(float value); f@0: f@0: public float getInitialValue(); f@0: f@0: public Range getRange(); f@0: f@0: public Type getType(); f@0: f@0: public void automate(Automation a); f@0: f@0: public static final Parameter NONE_PARAMETER = new Parameter() { f@0: private Type NONE_TYPE = new Type(){ f@0: @Override f@0: public String getLabel() { f@0: return "None"; f@0: } f@0: f@0: @Override f@0: public String getUnitofMeasurment(){ f@0: return ""; f@0: } f@0: }; f@0: f@0: Range r = new Range(0.0f,0.0f); f@0: f@0: @Override f@0: public float getValue() { f@0: return 0; f@0: } f@0: f@0: @Override f@0: public void setValue(float value) { } f@0: f@0: @Override f@0: public Range getRange() { f@0: return r; f@0: } f@0: f@0: @Override f@0: public Type getType() { f@0: return NONE_TYPE; f@0: } f@0: f@0: @Override f@0: public void automate(Automation a) {} f@0: f@0: @Override f@0: public float getInitialValue() { f@0: return 0; f@0: } f@0: f@0: }; f@0: }