+ /**
+ * Returns a pointer to the MidiChannels of the selected synthesizer.
+ * @return the available MidiChannels
+ */
+ public static MidiChannel[] getChannels() {
+ return channels;
+ }
+
+ /**
+ * Returns a pointer to the currently active MidiChannel.
+ * @return the active MidiChannel
+ */
+ public static MidiChannel getActiveChannel() {
+ return activeChannel;
+ }
+
+ /**
+ * Sets the currently active MidiChannel.
+ * @param channel the number of the MidiChannel to activate
+ */
+ public static void setActiveChannel(int channel) {
+ activeChannel = channels[channel];
+ }
+
+ /**
+ * Replaces the current sequence with a new one, holding three empty tracks.
+ */
+ public static void clearSequence() {
+ // Creates sequence.
+ try {
+ seq = new Sequence(Sequence.PPQ, 96, 3);
+ } catch (InvalidMidiDataException e) {}
+ // Sends sequence to GUI.
+ if (gui != null) gui.setSequence(seq);
+
+ }
+
+ /**