Path: blob/master/src/java.desktop/share/classes/com/sun/media/sound/DLSRegion.java
41161 views
/*1* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.media.sound;2627import java.util.ArrayList;28import java.util.List;2930/**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 which34* is used how to synthesize a single voice.35* It is stored inside a "rgn " List Chunk inside DLS files.36*37* @author Karl Helgason38*/39public final class DLSRegion {4041public static final int OPTION_SELFNONEXCLUSIVE = 0x0001;42List<DLSModulator> modulators = new ArrayList<>();43int keyfrom;44int keyto;45int velfrom;46int velto;47int options;48int exclusiveClass;49int fusoptions;50int phasegroup;51long channel;52DLSSample sample = null;53DLSSampleOptions sampleoptions;5455public List<DLSModulator> getModulators() {56return modulators;57}5859public long getChannel() {60return channel;61}6263public void setChannel(long channel) {64this.channel = channel;65}6667public int getExclusiveClass() {68return exclusiveClass;69}7071public void setExclusiveClass(int exclusiveClass) {72this.exclusiveClass = exclusiveClass;73}7475public int getFusoptions() {76return fusoptions;77}7879public void setFusoptions(int fusoptions) {80this.fusoptions = fusoptions;81}8283public int getKeyfrom() {84return keyfrom;85}8687public void setKeyfrom(int keyfrom) {88this.keyfrom = keyfrom;89}9091public int getKeyto() {92return keyto;93}9495public void setKeyto(int keyto) {96this.keyto = keyto;97}9899public int getOptions() {100return options;101}102103public void setOptions(int options) {104this.options = options;105}106107public int getPhasegroup() {108return phasegroup;109}110111public void setPhasegroup(int phasegroup) {112this.phasegroup = phasegroup;113}114115public DLSSample getSample() {116return sample;117}118119public void setSample(DLSSample sample) {120this.sample = sample;121}122123public int getVelfrom() {124return velfrom;125}126127public void setVelfrom(int velfrom) {128this.velfrom = velfrom;129}130131public int getVelto() {132return velto;133}134135public void setVelto(int velto) {136this.velto = velto;137}138139public void setModulators(List<DLSModulator> modulators) {140this.modulators = modulators;141}142143public DLSSampleOptions getSampleoptions() {144return sampleoptions;145}146147public void setSampleoptions(DLSSampleOptions sampleOptions) {148this.sampleoptions = sampleOptions;149}150}151152153