]> ruin.nu Git - moosique.git/blobdiff - report.txt
no message
[moosique.git] / report.txt
index 3711ef97b85a00458102d09706a403c7e0ccb2dd..914ffed6b00ba80a8d2afc422df4f1885a2b0d86 100644 (file)
@@ -21,9 +21,9 @@ x MooSequence         The functional representation of a MIDI sequence. Was to extend J
 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 toolbart, the menu's popup dialogs 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 application's popup dialogs.
 
-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.
+Apart from the general GUI components, graphical representations of the functional classes were needed. MooView (a graphical representation of MooSequence), MooTrackView and MooTrackTitle (MooTrack), and MooNoteElement (MooNote) were therefore added. 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; as well as MooNoteElement and MooNoteProp, supplying a way of editing the properties of a note.
 
 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.
 ------------------------------
@@ -42,6 +42,9 @@ Implementing the strictly graphical classes has at some points been both tricky,
 In retrospect it maybe would have been better if we chose to work only with the Java AWT library (see section [Problems]).
 ------------------------------
 2.5 Testing
+When it comes to testing, we have not really 
+In most cases, it doesn't make sense to test the graphical container without its child components. The classes MooGUI, MooView and MooTrackView were all concerned by this.
+
 See section [Implemention and Problems]
 ------------------------------
 2.6 Major Decisions
@@ -55,7 +58,7 @@ 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.
+Two classes, MooStatus and MooNoteProp, were also removed. The status bar was reduced to a JLabel with a single method and was therefore merged inte the main GUI class. The note properties dialog was inserted into the new MooDialog class.
 ------------------------------
 2.7 Problems
 Of all the problems we have come across in our work with Moosique, only one persisted and was until very recently 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 exceeded one second. This obviously made the GUI unresponsive, but also affected 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.
@@ -67,6 +70,8 @@ This problem was especially unfortunate since it was the only performance aspect
 
 However, as we recently discovered, the Sun developers were also aware of this issue and, in trying to find a remedy for it, implemented some additional methods for controlling the viewport's visualisation during scrolling. This allowed us to reduce the time lag to a fraction.
 
+Another issue, that could be resolved only through trial-and-error, was the application's interaction with the setSequence method of the Sequencer class. The method employs, as opposed to what is customary in Java, dereferencing of its argument. This means that the MIDI sequence passed to the method is somehow cloned before it is sent to the sequencer, and therefore when the data of the sequence is updated, the changes are not reflected in the sequence currently loaded into the sequencer. In the Programmer's Guide, this method is described as "[tying] together an existing Sequence with the Sequencer, which is somewhat analogous to loading a tape onto a tape recorder". However, the actual implementation of the method (which may be vendor specific) does not work that way, since the "tape recorder" reads the contents of the "tape", but then does not respond to any changes in the "tape" unless the tape is reinserted. This incomprehensible implementation, which is not even hinted at in the API or the Programmer's Guide, didn't cause us a lot of extra work (since we could not understand where the problem was), but postponed a vital step in our implementation to the very last stage of the project.
+
 During our project some time has also been wasted when wrestling with Java Swing components showing up at the wrong position whith the wrong size. No matter how much we studied the API we could not find the answer of this problem. In the end we found out that rebooting our FreeBSD machines was the only cure to this problem. We suspect there is some kind of bug, either in the FreeBSD OS, or the windomaker application we use. After all, we never ran into this problem those rare times we were working on a Windows-platform
 
 The major changes and that not enough work design of the graphical classes resulted in that the different graphical classes couldn't be implemented on their own. Instead changes often had to take place in many different classes when some feature was added. This made the implementation slow, especially in the beginning, since there where many different ideas on how things should be implemented. This got better through time though, when the basic foundation was implemented it got easier to add the rest of the features.