Manual for JavaMod


last changed at 06/14/2014


The topics:

1. Download and installation

You need at least Java 5 installed to run this mod player!

Download and installation is very simple. Just download the jar file and move it to any location you like. In this example we assume you saved javamod in the directory "C:\javamod".
To start javamod simple double-click on the javamod.jar file.

Maybe you would like to create a link in your start folder. This is also quite simple:
- right-click on "Programms" and choose "open" or "open for all users"
- right-click on the background to create a new folder named "javamod"
- double-click on the new folder "javamod"
- right-click on the background to create a new link
- USe the following path: "%JAVA_HOME%\bin\javaw.exe -jar C:\JavaMod\javamod.jar" (if java_home is not set, give the full path to javaw.exe here)
- give a name of your choice, e.g. "JavaMod 1.6"
- now we will add a new icon:
  * download the icon file and store it into the javamod directory by right-clicking on the link below and choosing "save as..."
downloadbutton javamod.ico

  * right-click on the generated new link and select "properties"-->"new icon"
  * give the path to the new icon: e.g. "C:\JavaMod\javamod.ico"


If you would like to embed JavaMod in Windows via the file extensions you need to do a bit more. First of all you need a batch file to start java mod with. This batch file should be stored in "C:\javamod" as well and could look like this:

test.bat


Now simple associate this batch file with the file suffixes "mod", "xm", "s3m", "stm", "it", "mp3", "mid", "midi", "au", "aif". This can be done by simply right-clicking on a desired file, choose "open with..." and click on "Select programm".
The parameter are discussed later in this document!



2. Parameter

Both the applet and the command line have paramters to configure the mod playback. This is a bit historical as the old DosMod used nearly the same parameters.

These are:
-rxuse Samplerate x (8000/11025/22050/44100/96000... anything allowed, your soundhardware supports)
-b8/16/24#Bits per sample
-i0/1/2/3interpolation: 0:none; 1:linear; 2:cubic spline; 3:fir interpolation
-s+/-Stereo/Mono
-w+/-do/don't wide stereo mix
-n+/-do/don't noise reduction
-m+/-do/don't mega bass
-l+/-do/don't fade out infinit loops
-h+/-do/don't shuffle playlists after loading
-a+/-do/don't autostart playback (applet only)
-eWAVEFILEexport to wave file

You can see these parameters by calling the command line version without any parameter:
java -cp C:/JavaMod/javamod.jar de.quippy.javamod.main.CommandLine

A word to the performance: if you use 96000Hz, 24Bit and Fir-Interpolation you need a fast machine to calculate this. Using the applet you should address a wide spectum of different machines out there.
The noise reduction has a similar effect as the interpolations with significant lower CPU usage; so if you combine the noise reduction with lower sample rates, you can use none or linear interpolation with fairly good results. You can try this out in the gui version...

JavaMod also supports playlists (m3u and pls) generated by winamp (or similar programms). So far there is now playlist editor in JavaMod itself, so please use "notepad" ;-) or winamp to generate your playlists. With the parameter "h" for shuffle these playlists can be shuffled after loading. This is quite nice if you use the applet version. Your visitors will not hear the same mod file at each visit.
With applets you have to use URLs to your files - in a local version you can use the typical references.

Sample for a playlist (m3u, generated by winamp for local use):


Sample for a playlist (m3u, generated by notepad for applets):




3. Integration of the applet code

Using the applet is again very simple. You need the following code to integrate the applet in your homepage. If you would like to know more about the applet tag please visit selfhtml.org (german page) or try google

Sample from the appletpage on quippy.de:



To integrate javamod on your own homepage do the following:
- create a new folder on your webspace, e.g. javamod
- copy javamod.jar to this location
- copy your modfiles you want to play to this directory
- create a playlist file for these files, e.g.
  and place this file in the same direcory under the name "playist.m3u"

Some advice for the content of the playlist
- NEVER encode the URLs to mask spaces or other characters. JavaMod will do this for you when loading the content of the playlist file.
- MAKE SURE all types of files you whant to stream to the applet have a MIME-TYPE installed with the webserver you use.
- YOU CAN work with relative file names in the playlist - the location of the playlist will be used for reference


- in your HTML-page include the following (minimal) code:

You might use a relative path to javamod.jar in the archive-Parameter - like I did in my applettest.
But never use a relative path to the playlist file!

- now you can add some parameters.
With a playlist the parameter "<param name="l" value="+">" is very usefull to avoid infinit loops, that can be found in some mod files.
Also the "<param name="h" value="+">" would be a good choice so your visitors will always listen to different files.



4. Defining your own gui with the applet

With the applet you can change the default look by using your own drawn image. What you need is
And that's it. The following example will speak for itself:


The content of the "ui.properties" is as follows:


The first parameter gives the path to the desired bitmap.
Second you need to provide the coordinates (left, top, right, bottom) of each button on the image so the applet knows where to react on what. If a button is not provided, leave the coordinates (0,0,0,0).
Last you give the position and color (red, green, blue) for the led-scroller. In the image You have to provide enough space to make the scroller work. Each Character is 6x8 pixles. So to show 10 chars you need to reserve an area of at least 10*6=60 pixles wide and 8 pixles high.
If you want LEDs to show up (not a solid scroller), you need to add additional space for the 1 pixles black lines (vertically and horizontally). E.g. to show 10 characters with 1 pixle blocks you than need 10*(6 + 6) = 120 pixles width and 8+8 pixles hight.
Notice that this is not 6*2 but 6+6! If you want 10 characters with 2x2 pixle blocks you need 10*((6*2) + 6) = 180 pixles width and (8*2)+8 = 24 pixle height.
Confused?!

Well, that's it...