MaxBase Jukebox!
----------------

What is it? 
-----------

This is a MaxBase plugin which implements a 
Jukebox for multimedia files, like MIDI, WAV, 
MP3, etc.

Installation
------------

put the .class files (player.class, jbplay.class
MainThread.class) somewhere in your classpath and
add the plugin to MaxBase (Plugins menu - Add - then
choose a name for the plugin and enter 'player'
as the plugin class name - then save plugins
information always using the plugins menu).

Preparing a DB for jukebox
--------------------------

To make it work, just be sure that the DB which is in
the directory this plugin is in, has a field whose name
contains the string "tit" (like title, Title, TITOLO, etc),
and put the file names there.

For your convenience I have put here also a NetRexx program
which creates a MaxBase database from a directory listing.
Just type "java dir2dt2" from the directory you have stored 
your multimedia files and you're set: a new db called mydb.dt2
is created in that directory. Open it with MaxBase, add fields 
at will (e.g. author, type, quality of the composition, etc.) 
and fill them (ok, there is still a lot of work to be done by 
the user, but at least you don't have to type in all the file 
names!)
I almost forgot: before using dir2dt2 be sure that you have in
the classpath mbase.jar, the main MaxBase class archive.


Using jukebox
-------------

Open the DB, select some records and click on
the "jukebox" plugin in the plugins menu. Customize the string
to launch your favorite player and the drive/directory your
files are stored in (there is an entryfield for that in the
plugin GUI), and then listen to the files / view them by
hitting "play".

You have some controls like "next", "prev" and "stop" to control
the flow of execution of the playlist.
When you close the plugin, it saves the execution string so the 
next time you won't have to type it again.

Warning: OS/2 wants the file names to be given inside quotes if there
is a space in the file name itself (eg. "this is a file"), so if
the plugin sees that there is an open quote somewhere, it will append
a quote automatically. So, don't worry about having an open quote in
the default execution string.


Execution strings
-----------------

The default string is :

cmd.exe /c play.cmd FILE="DRIVE:\DIRECTORY\

Which will launch the OS/2 default multimedia player.
Use that for any video or audio file which is supported
by OS/2. Of course you can customize this string for your
favourite player, in your favourite o.s. The execution
string will be saved to disk on program exit, so you won't
have to type it every time.

When you press "start" or click on an item in the playlist,
Jukebox appends the currently selected file name and closes
the quotes (if, like in the example, quotes are present), then
executes the string.


Other execution strings:
------------------------

I use the following to play my MIDIs, because I have timidity
(the wavetable software emulator) installed:

f:\progs\timidos2\timidity.exe -Od1S -idq -L f:\progs\timidos2 "d:\folders\midi\best\


If you have the mpg123v3 mpeg audio player installed
you can use a string like this:

f:\progs\mpg123v3\mpg123.exe -q -b3 "d:\folders\mp3\


For mod/s3m and other formats, I use muse/2 and this 
is the string I use to launch it:

f:\progs\muse2\Muse2Txt.exe -P -o"44k -220% S6" "d:\folders\mod\


Of course you should customize the strings to meet your needs,
eg. change f:\progs\muse2\ to whatever directory you have put
muse/2 in, and change d:\folders\mod\ to whatever directory you
store your .mod/.s3m etc in.


Execution string for programs non listed here
---------------------------------------------

Creating them is pretty easy: you should take in mind that Jukebox
will take your string, append a file name and close any quotes (")
that are open (if any), so you can use your favourite player to
play your songs/videos.

If you find problems with this plugin, please contact me
at:  maxbase@flsystem.it.

Max
