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