1 /* 2 * Copyright (c) 2007, 2013, 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 import java.util.ArrayList; 28 import java.util.List; 29 30 /** 31 * This class is used to store region parts for instrument. 32 * A region has a velocity and key range which it response to. 33 * And it has a list of modulators/articulators which 34 * is used how to synthesize a single voice. 35 * It is stored inside a "rgn " List Chunk inside DLS files. 36 * 37 * @author Karl Helgason 38 */ 39 public final class DLSRegion { 40 41 public static final int OPTION_SELFNONEXCLUSIVE = 0x0001; 42 List<DLSModulator> modulators = new ArrayList<DLSModulator>(); 43 int keyfrom; 44 int keyto; 45 int velfrom; 46 int velto; 47 int options; 48 int exclusiveClass; 49 int fusoptions; 50 int phasegroup; 51 long channel; 52 DLSSample sample = null; 53 DLSSampleOptions sampleoptions; 54 55 public List<DLSModulator> getModulators() { 56 return modulators; 57 } 58 59 public long getChannel() { 60 return channel; 61 } 62 63 public void setChannel(long channel) { 64 this.channel = channel; 65 } 66 67 public int getExclusiveClass() { 68 return exclusiveClass; 69 } 70 71 public void setExclusiveClass(int exclusiveClass) { 72 this.exclusiveClass = exclusiveClass; 73 } 74 75 public int getFusoptions() { 76 return fusoptions; 77 } 78 79 public void setFusoptions(int fusoptions) { 80 this.fusoptions = fusoptions; 81 } 82 83 public int getKeyfrom() { 84 return keyfrom; 85 } 86 87 public void setKeyfrom(int keyfrom) { 88 this.keyfrom = keyfrom; 89 } 90 91 public int getKeyto() { 92 return keyto; 93 } 94 95 public void setKeyto(int keyto) { 96 this.keyto = keyto; 97 } 98 99 public int getOptions() { 100 return options; 101 } 102 103 public void setOptions(int options) { 104 this.options = options; 105 } 106 107 public int getPhasegroup() { 108 return phasegroup; 109 } 110 111 public void setPhasegroup(int phasegroup) { 112 this.phasegroup = phasegroup; 113 } 114 115 public DLSSample getSample() { 116 return sample; 117 } 118 119 public void setSample(DLSSample sample) { 120 this.sample = sample; 121 } 122 123 public int getVelfrom() { 124 return velfrom; 125 } 126 127 public void setVelfrom(int velfrom) { 128 this.velfrom = velfrom; 129 } 130 131 public int getVelto() { 132 return velto; 133 } 134 135 public void setVelto(int velto) { 136 this.velto = velto; 137 } 138 139 public void setModulators(List<DLSModulator> modulators) { 140 this.modulators = modulators; 141 } 142 143 public DLSSampleOptions getSampleoptions() { 144 return sampleoptions; 145 } 146 147 public void setSampleoptions(DLSSampleOptions sampleOptions) { 148 this.sampleoptions = sampleOptions; 149 } 150 }