1 import javax.sound.midi.*;
5 * Moosique - The trackers approach to MIDI
7 * Main class that handles initiation, IO and sound FX.
9 * @author Andersson, Andreen, Lanneskog, Pehrson
13 public class Moosique {
15 private static MooGUI gui;
16 private static MooSequence seq;
17 private static String filename;
20 * Runs the application.
22 public static void main (String[] args) {
27 * Returns a pointer to the current sequence.
28 * @return the current sequence
30 public static MooSequence getSequence() {
35 * Starts playback of the current sequence.
37 public static void play() {
42 * Pauses playback of the current sequence.
44 public static void pause() {
49 * Stops playback of the current sequence.
51 public static void stop() {
56 * Rewinds the current sequence the given number of measures.
57 * @param measures the number of measures to rewind
59 public static void rewind(int measures) {
64 * Fast forwards the current sequence the given number of measures.
65 * @param measures the number of measures to fast forward
67 public static void forward(int measures) {
72 * Loads the MooSequence in the given file.
73 * @param filename the filename to use
75 public static void load(String filename) throws IOException {
80 * Saves the current sequence to the given filename
81 * @param filename the filename to use
83 public static void saveAs(String filename) throws IOException {
88 * Saves the current sequence to the previously given filename.
90 public static void save() throws IOException {
95 * Exports the current sequence to a standard MIDI file.
96 * @param filename the filename to use
98 public static void exportMIDI(String filename) throws IOException {