private final String[] valueStrings = new String[4];
public Impl_MultiModeChannelSelection(MultiModeContext mmc, int[] selCols, int row) {
channel = IntPool.get(row + 1);
MultiModeDescriptor mmd = mmc.getMultiModeDescriptor();
GeneralParameterDescriptor preset_pd = mmd.getPresetParameterDescriptor();
GeneralParameterDescriptor vol_pd = mmd.getVolumeParameterDescriptor();
GeneralParameterDescriptor pan_pd = mmd.getPanParameterDescriptor();
GeneralParameterDescriptor submix_pd = mmd.getSubmixParameterDescriptor();
MultiModeMap m = mmc.getMultimodeMap();
for (int i = 0, n = selCols.length; i < n; i++) {
if (selCols[i] == 0) {
try {
values[0] = m.getPreset(channel);
valueStrings[0] = preset_pd.getStringForValue(values[0]);
} catch (IllegalMidiChannelException e) {
e.printStackTrace();
} catch (ParameterValueOutOfRangeException e) {
e.printStackTrace();
}
}
if (selCols[i] == 1) {
try {
values[1] = m.getVolume(channel);
valueStrings[1] = vol_pd.getStringForValue(values[1]);
} catch (IllegalMidiChannelException e) {
e.printStackTrace();
} catch (ParameterValueOutOfRangeException e) {
e.printStackTrace();
}
}
if (selCols[i] == 2) {
try {
values[2] = m.getPan(channel);
valueStrings[2] = pan_pd.getStringForValue(values[2]);
} catch (IllegalMidiChannelException e) {
e.printStackTrace();
} catch (ParameterValueOutOfRangeException e) {
e.printStackTrace();
}
}
if (selCols[i] == 3) {
try {
values[3] = m.getSubmix(channel);
valueStrings[3] = submix_pd.getStringForValue(values[3]);
} catch (IllegalMidiChannelException e) {
e.printStackTrace();
} catch (ParameterValueOutOfRangeException e) {
e.printStackTrace();
}