Mercurial > hg > cmdp
view src/uk/ac/qmul/eecs/depic/daw/Automation.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 |
line wrap: on
line source
/* Cross-Modal DAW Prototype - Prototype of a simple Cross-Modal Digital Audio Workstation. Copyright (C) 2015 Queen Mary University of London (http://depic.eecs.qmul.ac.uk/) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package uk.ac.qmul.eecs.depic.daw; import java.awt.Color; import uk.ac.qmul.eecs.depic.patterns.Range; import uk.ac.qmul.eecs.depic.patterns.Sequence; import uk.ac.qmul.eecs.depic.patterns.SequenceListener; /** * * An automation in a DAW. Extends Sequence which is an abstraction of an automation. * */ public interface Automation extends Sequence { /** * Adds a new {@code AutomationValue} object to this automation. * * @param position the position of the new object * @param value the value of the new object * * @return the new automation just created */ public AutomationValue add(float position, float value); /** * Removes an {@code AutomationValue} object from this automation. * * @param values * @return {@code true} if this automation changed as a result of the call */ public boolean remove(Sequence.Value value); /** * Returns the colour to draw this automation graphically * */ public Color getColor(); /** * Removes all the automation values. * */ public void reset(); /** * * NONE_AUTOMATION's colour is white * */ public final static Automation NONE_AUTOMATION = new Automation() { @Override public AutomationValue add(float position, float value) { return null; } @Override public boolean remove(Sequence.Value value) { return false; } @Override public Range<Float> getRange() { return new Range<Float>(0.0f,0.0f); } @Override public void reset() {} @Override public float getBegin() { return 0.0f; } @Override public float getEnd() { return 0.0f; } @Override public float getLen(){ return 0.0f; } @Override public int getValuesNum() { return 0; } @Override public AutomationValue getValueAt( int index) { return null; } @Override public void addSequenceListener(SequenceListener l) {} @Override public void removeSequenceListener(SequenceListener l) {} @Override public Color getColor() { return Color.WHITE; } }; }