]> ruin.nu Git - moosique.git/commitdiff
Updated the project report,
authorEinar Pehrson <einarp@itstud.chalmers.se>
Fri, 16 May 2003 00:19:35 +0000 (00:19 +0000)
committerEinar Pehrson <einarp@itstud.chalmers.se>
Fri, 16 May 2003 00:19:35 +0000 (00:19 +0000)
cleaned up the todo list,
printed out update delays,
fixed menu shortcuts,
added global shortcuts and
changed MooViewCounter constructor

MooGUI.java
MooInstrumentList.java
MooKeyboard.java
MooMenu.java
MooToolbar.java
MooView.java
MooViewCounter.java
Moosique.java
To Do.txt
report.txt

index b1bbf0d8b3e6aafed3dbee05570346fcdc7859f8..71b14937a1f8f1a0e610a08b085a43727df50ff5 100644 (file)
@@ -61,7 +61,7 @@ public class MooGUI extends JFrame {
                // Creates timer.
                timer = new java.util.Timer();
 
-               // Sets up global key listener
+               // Sets up global key listener.
                ActionMap am = getRootPane().getActionMap();
 
                Action playAction = new AbstractAction() {
@@ -73,10 +73,22 @@ public class MooGUI extends JFrame {
                                }
                        }};
                am.put("Play", playAction);
+               am.put("Octave change 2", createOctaveAction(2));
+               am.put("Octave change 4", createOctaveAction(4));
+               am.put("Octave change 6", createOctaveAction(6));
+               am.put("Octave change 8", createOctaveAction(8));
 
                InputMap im = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
                KeyStroke playKey = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0);
+               KeyStroke octave2Key = KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0);
+               KeyStroke octave4Key = KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0);
+               KeyStroke octave6Key = KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0);
+               KeyStroke octave8Key = KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0);
                im.put(playKey, "Play");
+               im.put(octave2Key, "Octave change 2");
+               im.put(octave4Key, "Octave change 4");
+               im.put(octave6Key, "Octave change 6");
+               im.put(octave8Key, "Octave change 8");
 
                // Configures window.
                addWindowListener(new MooGUICloser());
@@ -127,6 +139,14 @@ public class MooGUI extends JFrame {
                toolbar.updateProgInd(tickPosition);
        }
 
