annotate src/uk/ac/qmul/eecs/depic/daw/Parameter.java @ 4:473da40f3d39 tip

added html formatting to Daw/package-info.java
author Fiore Martin <f.martin@qmul.ac.uk>
date Thu, 25 Feb 2016 17:50:09 +0000
parents 629262395647
children
rev   line source
f@0 1 /*
f@0 2 Cross-Modal DAW Prototype - Prototype of a simple Cross-Modal Digital Audio Workstation.
f@0 3
f@0 4 Copyright (C) 2015 Queen Mary University of London (http://depic.eecs.qmul.ac.uk/)
f@0 5
f@0 6 This program is free software: you can redistribute it and/or modify
f@0 7 it under the terms of the GNU General Public License as published by
f@0 8 the Free Software Foundation, either version 3 of the License, or
f@0 9 (at your option) any later version.
f@0 10
f@0 11 This program is distributed in the hope that it will be useful,
f@0 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
f@0 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f@0 14 GNU General Public License for more details.
f@0 15
f@0 16 You should have received a copy of the GNU General Public License
f@0 17 along with this program. If not, see <http://www.gnu.org/licenses/>.
f@0 18 */
f@0 19 package uk.ac.qmul.eecs.depic.daw;
f@0 20
f@0 21 import uk.ac.qmul.eecs.depic.patterns.Range;
f@0 22
f@1 23 /**
f@1 24 *
f@1 25 * A parameter of the audio computation
f@1 26 *
f@1 27 */
f@0 28 public interface Parameter {
f@0 29 public interface Type {
f@0 30 String getLabel();
f@0 31
f@0 32 String getUnitofMeasurment();
f@0 33 }
f@0 34
f@0 35 public Type GAIN_TYPE = new Type(){
f@0 36 @Override
f@0 37 public String getLabel() {
f@0 38 return "Gain ";
f@0 39 }
f@0 40
f@0 41 @Override
f@0 42 public String getUnitofMeasurment(){
f@0 43 return "db";
f@0 44 }
f@0 45 };
f@0 46
f@0 47 public Type PAN_TYPE = new Type(){
f@0 48 @Override
f@0 49 public String getLabel() {
f@0 50 return "Pan ";
f@0 51 }
f@0 52
f@0 53 @Override
f@0 54 public String getUnitofMeasurment(){
f@0 55 return "";
f@0 56 }
f@0 57 };
f@0 58
f@0 59 public float getValue();
f@0 60
f@0 61 public void setValue(float value);
f@0 62
f@0 63 public float getInitialValue();
f@0 64
f@0 65 public Range<Float> getRange();
f@0 66
f@0 67 public Type getType();
f@0 68
f@0 69 public void automate(Automation a);
f@0 70
f@0 71 public static final Parameter NONE_PARAMETER = new Parameter() {
f@0 72 private Type NONE_TYPE = new Type(){
f@0 73 @Override
f@0 74 public String getLabel() {
f@0 75 return "None";
f@0 76 }
f@0 77
f@0 78 @Override
f@0 79 public String getUnitofMeasurment(){
f@0 80 return "";
f@0 81 }
f@0 82 };
f@0 83
f@0 84 Range<Float> r = new Range<Float>(0.0f,0.0f);
f@0 85
f@0 86 @Override
f@0 87 public float getValue() {
f@0 88 return 0;
f@0 89 }
f@0 90
f@0 91 @Override
f@0 92 public void setValue(float value) { }
f@0 93
f@0 94 @Override
f@0 95 public Range<Float> getRange() {
f@0 96 return r;
f@0 97 }
f@0 98
f@0 99 @Override
f@0 100 public Type getType() {
f@0 101 return NONE_TYPE;
f@0 102 }
f@0 103
f@0 104 @Override
f@0 105 public void automate(Automation a) {}
f@0 106
f@0 107 @Override
f@0 108 public float getInitialValue() {
f@0 109 return 0;
f@0 110 }
f@0 111
f@0 112 };
f@0 113 }