]> ruin.nu Git - moosique.git/blob - report.txt
Readded the MooKeyboard listener to MooTrackView.
[moosique.git] / report.txt
1 Foreword (optional)\r
2 \r
3 OBS! [...] = Hjälp till om ni kan och lägg in text\r
4 \r
5 1. Introduction\r
6 \r
7 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.\r
8
9 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.
10 \r
11 2. Analysis\r
12 -----------------------------\r
13 2.1 The Java MIDI Package\r
14 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
15 -----------------------------\r
16 2.2 Design Document \r
17 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
18 \r
19 In a hierarchy below the Moosique class, we placed three classes that represented the different parts of a MIDI file: \r
20 x MooSequence   The functional representation of a MIDI sequence. Was to extend Java's Sequence class.
21 x MooTrack      The functional representation of a MIDI track. Was to extend Java's Track class.
22 x MooNote       The functional representation of a MIDI note. Was to encompass the two MIDI events that constitute a note: NoteOn and NoteOff.
23
24 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
25 \r
26 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.\r
27 \r
28 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]).\r
29 ------------------------------\r
30 2.3 Time Schedule\r
31 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.\r
32 ------------------------------\r
33 2.4 Implemention\r
34 As we earlier realised we needed to implement the functional classes first. This to see what references the graphical representation might call. [...]\r
35         Strictly graphical classes [...]\r
36 ------------------------------\r
37 2.5 Testing\r
38 ------------------------------\r
39 2.6 Major Decisions\r
40
41 2.6.1 Removing some of the functional classes
42 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
43
44 [...]\r
45 ------------------------------\r
46 2.7 Problems\r
47 [...]\r
48 ------------------------------\r
49 3. Conclusions\r
50 \r
51 \r
52 4. References\r
53
54 LITTERATURE
55 Sun Microsystems Inc. (2002) Java Sound API Programmer's Guide [http://java.sun.com/j2se/1.4.1/docs/guide/sound/programmer_guide/]
56 Horstmann, Cay (2003) Computing Concepts with Java Essentials (3rd Edition), New York: John Wiley & Sons Inc.
57 Jia, Xiao-Ping\r
58 Code Complete\r
59
60 APPLICATIONS
61 FastTracker II\r
62 MidiSoft Recording Session\r
63 CakeWalk 5\r
64 Cubase SX 1.0