+       private Action createOctaveAction(final int octave) {
+               Action octaveAction = new AbstractAction() {
+                       public void actionPerformed(ActionEvent ae) {
+                               MooKeyboard.setOctave(octave);
+                       }};
+               return octaveAction;
+       }
+
        class MooGUICloser extends WindowAdapter {
                public void windowClosing(WindowEvent e) {
                        Moosique.quit();
index ed976dd4434d952c614a113bc77030980b2d6855..1b3378240502d654ca1b3dba95f42b7c189ccea1 100644 (file)
@@ -12,6 +12,7 @@ import java.awt.event.*;
 public class MooInstrumentList extends JComboBox implements ActionListener {
 
        protected int channel;
+       
        public MooInstrumentList(int chan) {
                super(instruments);
                setChannel(chan);       
@@ -19,7 +20,7 @@ public class MooInstrumentList extends JComboBox implements ActionListener {
                addActionListener(this);
        }
 
-       public void setChannel(int chan){
+       public void setChannel(int chan) {
                channel = chan;
                setSelectedIndex(Moosique.getChannel(channel).getProgram());
        }
index 90ed18fd4acf3d582b7569f08f16c23b25fc4ebc..11f45fce02f35f580548b8cd337cf5ec606de678 100644 (file)
@@ -47,7 +47,7 @@ public class MooKeyboard extends KeyAdapter {
         * Sets the octave of the lower part of the keyboard (default = 4)
         * @param n     the octave to start at
         */
-       public void setOctave(int n) {
+       public static void setOctave(int n) {
                startNote = n * 12;
        }
 
index 8d1caeaa11ec4a2e5a5b8413841401b0b60c5f7d..ca973298bf464b4584d7897f17bdec980e32497e 100644 (file)
@@ -23,37 +23,37 @@ public class MooMenu extends JMenuBar implements ActionListener {
                file = createMenu("File", KeyEvent.VK_F);
                add(file);
                                
-               addItem(file, "New", KeyEvent.VK_N);
-               addItem(file, "Open...", KeyEvent.VK_O);
-               addItem(file, "Save", KeyEvent.VK_S);
+               addItem(file, "New", KeyEvent.VK_N, ActionEvent.CTRL_MASK);
+               addItem(file, "Open...", KeyEvent.VK_O, ActionEvent.CTRL_MASK);
+               addItem(file, "Save", KeyEvent.VK_S, ActionEvent.CTRL_MASK);
                addItem(file, "Save as...");
-               addItem(file, "Exit", KeyEvent.VK_Q);
+               addItem(file, "Exit", KeyEvent.VK_Q, ActionEvent.CTRL_MASK);
                
                edit = createMenu("Edit", KeyEvent.VK_E);
                add(edit);
                
-               addItem(edit, "Copy", KeyEvent.VK_C);
-               addItem(edit, "Cut", KeyEvent.VK_X);
-               addItem(edit, "Paste", KeyEvent.VK_V);
-               addItem(edit, "Select all", KeyEvent.VK_E);
-               addItem(edit, "Invert selection", KeyEvent.VK_I);
-               addItem(edit, "Preferences...", KeyEvent.VK_P);
+               addItem(edit, "Copy", KeyEvent.VK_C, ActionEvent.CTRL_MASK);
+               addItem(edit, "Cut", KeyEvent.VK_X, ActionEvent.CTRL_MASK);
+               addItem(edit, "Paste", KeyEvent.VK_V, ActionEvent.CTRL_MASK);
+               addItem(edit, "Select all", KeyEvent.VK_E, ActionEvent.CTRL_MASK);
+               addItem(edit, "Invert selection", KeyEvent.VK_I, ActionEvent.CTRL_MASK);
+               addItem(edit, "Preferences...", KeyEvent.VK_P, ActionEvent.CTRL_MASK);
                
                playback = createMenu("Playback", KeyEvent.VK_P);
                add(playback);
                
-               addItem(playback, "Play", KeyEvent.VK_SPACE);
-               addItem(playback, "Pause");
-               addItem(playback, "Stop");
+               addItem(playback, "Play", "F5");
+               addItem(playback, "Pause", "F7");
+               addItem(playback, "Stop", "F6");
                addItem(playback, "Jump...");
                
                music = createMenu("Music", KeyEvent.VK_M);
                add(music);
                
-               addItem(music, "Add track...", KeyEvent.VK_A);
-               addItem(music, "Delete track...", KeyEvent.VK_D);
-               addItem(music, "Copy track...", KeyEvent.VK_Y);
-               addItem(music, "Move track...", KeyEvent.VK_M);
+               addItem(music, "Add track...", KeyEvent.VK_A, ActionEvent.CTRL_MASK);
+               addItem(music, "Delete track...", KeyEvent.VK_D, ActionEvent.CTRL_MASK);
+               addItem(music, "Copy track...", KeyEvent.VK_Y, ActionEvent.CTRL_MASK);
+               addItem(music, "Move track...", KeyEvent.VK_M, ActionEvent.CTRL_MASK);
                addItem(music, "Insert measure...");
                addItem(music, "Delete measure...");
                addItem(music, "Set time signature...");
@@ -64,29 +64,17 @@ public class MooMenu extends JMenuBar implements ActionListener {
                help = createMenu("Help", KeyEvent.VK_L);
                add(help);
                
-               addItem(help, "Contents");
+               addItem(help, "Contents", "F1");
                addItem(help, "Getting started");
                addItem(help, "About");
        }
 
-       /**
-        * creates a menu for the menubar
-        * @param name          the name of the menu
-        * @param mnemonic      the shortcut to activate the menu
-        * @return menu         the menu to be added to the menubar
-        */
        private JMenu createMenu(String name, int mnemonic) {
                JMenu menu = new JMenu(name);
                menu.setMnemonic(mnemonic);
                return menu;
        }
        
-       /**
-        * Creates a menu item.
-        * @param menu          the menu to which the item is being added to
-        * @param name          the name of this menuitem
-        * @return item         the item to add to the menu
-        */
        private JMenuItem addItem(JMenu menu, String name) {
                JMenuItem item = new JMenuItem(name);
                item.addActionListener(this);
@@ -94,34 +82,22 @@ public class MooMenu extends JMenuBar implements ActionListener {
                return item;
        }
        
-       /**
-        * Creates a menu item with a keyboard accelerator.
-        * @param menu          the menu to which the item is being added to
-        * @param name          the name of this menuitem
-        * @param key           the shortcut to activate the command
-        * @return item         the item to add to the menu
-        */
-       private JMenuItem addItem(JMenu menu, String name, int key) {
+       private JMenuItem addItem(JMenu menu, String name, String key) {
                JMenuItem item = new JMenuItem(name);
-               item.setAccelerator(KeyStroke.getKeyStroke(key, ActionEvent.CTRL_MASK));
+               item.setAccelerator(KeyStroke.getKeyStroke(key));
+               item.addActionListener(this);
+               menu.add(item);
+               return item;
+       }
+       
+       private JMenuItem addItem(JMenu menu, String name, int key, int mask) {
+               JMenuItem item = new JMenuItem(name);
+               item.setAccelerator(KeyStroke.getKeyStroke(key, mask));
                item.addActionListener(this);
                menu.add(item);
                return item;
        }
        
-       /**
-       * creates a JDialog popupmenu, containing diffrent choices
-       * @param title          the title of the dialog
-       * @return trackframe    the JDialog....ffaaaaaaaaaaaaaaaan!
-       */
-       //private JDialog makeDialog(String title){
-       //      
-       //}
-       /**
-        * checks if the fileformat is compatible with our program
-        * @param f     the file to check
-        * @return true or false
-        */
        private boolean isMidiFile(File f) {
                if(f != null) {
                        String extension = f.getName().substring(f.getName().lastIndexOf('.') + 1).toLowerCase().trim();
index 9852c6a4fe72cba4667aeaa5e9c6c2cb38d43357..a94aabdf8ef0138af880d5592a39c830c6fbd0fd 100644 (file)
@@ -149,7 +149,7 @@ public class MooToolbar extends JToolBar {
                                        Moosique.stop();
                                }
                        } else if (e.getSource() instanceof JLabel) {
-                               long position = Moosique.getPosition();
+                               long position = Moosique.getEditPosition();
                                if (e.getSource().equals(measuresValue)) {
                                        if (SwingUtilities.isRightMouseButton(e)) {
                                                position += beatsPerMeasure * ticksPerBeat;
@@ -169,7 +169,7 @@ public class MooToolbar extends JToolBar {
                                                position -= 1;
                                        }
                                }
-                               Moosique.setPosition(position);
+                               Moosique.setEditPosition(position);
                                Moosique.getGUI().update(position);
                        }
                }
index 1d15f2c8918fedfb1240e3051940fa67263568f6..5e25e02b46d046e6fa655f7eafb2a1a181c86abd 100644 (file)
@@ -30,7 +30,7 @@ public class MooView extends JScrollPane {
                columnHeader.setView(titlePanel);
                setColumnHeaderView(columnHeader);
 
-               viewCounter = new MooViewCounter(4, 4);
+               viewCounter = new MooViewCounter(null);
                JViewport rowHeader = new JViewport();
                rowHeader.setView(viewCounter);
                setRowHeaderView(rowHeader);
index 5417721106993edd4abf94e5d13800025546ccff..8383b6cb44405a8749a0ba046101689c7d05e8d6 100644 (file)
@@ -1,8 +1,9 @@
+import javax.sound.midi.*;
 import javax.swing.*;
 import java.awt.*;
 
 /**
- * 
+ * A graphical representation of the time signature of the current sequence.
  * 
  * @author  Andersson, Andreen, Lanneskog, Pehrson
  * @version 1
@@ -17,7 +18,8 @@ public class MooViewCounter extends JPanel {
         * Creates an musical ruler depending on the timesignature
         */
 
-       public MooViewCounter (int timeSig1, int timeSig2) {
+       public MooViewCounter (MetaMessage[] timeSigs) {
+               int timeSig1 = 4, timeSig2 = 4; // ...for now
                setBackground(Moosique.getGUI().bgColor);
                setPreferredSize(new Dimension(35, 200 * CELL_HEIGHT));
 
@@ -46,11 +48,9 @@ public class MooViewCounter extends JPanel {
        }
        public void paintComponent(Graphics g) {
                super.paintComponent(g);
-               setBackground(Color.black);
-
                if (!(g instanceof Graphics2D)) return;
                Graphics2D g2 = (Graphics2D)g;
-               g2.setColor(Color.white);
+               g2.setColor(Color.black);
                for (int c = 0; c < 200; c++) {
                        g2.drawLine(0, c * CELL_HEIGHT, 5, c * CELL_HEIGHT);                                    // 1/16
                        g2.drawLine(0, c * CELL_HEIGHT * halfBeat, 10, c * CELL_HEIGHT * halfBeat);             // 1/8
index 795772f46e9b04742b81fb4dffc72d65b3f43769..89669d37e972d197ffdba584062477e2c6ae5c84 100644 (file)
@@ -185,17 +185,24 @@ public class Moosique {
                // Disables input to volatile components
                // gui.disable();
 
-               // Creates the visualization thread and starts it.
+               System.out.println("Ticks/16: " + seq.getResolution()/4);
+
+               // Creates the visualisation thread and starts it.
                player = new Thread () {
                        public void run() {
+                               long position = sequencer.getTickPosition();
                                while(sequencer.isRunning()) {
+                                       long pos = sequencer.getTickPosition();
+                                       System.out.print(" ... " + (pos - position));
+                                       position = pos;
+
                                        // Updates the GUI with the current tick position.
                                        gui.update(sequencer.getTickPosition());
 
                                        // Puts the thread to sleep for as long as it takes
                                        // the sequencer to reach the next sixteenth.
                                        try {
-                                               sleep((long)((1000 * 60 * 1) / (getTempo() * 4)));
+                                               sleep((long)(15000 / getTempo()));
                                        } catch (InterruptedException e) {
                                                Moosique.stop();
                                        }
@@ -222,7 +229,7 @@ public class Moosique {
         * Returns the current editing position of the sequencer.
         * @return the tick position
         */
-       public static long getPosition() {
+       public static long getEditPosition() {
                return editPosition;
        }
 
@@ -230,7 +237,7 @@ public class Moosique {
         * Sets the current editing position of the sequencer.
         * @param ticks         the tick position
         */
-       public static void setPosition(long ticks) {
+       public static void setEditPosition(long ticks) {
                editPosition = ticks;
        }
 
index 04f500436f965ebaae41017b99f072aeeae72b88..7f23fee585ff9f7f648c0698ef78bcbde03cfba5 100644 (file)
--- a/To Do.txt
+++ b/To Do.txt
@@ -1,95 +1,48 @@
 
 \f
-FÖRDELNING
+Diverse
 
-Einar: Moosique(4), MooNote(4)
-Micke: MooGUI(4), MooTrackTitle(2), MooNoteElement(6), MooNoteProp(4)
-Björn: MooMenu(8), MooToolbar(3), MooViewCounter(1)
-Rolle: MooTrackView(16)
+x VIKTIGT!!! HUR LÄGGA TILL NOTER?!? 
 
-\f
-VIKTIGT! Implementera playfunktionens beteende.
-       När låten är slut återställes play-knappen.
-       Göra detta som en tråd?!?
+x Varför funkar inte lyssnarna på MooTrackView?!?
 
-\f
-x Får Moosique vara statisk? Fult?
 x Spara konfiguration?
        Arbetskatalog
        Fem senast öppnade filerna
        Valda MIDI-enheter
 
-\f
-MooNote / MootrackView / MooNoteElement
-
-       * Hur lägga till MooNote och NoteOff?
-               Internt vid skapandet - Då behövs track
-               Externt         new MooNote(...);
-                               ...add(MooNote);
-                               ...add(MooNote.getNoteOffEvent());
-
-               MooNote.addTo(Track track);
-               MooNote.removeFrom(Track track);
-
-       *       set/getDuration verkar inte fungera.
-
-\f
-MooTrackTitle
-
-       * Fixa InstrumentList.
-
-\f
-MooGUI
-
-       * Global KeyListener
-               Görs uppenbarligen så här:
-       
-                       JFrame someFrame = new JFrame();
-                       
-                       JComponent rootPane = someFrame.getRootPane();
-                       ActionMap am = rootPane.getActionMap();
-                       
-                       Action helpAction = new AbstractAction() {
-                            public void actionPerformed(ActionEvent ae) {
-                                showHelpWindow();
-                            }};
-                       am.put("help", helpAction);
-                       
-                       InputMap im = rootPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-                       KeyStroke helpKey = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0);
-                       im.put(helpKey, "help");
+x Integrera MooViewCounter i MooTrackView genom att istället variera de horisontella streckens gråa nyanser?!?
+       (Omöjligt att följa strecken till högra änden av skärmen.)
 
-       
-       * Globala kommandon
-       
-               * Oktavförändring i MooKeyboard
-                       Mappa F9-F12 till MooKeyboard.setOctave(n) där n = {2, 4, 6, 8}
-       
-               * Play / Stop
-                       Mappa till blanksteg. <-- Detta fungerar inte.. blanksteget
-                       används av vår toolbar.
+x Ändra längden på MooNoteElement (JPanel).
+               Känn av klick på panelens gräns, MouseMotionListener känner av när ny ruta nås.
+                       void mouseDragged(MouseEvent) 
+                               Called in response to the user moving the mouse while holding a mouse button down.
+                               This event is fired by the component that fired the most recent mouse-pressed event,
+                               even if the cursor is no longer over that component. 
 
-\f
-Moosique
+x Fixa InstrumentList.
+x Fixa så att toolbarens rutor sitter fast!
+x Visualisera inte tomma spår!
+x Räkna ut tempo och taktart.
+x Gör en ruta för tempot i Toolbar.
+x Gör en ruta för taktarten i MooViews övre vänstra hörn.
+x Implementera klart menyn, med alla dialoger.
 
-       * getPosition och setPosition - kvar?
+x Highlighta noter som spelas? (Enligt kravspec.)
 
 \f
-Skräp
+MooNote / MooTrackView / MooNoteElement
 
-               // Prints the number of notes in each track
-               int count;
-               Track[] tracks = seq.getTracks();
-               for (int k = 0; k < tracks.length; k++) {
-                       count = 0;
-                       for (int j = 0; j < tracks[k].size(); j++) {
-                               if (tracks[k].get(j) instanceof MooNote) count++;
-                       }
-                       System.out.println("Track " + k + ": " + count + " notes.");
-               }
+       * Hur lägga till MooNote och NoteOff?
+               Internt vid skapandet - Då behövs track         MooNote.addTo(Track track);
+                                                               MooNote.removeFrom(Track track);
+               Externt         new MooNote(...);
+                               ...add(MooNote);
+                               ...add(MooNote.getNoteOffEvent());
 
 \f
 MooNoteProp
-       * textfält som gör att man bara kan skriva in siffror?
+       * Textfält som gör att man bara kan skriva in siffror?
 
-\f
+\f
\ No newline at end of file
index 43f3591d9a0cafe021708aad49a53c9b7430b0ec..ca838292fcd71962e491ddd990ed45276484bd98 100644 (file)
@@ -1,64 +1,80 @@
-Foreword (optional)
-
-OBS! [...] = Hjälp till om ni kan och lägg in text
-
-1. Introduction
-
-The purpose of our project was to design and construct a composer's tool for the MIDI interface. The program was to be used for composing and sequencing MIDI songs from scratch, as well as for playback and visualization of existing MIDI files. We chose this project for two reasons. Firstly, none of us had previous experience of working with music in the Java language, so the task of developing an application using an API with which we had no previous experience was challenging. Secondly, we are all very interested in music. One of the developers is also an experienced MIDI composer.
+Foreword (optional)\r
+\r
+OBS! [...] = Hjälp till om ni kan och lägg in text\r
+\r
+1. Introduction\r
+\r
+The purpose of our project was to design and construct a composer's tool for the MIDI interface. The program was to be used for composing and sequencing MIDI songs from scratch, as well as for playback and visualisation of existing MIDI files. We chose this project for two reasons. Firstly, none of us had previous experience of working with music in the Java language, so the task of developing an application using an API with which we had no previous experience was challenging. Secondly, we are all very interested in music. One of the developers is also an experienced MIDI composer.\r
 
 The MIDI application we were going to develop was at an early stage given the name Moosique - a name obviously derived from the word music, but with a touch of moose.
-
-2. Analysis
------------------------------
-2.1 The Java MIDI Package
-Our first step was to look at the Java MIDI package (javax.sound.midi), and to try to find out what limitations the package had. As previously stated, none of us was familiar with the package and we all wanted to get an overview before we started working on the design document. And it didn't take long to realize that the functionality and structure of our application were largely dictated by the possibilities provided by the MIDI package. We also looked at software that supported MIDI to get an idea of which features our application might have.
------------------------------
-2.2 Design Document
-One of the first design decisions that was made was to divide the program into two major parts. The main part, the classes providing the actual features of the program, included four functional classes. The executable class, the only one containing a main method, was given the same name as the program - Moosique.
-
-In a hierarchy below the Moosique class, we placed three classes that represented the different parts of a MIDI file:
+\r
+2. Analysis\r
+-----------------------------\r
+2.1 The Java MIDI Package\r
+Our first step was to look at the Java MIDI package (javax.sound.midi), and to try to find out what limitations the package had. As previously stated, none of us was familiar with the package and we all wanted to get an overview before we started working on the design document. And it didn't take long to realize that the functionality and structure of our application were largely dictated by the possibilities provided by the MIDI package. We also looked at software that supported MIDI to get an idea of which features our application might have.\r
+-----------------------------\r
+2.2 Design Document \r
+One of the first design decisions that was made was to divide the program into two major parts. The main part, the classes providing the actual features of the program, included four functional classes. The executable class, the only one containing a main method, was given the same name as the program - Moosique.\r
+\r
+In a hierarchy below the Moosique class, we placed three classes that represented the different parts of a MIDI file: \r
 x MooSequence  The functional representation of a MIDI sequence. Was to extend Java's Sequence class.
 x MooTrack     The functional representation of a MIDI track. Was to extend Java's Track class.
 x MooNote      The functional representation of a MIDI note. Was to encompass the two MIDI events that constitute a note: NoteOn and NoteOff.
 
-The second part of the program was the graphical user interface, including all the graphical classes. The main class of the interface was named MooGUI. Since we had decided to use Swing in building the interface, this class was naturally to extend JFrame. Here, all other GUI components were to be created. Most of these components - maintaining different kinds of data, having listeners and requiring different methods for update their content - were to be quite complex, and were therefore given their own classes. Among these are graphical classes that construct the menu, the toolbar and the view of the MIDI tracks. All these classes [...].
+The second part of the program was the graphical user interface, including all the graphical classes. The main class of the interface was named MooGUI. Since we had decided to use Swing in building the interface, this class was naturally to extend JFrame. Here, all other GUI components were to be created. Most of these components - maintaining different kinds of data, having listeners and requiring different methods for update their content - were to be quite complex, and were therefore given their own classes. Among these are graphical classes that construct the menu, the toolbar and the view of the MIDI tracks. All these classes [...]. \r
+\r
+Apart from the strictly graphical classes we decided to make a graphical representation of the functional classes, this to get an better overview of our work [...]. MooView (a graphical representation of MooSequence), MooTrackView and MooTrackTitle (MooTrack), and MooNoteElement (MooNote). Supporting these components, some other graphical classes were needed: MooViewCounter, representing a ruler that visualises the time signature of the MIDI file; MooTrackTitle, handling the properties of a track; and MooNoteElement, supplying a way of editing the properties of a note.\r
+\r
+We put the application's design document together very quickly, perhaps a bit too quickly. We were not entirely certain of how the Java MIDI package worked. As our work with the project progressed, we were forced to reevaluate some of these design decisions and change the system design (see section [Major Decissions]). On the other hand, our interface design has barely needed any changes.\r
+------------------------------\r
+2.3 Time Schedule\r
+Before we started implementing the classes, we made a time schedule for each class and divided the classes between us. Later on, we realized that for some classes this time schedule was overly optimistic. As a consequence of these misconceptions, some of the classes were not implemented until the very last stages of the project.
 
-Apart from the strictly graphical classes we decided to make a graphical representation of the functional classes, this to get an better overview of our work [...]. MooView (a graphical representation of MooSequence), MooTrackView and MooTrackTitle (MooTrack), and MooNoteElement (MooNote). Supporting these components, some other graphical classes were needed: MooViewCounter, representing a ruler that visualizes the time signature of the MIDI file; MooTrackTitle, handling the properties of a track; and MooNoteElement, supplying a way of editing the properties of a note.
+The schedule that was made initially reflected the time required to implement the functionality of which we then knew. However, as time went on, the complexity of building this type of application became apparent and all our time estimates were by far exceeded. Also, many minor details were changed or for other reasons reimplemented, which of course took a lot of time.\r
+------------------------------\r
+2.4 Implemention\r
+As we earlier realized, some implementation of the functional classes was required to see what features the graphical representations would need. [...]\r
 
-We design the structure of the application very quickly, perhaps to quickly. We were not entirely certain of how the Java MIDI package worked. As our work with the project progressed, we were forced to reevaluate some of these design decisions and change the system design (see section [Major Decissions]).
-------------------------------
-2.3 Time Schedule
-Before we started implement the classes, we made an time-schedule for each class, and divided the classes between us. Later we realeased that for a few classes this time-schedule were very optimistic. The consequences of a misleading time-schedule were that some classes was not implemented before a very long time in the project.
-------------------------------
-2.4 Implemention
-As we earlier realised we needed to implement the functional classes first. This to see what references the graphical representation might call. [...]
-       Strictly graphical classes [...]
-------------------------------
-2.5 Testing
-------------------------------
-2.6 Major Decisions
+Strictly graphical classes [...]\r
+------------------------------\r
+2.5 Testing\r
+Är det nån som har testat nåt dårå?!?
+------------------------------\r
+2.6 Major Decisions\r
 
 2.6.1 Removing some of the functional classes
-Initially, the idea behind the functional classes - MooSequence, MooTrack and MooNote - was that they would extend the classes provided by the Java MIDI API and provide additional functionality for simplifying data manipulation. Soon however, it was discovered that this was not possible because of the methods related to these classes in the API. It was then decided that these classes would imitate the data hierarchy of the MIDI file, as the Java classes do, but provide their own implementations. When the edited sequence was to be sent to the synthesizer for playback, the data would be assembled and inserted into the Java classes. At a later stage, this design was also scrapped, the reason being that creating and maintaining such a data structure would require more code than using the somewhat limited methods of the API. MooSequence and MooTrack was therefore removed.
+Initially, the idea behind the functional classes - MooSequence, MooTrack and MooNote - was that they would extend the classes provided by the Java MIDI API and provide additional functionality for simplifying data manipulation. Soon however, it was discovered that this was not possible because of the methods related to these classes in the API. It was then decided that these classes would imitate the data hierarchy of the MIDI file, as the Java classes do, but provide their own implementations. When the edited sequence was to be sent to the synthesizer for playback, the data would be assembled and inserted into the Java classes. At a later stage, this design was also scrapped, the reason being that creating and maintaining such a data structure would require more code than using the somewhat limited methods of the API. MooSequence and MooTrack was therefore removed.\r
 
-[...]
-------------------------------
-2.7 Problems
-[...]
-------------------------------
-3. Conclusions
+2.6.2 Adding and removing some of the GUI classes
+As this was the first time for all of us in designing an application before implementation, we were not able to predict exactly which classes would be required. During the course of the project, the following classes were added: 
+x MooDialog            A dialog generator class for all the application's dialogs.
+x MooInstrumentList    A combo box with the 128 General MIDI instruments.
+x MooKeyboard          A keyboard listener emulating a synthesizer.
+
+One class, MooStatus, was also removed. It was reduced to a JLabel with a single method and was therefore merged inte the main GUI class.
+------------------------------\r
+2.7 Problems\r
+Of all the problems we have come across in our work with Moosique, only one has persisted and is yet unresolved. As always when working with Java, we were aware that the visualisation performance leaves more to be desired. But we did not expect the extremely low performance the program displayed. During playback, a thread updates the view port of the main scroll pane (MooView). However, the update delay on low-end hardware exceeds one second. This obviously makes the GUI unresponsive, but also affects synthesizer playback performance. In order for the application to work properly, this delay must at the very least fall below the time it takes the synthesizer to play a sixteenth note. In a sequence of standard tempo, 120 beats per minute, this would mean 1/8 of a second.
 
+This problem is especially unfortunate since it was the only performance aspect that was mentioned in the requirements specification. 
 
-4. References
+[Ändra font och dra ner textstorlek, citat juh!]
+"Delays during execution should be minimized, but are allowed when loading files. Playback should be smooth and delays should not change the beat or tempo."
+------------------------------\r
+3. Conclusions\r
+During the course of this project, the importance of extensive system design has become clear to us. With no prior experience in writing such documents or with working with the API in question, designing every aspect of our application would have been nearly impossible without at least approaching the implementation phase. In the future, our proficiency in this field will hopefully improve drastically, and we will be able to save a lot of implementation time by writing more complete design documentation.\r
+\r
+------------------------------
+4. References\r
 
 LITTERATURE
 Sun Microsystems Inc. (2002) Java Sound API Programmer's Guide [http://java.sun.com/j2se/1.4.1/docs/guide/sound/programmer_guide/]
-Horstmann, Cay (2003) Computing Concepts with Java Essentials (3rd Edition), New York: John Wiley & Sons Inc. ISBN: 0-471-24371-x
-Jia, Xiao-Ping (2000) Object-Oriented Software Development Using Java, Addison and Wesley Longman, Inc, ISBN: 0-201-35084-X
-MCConell, Steve (1993) Code Complete, Redmond: Microsoft Press, ISBN: 1-55615-484-4 
+Horstmann, Cay (2003) Computing Concepts with Java Essentials (3rd Edition), New York: John Wiley & Sons Inc.
+Jia, Xiao-Ping\r
+Code Complete\r
 
 APPLICATIONS
-FastTracker II
-MidiSoft Recording Session
-CakeWalk 5
+FastTracker II\r
+MidiSoft Recording Session\r
+CakeWalk 5\r
 Cubase SX 1.0