K-Gater, Part 10


Although there are a few extra voice presets for the default software synthesizer, they behave exactly the same way as for the K-Pro buttons in the north panel. This section is for the Middle Panel.

jButton26ActionPerformed
Go up one in the default synth instrument list.

jButton27ActionPerformed
Go down one in the instrument list.

jButton28ActionPerformed
Set the dSaveTo flag for saving the instrument selected in jComboBox3 to one of the 12 default voice preset buttons.

jButton14ActionPerformed
jButton15ActionPerformed
jButton16ActionPerformed
jButton17ActionPerformed
jButton18ActionPerformed
jButton19ActionPerformed
jButton20ActionPerformed
jButton21ActionPerformed
jButton22ActionPerformed
jButton23ActionPerformed
jButton24ActionPerformed
The calls to SetVoice() for the 12 default software synthesizer preset buttons.

——————————-

Formatted text file.

// User clicked on the down button to select the next instrument from the combo box for the Java default software synthesizer.

private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
int sel = jComboBox3.getSelectedIndex(); // Built-in Synth instrument Down select
if(sel > 0) {
sel–;
jComboBox3.setSelectedIndex(sel);
}
}//GEN-LAST:event_jButton26ActionPerformed

// User clicked on the up button to select the previous instrument from the combo box for the Java default software synthesizer.

private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
int sel = jComboBox3.getSelectedIndex(); // Built-in Synth instrument Up select
if(sel < jComboBox3.getItemCount() – 1) {
sel++;
jComboBox3.setSelectedIndex(sel);
}
}//GEN-LAST:event_jButton27ActionPerformed

// User clicked on SaveTo for the Java default software synthesizer preset buttons.

private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
dSaveTo = true; // Built-in Synth instrument Save to
}//GEN-LAST:event_jButton28ActionPerformed

// Ok, the next 12 buttons are going to all be the same agin. This time, they’re for the preset buttons for the
// Java default software synthesizer.

private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
// Selected default synth channel 1
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo, 14, 0, dSaveTo);
}//GEN-LAST:event_jButton14ActionPerformed

private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
// Selected default synth channel 2
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+1, 15, 0, dSaveTo);
}//GEN-LAST:event_jButton15ActionPerformed

private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
// Selected default synth channel 3
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+2, 16, 0, dSaveTo);
}//GEN-LAST:event_jButton16ActionPerformed

private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
// Selected default synth channel 4
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+3, 17, 0, dSaveTo);
}//GEN-LAST:event_jButton17ActionPerformed

private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
// Selected default synth channel 5
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+4, 18, 0, dSaveTo);
}//GEN-LAST:event_jButton18ActionPerformed

private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
// Selected default synth channel 6
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+5, 19, 0, dSaveTo);
}//GEN-LAST:event_jButton19ActionPerformed

private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
// Selected default synth channel 7
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+6, 20, 0, dSaveTo);
}//GEN-LAST:event_jButton20ActionPerformed

private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
// Selected default synth channel 8
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+7, 21, 0, dSaveTo);
}//GEN-LAST:event_jButton21ActionPerformed

private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
// Selected default synth channel 9
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+8, 22, 0, dSaveTo);
}//GEN-LAST:event_jButton22ActionPerformed

private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
// Selected default synth channel 10
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+9, 23, 0, dSaveTo);
}//GEN-LAST:event_jButton23ActionPerformed

private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
// Selected default synth channel 11
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+10, 24, 0, dSaveTo);
}//GEN-LAST:event_jButton24ActionPerformed

private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
// Selected default synth channel 12
// (int voiceNum, String voiceName, ch, buttonId, int kProId, boolean voiceSave)
dSaveTo = setVoice(jComboBox3.getSelectedIndex(), (String) jComboBox3.getSelectedItem(), midiPorts.defaultChannelNo+11, 25, 0, dSaveTo);
}//GEN-LAST:event_jButton25ActionPerformed

 

Advertisements
Previous Post
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: