jMusic setupBefore we do any programming it is important to understand how things fit together. This is quite complex but for the moment all we need to discuss are the basics, and here they are. ClasspathjMusic is split into a number of core packages. If you downloaded the jMusic source files you will see that they are contained in a number of directories. A java package must live in the same directory as their package name. Therefore all files in the package jm.music.data will be found in the directory jm/music/data. The directory in which jm lives must be included in your CLASSPATH so that Java knows where to find the jMusic files. For example, if you want to put all your code in a directory called c:\code\ you might want to put jm in there as well so that you end up with c:\code\jm\music\data. Your CLASSPATH may look like this classpath=.;c:\java\lib\classes.zip;c:\code . For the Macintosh OS the class path is a folder called MRJ Libraries in the Extensions Folder within the System Folder. Drop the jm folder, or jm.jar file, or jm.zip file into that MRJ Library folder. All done, sorry about that for all you Java legends out there. For more details on setting up jMusic see the download page. What goes WhereThe reason we use packages is to contain code within like parts. In jMusic there are four significant packages at the moment. They are:
Feel free to peruse the .java files contained in these packages and see what they do. If you don't understand everything that's going on that's ok, just have a look anyway. jm.music.data.*Let's turn our attention to the jm.music.data package as this is the only one that you really need to know. It contains four Java source code file:
These classes form the backbone of the jMusic data structure which allows you, the composer, to create, analyse, manipulate or maybe mutilate music. The next section looks at these classes in more detail. |
|
|
|
|
|
|