1 |
/* |
/* |
2 |
* jlscp - a java LinuxSampler control protocol API |
* jlscp - a java LinuxSampler control protocol API |
3 |
* |
* |
4 |
* Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2011 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of jlscp. |
* This file is part of jlscp. |
7 |
* |
* |
34 |
private int midiController = -1; |
private int midiController = -1; |
35 |
private float level = 0; |
private float level = 0; |
36 |
private Integer[] aor = null; |
private Integer[] aor = null; |
37 |
|
private int destChainId = -1; |
38 |
|
private int destChainPos = -1; |
39 |
|
|
40 |
|
|
41 |
/** Creates a new instance of <code>FxSend</code> */ |
/** Creates a new instance of <code>FxSend</code> */ |
111 |
public Integer[] |
public Integer[] |
112 |
getAudioOutputRouting() { return aor; } |
getAudioOutputRouting() { return aor; } |
113 |
|
|
114 |
|
/** Gets the destination send effect chain ID. */ |
115 |
|
public int |
116 |
|
getDestChainId() { return destChainId; } |
117 |
|
|
118 |
|
/** Gets the destination send effect chain position. */ |
119 |
|
public int |
120 |
|
getDestChainPos() { return destChainPos; } |
121 |
|
|
122 |
/** |
/** |
123 |
* Parses a line of text. |
* Parses a line of text. |
124 |
* @param s The string to be parsed. |
* @param s The string to be parsed. |
138 |
} else if(s.startsWith("AUDIO_OUTPUT_ROUTING: ")) { |
} else if(s.startsWith("AUDIO_OUTPUT_ROUTING: ")) { |
139 |
s = s.substring("AUDIO_OUTPUT_ROUTING: ".length()); |
s = s.substring("AUDIO_OUTPUT_ROUTING: ".length()); |
140 |
aor = Parser.parseIntList(s); |
aor = Parser.parseIntList(s); |
141 |
|
} else if(s.startsWith("EFFECT: ")) { |
142 |
|
s = s.substring("EFFECT: ".length()); |
143 |
|
if("NONE".equals(s)) { |
144 |
|
destChainId = destChainPos = -1; |
145 |
|
} else { |
146 |
|
Integer[] list = Parser.parseIntList(s); |
147 |
|
if(list.length != 2) { |
148 |
|
Client.getLogger().info("FxSend: EFFECT field format unknown"); |
149 |
|
} else { |
150 |
|
destChainId = list[0]; |
151 |
|
destChainPos = list[1]; |
152 |
|
} |
153 |
|
|
154 |
|
} |
155 |
|
|
156 |
} else return false; |
} else return false; |
157 |
|
|
158 |
return true; |
return true; |