Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]
    1   /*
    2    * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4    *
    5    * This code is free software; you can redistribute it and/or modify it
    6    * under the terms of the GNU General Public License version 2 only, as
    7    * published by the Free Software Foundation.  Oracle designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Oracle in the LICENSE file that accompanied this code.
   10    *
   11    * This code is distributed in the hope that it will be useful, but WITHOUT
   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14    * version 2 for more details (a copy is included in the LICENSE file that
   15    * accompanied this code).
   16    *
   17    * You should have received a copy of the GNU General Public License version
   18    * 2 along with this work; if not, write to the Free Software Foundation,
   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20    *
   21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   22    * or visit www.oracle.com if you need additional information or have any
   23    * questions.
   24    */
   25   package com.sun.media.sound;
   26   
   27   /**
   28    * This class is used to identify destinations in connection blocks,
   29    * see ModelConnectionBlock.
   30    *
   31    * @author Karl Helgason
   32    */
   33   public class ModelDestination {
   34   
   35       public static final ModelIdentifier DESTINATION_NONE = null;
   36       public static final ModelIdentifier DESTINATION_KEYNUMBER
   37               = new ModelIdentifier("noteon", "keynumber");
   38       public static final ModelIdentifier DESTINATION_VELOCITY
   39               = new ModelIdentifier("noteon", "velocity");
   40       public static final ModelIdentifier DESTINATION_PITCH
   41               = new ModelIdentifier("osc", "pitch");   // cent
   42       public static final ModelIdentifier DESTINATION_GAIN
   43               = new ModelIdentifier("mixer", "gain");   // cB
   44       public static final ModelIdentifier DESTINATION_PAN
   45               = new ModelIdentifier("mixer", "pan");   // 0.1 %
   46       public static final ModelIdentifier DESTINATION_REVERB
   47               = new ModelIdentifier("mixer", "reverb");   // 0.1 %
   48       public static final ModelIdentifier DESTINATION_CHORUS
   49               = new ModelIdentifier("mixer", "chorus");   // 0.1 %
   50       public static final ModelIdentifier DESTINATION_LFO1_DELAY
   51               = new ModelIdentifier("lfo", "delay", 0); // timecent
   52       public static final ModelIdentifier DESTINATION_LFO1_FREQ
   53               = new ModelIdentifier("lfo", "freq", 0); // cent
   54       public static final ModelIdentifier DESTINATION_LFO2_DELAY
   55               = new ModelIdentifier("lfo", "delay", 1); // timecent
   56       public static final ModelIdentifier DESTINATION_LFO2_FREQ
   57               = new ModelIdentifier("lfo", "freq", 1); // cent
   58       public static final ModelIdentifier DESTINATION_EG1_DELAY
   59               = new ModelIdentifier("eg", "delay", 0); // timecent
   60       public static final ModelIdentifier DESTINATION_EG1_ATTACK
   61               = new ModelIdentifier("eg", "attack", 0); // timecent
   62       public static final ModelIdentifier DESTINATION_EG1_HOLD
   63               = new ModelIdentifier("eg", "hold", 0); // timecent
   64       public static final ModelIdentifier DESTINATION_EG1_DECAY
   65               = new ModelIdentifier("eg", "decay", 0); // timecent
   66       public static final ModelIdentifier DESTINATION_EG1_SUSTAIN
   67               = new ModelIdentifier("eg", "sustain", 0);
   68                                           // 0.1 % (I want this to be value not %)
   69       public static final ModelIdentifier DESTINATION_EG1_RELEASE
   70               = new ModelIdentifier("eg", "release", 0); // timecent
   71       public static final ModelIdentifier DESTINATION_EG1_SHUTDOWN
   72               = new ModelIdentifier("eg", "shutdown", 0); // timecent
   73       public static final ModelIdentifier DESTINATION_EG2_DELAY
   74               = new ModelIdentifier("eg", "delay", 1); // timecent
   75       public static final ModelIdentifier DESTINATION_EG2_ATTACK
   76               = new ModelIdentifier("eg", "attack", 1); // timecent
   77       public static final ModelIdentifier DESTINATION_EG2_HOLD
   78               = new ModelIdentifier("eg", "hold", 1); // 0.1 %
   79       public static final ModelIdentifier DESTINATION_EG2_DECAY
   80               = new ModelIdentifier("eg", "decay", 1); // timecent
   81       public static final ModelIdentifier DESTINATION_EG2_SUSTAIN
   82               = new ModelIdentifier("eg", "sustain", 1);
   83                                           // 0.1 % ( I want this to be value not %)
   84       public static final ModelIdentifier DESTINATION_EG2_RELEASE
   85               = new ModelIdentifier("eg", "release", 1); // timecent
   86       public static final ModelIdentifier DESTINATION_EG2_SHUTDOWN
   87               = new ModelIdentifier("eg", "shutdown", 1); // timecent
   88       public static final ModelIdentifier DESTINATION_FILTER_FREQ
   89               = new ModelIdentifier("filter", "freq", 0); // cent
   90       public static final ModelIdentifier DESTINATION_FILTER_Q
   91               = new ModelIdentifier("filter", "q", 0); // cB
   92       private ModelIdentifier destination = DESTINATION_NONE;
   93       private ModelTransform transform = new ModelStandardTransform();
   94   
   95       public ModelDestination() {
   96       }
   97   
   98       public ModelDestination(ModelIdentifier id) {
   99           destination = id;
  100       }
  101   
  102       public ModelIdentifier getIdentifier() {
  103           return destination;
  104       }
  105   
  106       public void setIdentifier(ModelIdentifier destination) {
  107           this.destination = destination;
  108       }
  109   
  110       public ModelTransform getTransform() {
  111           return transform;
  112       }
  113   
  114       public void setTransform(ModelTransform transform) {
  115           this.transform = transform;
  116       }
  117   }

Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]