author | never |
Mon, 12 Jul 2010 22:27:18 -0700 | |
changeset 5926 | a36f90d986b6 |
parent 5506 | 202f599c92aa |
child 18215 | b2afd66ce6db |
permissions | -rw-r--r-- |
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
4 |
* |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
10 |
* |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
15 |
* accompanied this code). |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
16 |
* |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
20 |
* |
5506 | 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. |
|
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
24 |
*/ |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
25 |
package com.sun.media.sound; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
26 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
27 |
import javax.sound.midi.MidiChannel; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
28 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
29 |
/** |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
30 |
* A MidiChannel proxy object used for external access to synthesizer internal |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
31 |
* channel objects. |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
32 |
* |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
33 |
* @author Karl Helgason |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
34 |
*/ |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
35 |
public class SoftChannelProxy implements MidiChannel { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
36 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
37 |
private MidiChannel channel = null; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
38 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
39 |
public MidiChannel getChannel() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
40 |
return channel; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
41 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
42 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
43 |
public void setChannel(MidiChannel channel) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
44 |
this.channel = channel; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
45 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
46 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
47 |
public void allNotesOff() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
48 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
49 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
50 |
channel.allNotesOff(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
51 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
52 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
53 |
public void allSoundOff() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
54 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
55 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
56 |
channel.allSoundOff(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
57 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
58 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
59 |
public void controlChange(int controller, int value) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
60 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
61 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
62 |
channel.controlChange(controller, value); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
63 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
64 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
65 |
public int getChannelPressure() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
66 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
67 |
return 0; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
68 |
return channel.getChannelPressure(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
69 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
70 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
71 |
public int getController(int controller) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
72 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
73 |
return 0; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
74 |
return channel.getController(controller); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
75 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
76 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
77 |
public boolean getMono() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
78 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
79 |
return false; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
80 |
return channel.getMono(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
81 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
82 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
83 |
public boolean getMute() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
84 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
85 |
return false; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
86 |
return channel.getMute(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
87 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
88 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
89 |
public boolean getOmni() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
90 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
91 |
return false; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
92 |
return channel.getOmni(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
93 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
94 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
95 |
public int getPitchBend() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
96 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
97 |
return 8192; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
98 |
return channel.getPitchBend(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
99 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
100 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
101 |
public int getPolyPressure(int noteNumber) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
102 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
103 |
return 0; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
104 |
return channel.getPolyPressure(noteNumber); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
105 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
106 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
107 |
public int getProgram() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
108 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
109 |
return 0; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
110 |
return channel.getProgram(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
111 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
112 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
113 |
public boolean getSolo() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
114 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
115 |
return false; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
116 |
return channel.getSolo(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
117 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
118 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
119 |
public boolean localControl(boolean on) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
120 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
121 |
return false; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
122 |
return channel.localControl(on); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
123 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
124 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
125 |
public void noteOff(int noteNumber) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
126 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
127 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
128 |
channel.noteOff(noteNumber); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
129 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
130 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
131 |
public void noteOff(int noteNumber, int velocity) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
132 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
133 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
134 |
channel.noteOff(noteNumber, velocity); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
135 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
136 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
137 |
public void noteOn(int noteNumber, int velocity) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
138 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
139 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
140 |
channel.noteOn(noteNumber, velocity); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
141 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
142 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
143 |
public void programChange(int program) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
144 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
145 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
146 |
channel.programChange(program); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
147 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
148 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
149 |
public void programChange(int bank, int program) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
150 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
151 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
152 |
channel.programChange(bank, program); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
153 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
154 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
155 |
public void resetAllControllers() { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
156 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
157 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
158 |
channel.resetAllControllers(); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
159 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
160 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
161 |
public void setChannelPressure(int pressure) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
162 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
163 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
164 |
channel.setChannelPressure(pressure); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
165 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
166 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
167 |
public void setMono(boolean on) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
168 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
169 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
170 |
channel.setMono(on); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
171 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
172 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
173 |
public void setMute(boolean mute) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
174 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
175 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
176 |
channel.setMute(mute); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
177 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
178 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
179 |
public void setOmni(boolean on) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
180 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
181 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
182 |
channel.setOmni(on); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
183 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
184 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
185 |
public void setPitchBend(int bend) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
186 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
187 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
188 |
channel.setPitchBend(bend); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
189 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
190 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
191 |
public void setPolyPressure(int noteNumber, int pressure) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
192 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
193 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
194 |
channel.setPolyPressure(noteNumber, pressure); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
195 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
196 |
|
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
197 |
public void setSolo(boolean soloState) { |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
198 |
if (channel == null) |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
199 |
return; |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
200 |
channel.setSolo(soloState); |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
201 |
} |
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
diff
changeset
|
202 |
} |