Music File Finder (muff)

                                  Version 0.3

                                by Richard Brauer


This Helpfile covers the following topics

A) General

  [0] How to exit help
  [1] What does this program do?
  [2] What (among other things does it not do?
  [3] Limits and known bugs

B) Less General

  [1] Modes of playback
  [2] Searching for files
  [3] Adding files to the playlist
  [4] Updating the database
  [5] muff-play options
  [6] more options
  [7] xmms options
  [8] More xmms options 
  
C) More Special

  [1] If you want to use this program on a system other than
      RoyalBigMac or QuarterFishMac (former KingMacSalad)
  [2] More on Regular Expressions
  [3] I don't want to use Eterms. How can I switch to xterm?
  [4] Predefining some of muff's variables in the config file
  [5] What does muff mean?
  [6] How to use help
  [7] Copyright and other unimportant issues
  [8] How to install muff
  [9] Where are the muff files?
 [10] Support 

D) Some information on muff-play
   [1] You said what it was but I can't remember
   [2] Why should I use it?
   [3] How tell muff to use muff-play
   [4] I want to start it myself
   [5] Now I've started it but it's not doing anything
   [6] Can I use it for something else but music playback?


-------------------------------------------------------------------------


A) General

  [0] How to exit help

    This is pretty easy: Just press return.

    By the way: this help file covers muff version 0.3-5

  

  [1] What does this program do?
    
    Muff reads a set of file extensions from the config files and
    provides some sort of frontend for dealing with files of that
    extension.

    If searches a directory tree for all files with given extensions
    and lets you search a list of these songs for expressions. If any
    names of files in the list match this expression, you can choose any
    of these files to be added to a playlist.

    This playlist can either be a file read by muff-play (see extra 
    section in this help file) or xmms' playlist, depending on a choice
    you made in muff's config file.
    
    You can also control some vital functions of the chosen playback 
    program via this program, including play, forward and rewind.
    
  

  [2] What (among other things does it not do?
  
    This program does not play mp3, ogg or avi-files. 
    
    Muff does not search for any files but files with the extensions 
    you specified in the configuration file.
    
    Muff does not remove single songs (e.g. the highlighted one
    or the one being played at the moment from xmms' playlist because this
    does not seem to be doable from the shell. 
    
    When using muff-play, however, this is possible. 



  [3] Limits and known bugs
  
    Muff makes heavy use of the dialog program by Savio Lam, 
    Stuart Herbert, Pako and Thomas Dickey. As of version 0.9b, dialog 
    does not support infinitely long lists of arguments for menus or
    checklists. I don't know where exactly the limit is because it does
    not seem to be documented. It is however somewhere beyond 1000 items in
    a menu of checklist and this should not pose a problem. 
    
    If your searchpattern matches more than 997 files, only the first
    997 matching files will be displayed.

    If you're using muff-play, you can't have the same file in your 
    playlist more than once. This issue would actually be pretty difficult
    to solve, because I don't want there to be anything else but filenames
    in the playlist, but you shall be able to modify the playlist by
    whatever means you desire. If the playlist were handled exclusively
    by muff, things would be easiere. Anyway, you certainly don't want
    to listen to the same song all over again, do you?

    Since version 0.3-5, muff-play has a message queue. I didn't have
    much time for testing this feature yet, but it seems to be working
    nicely. There may however still be bugs.

    

B) Less General

  [1] Modes of playback
     
    Muff can act as a frontend to two programs: muff-play and xmms.

    xmms is the well known X-Multimedia-System, a clone of the 
    windoze program named winamp. Muff expects you to have xmms-shell
    installed (this is a small program that allows for calling many
    of xmms' funtions from the shell that are not easilly accessible
    otherways).

    muff-play is a little daemon program written in bash. It is in 
    "halted" state most of the time and is only woken up by special
    events. It does not play back any files itself, but calls appropriate
    pieces of software for that purpose. In the standard configuration, 
    muff-play can play .ogg, .mp3, .avi and .ogm files, if you have
    the right programs installed (ogg123, mpg321 and mplayer are default).

    The mode of playback (muff-play or xmms) is specified in the 
    configuration file.



  [2] Searching for files
  
    After choosing "Find" from the main menu you'll be confronted
    with a textfield in which you can enter a regular expression to
    search the database for. Press return after you think that what
    you have entered is an expression suitable for what you are looking
    for. For your convenience, case does not matter.
    
    Now the program will display a list of all the files whose filenames
    match the expression you entered. You may browse this list using
    the up and down arrow keys. Get back to the main menu by pressing
    either return or escape.
    
    Don't press space, or if you do, only press it n_i times per
    highlited item, where n_i is an even number.
  

  
  [3] Adding files to the playlist
  
    Do the same as described in section "B) [1] Searching for files"
    but make n_i an odd number for those items you want to add to the
    playlist and do not try to exit pressing escape or selecting 
    the nooooh button in which cases your choices will not have any 
    consequences. Still these options may come in handy if you decide
    not to select the selected files ;-)

    If you are using muff-play as playback program, the files are
    appended to a playlist-file that is read by muff-play.
      
      muff-play also offers you three modes of appending (see also 
      section B[5]). You can append the files at the current playlist
      position, i.e. after the file open at the moment, or at the
      end of the playlist. I think there won't be a demand for
      "add file before the one being played at the moment", so I'm
      not going to implement this feature. 

      The thirs mode of appending is some sort of random append. Each
      file you selected is appended at a random position of the playlist.
      This feature is useful if you want to create a randomized playlist.

    If xmms is your choice for playback, the selected files are simply
    appended to xmms' playlist.
  


  [4] Updating the database
  
    By default the database file (where Muff stores the names
    of all the mp3files so it does not have to search your harddisk 
    all the time) is stored somewhere in your /tmp directory. Therefore
    this file will be deleted after rebooting on most systems. If the
    database file does not exist on startup, it will be created 
    automatically. Still you might have reasons to update the file while
    running the program, e.g. if you added or deleted mp3 files. Do this
    by selecting "Scan" from the main menu [hmmm, why the hell do I try
    to explain all those f***ing obvious things?].
    
    There's another thing about updating the database which is 
    probably not that obvious. I rather think it is IMPORTANT!!!
    
    In the muff configuration file (/etc/muff.conf) you can define
    a path in which muff shall look for mp3 files. On startup, muff
    checks whether this path is a valid one and if it is not, muff
    will set this path variable to a path underneath which all mp3
    files on your harddisk can be found. On most systems, this will
    be the root directory ( "/" ).
    
    No scanning your whole harddisk for mp3 files with find can take
    a few minutes, if you have huge and/or slow harddisks. Therefore
    muff will only use "locate" to update its database. If you now
    change something about your database, you'll need to run 
    "updatedb" to for these changes to be recognized by muff.
    
    It is therefore very important that you have a sensible value
    for mp3path predefined in /etc/muff.conf! Muff will remind you
    of this with a nasty message box.
  
  [5] muff-play options
    
    You can choose the following items from the main menu:

    - "find" will let you search for new files and optionally 
         append a selection of the found files to muff-play's 
	 playlist.
    - "After" will toggle the file add mode (see B[3]). The three
         available options are "true", "random" and "false" with
	 the following meanings:
           "true"   -> append files after the active song
	   "random" -> insert files at random positions
	   "false"  -> append files at end of playlist.
    - "mute" will mute the main volume of the standard sound device.
    - "play" will start playing. If muff-play was in "pause"-mode, it
         will resume playback. If it was stopped, it will start playing
	 the file it was playing when you stopped it.
    - "break" To pause playing (resume with "play").
    - "next" To skip to the next item in the playlist file (playlist
         is always rewrapped).
    - "last" To skip to the previous entry in the playlist file.
    - "freeze" To stop playback. Restart with "play".
    - "delete" will delete the song being played at the moment from
        the playlist file and skip to the next song from the playlist.
	If the active song is the only song on the playlist, muff will
	stop playing and the playlist file be erased. 
    - "edit" Open the playlist file with the editor specified in muff's
        configuration file.
    - "xtend" To go to a submenu with more playback options.
    - "Scan" Rebuild the database.
    


  [6] More muff-play options

    These are the options available from the submenu:

    - "Up" Tune volume up by 5 per cent.
    - "Down" Tune volume up by 10 per cent.
    - "Shuffle" Toggle shuffle mode. You can set a default value
        in the configuration file
    - "Play" Start or resume playback
    - "Clear" Clear muff-play's playlist and stop playback.
    - "Status" Will open (or close) an xterm displaying some status
        information. Should be pretty obvious and is really nice, 
	I think.
    - "Update" Make muff-play update its status window. Might be 
         necessary after editing the playlist file in an external editor
	 or when muff behaves strangely.
    - "muff-play" If for any reason the muff-play process has crashed
        (or has been killed), you can restart it here. This item will
	check whether muff-play is still running and if not restart it.
    - "Reconfig" Re-read the config file. That way you can edit the
         config file while muff is playing. This may come in handy if
	 you want muff to learn some more file extensions or change
	 some playlist-options like keepplaylist or localplaylist or so.
    - "EdConf" will open the configuration file ${HOME}/.muff/muff.conf
        in your editor of choice. This option does not cause muff
	to re-read the configuration file, so you'll have to do this
	yourself (which does not mean that you should read the configuration
	file [this might be pretty boring and wouldn't do much good anyway]
	but that you have to tell muff to do this yourself. See B[6] if you
	don't know how to make muff reconfigure itself.).
    - "Quit" will get you back to the main menu.



  [7] xmms options 
  
    Choose the appropriate items from the main menu.
    
    - "Mute" will set the volume to zero.
    - "Play" to start playing. If xmms was paused it will resume play. If
        it was playing it will restart playing the file, if it was on stop
        it will start playing the highlighted file.
    - "Break" to pause playing (resume with play).
    - "Next" to jump to the next entry of the playlist.
    - "Last" to jump back one entry.
    - "Freeze" to stop playing.
    - "XMMS" for more xmms options (see "B) [5] More xmms options").
    
    
  
  [8] More xmms options
  
    This submenu offers more options for xmms control
    
    - "Up" tunes the volume up by 4 per cent of the maximum volume.
    - "Down" tunes the volume down by 8 per cent of the max volume.
    - "Clear" will clear the playlist. Actually you might want to 
        careful with that one.
    - "Shuffle" will toggle shuffle on or off.
    - "Repeat" will toggle repeat on or off
    - "Play" see "B) [7] xmms options -- Play"
    - "XMMS" checks if xmms is running and if it is not asks you
        if it should be started or not. Entering either of "y" "Y"
        "j" or "J" will result in xmms being started, all other
        inputs will not start xmms.
    - "Linux" has some control over windows. This option can hide
        or show the xmms windows. Can be useful if you don't know
        where they are. Selecting "Linux" at once or at most twice
        will display the xmms windows. I somehow believe that it does
        not move the xmms main window to a different workspace or
        virtual desktop or whatever. Anyway, the preamp and playlist
        windows can thus be forced to appear on a different workspace.



C) More Special

  [1] If you want to use this program on a system other than
      RoyalBigMac or QuarterFishMac (former KingMacSalad)
      
    When using Muff  on your own computer, you'll probably
    want it to scan for mp3 files in the directory you store your 
    mp3 files in. For this purpose the \$mp3path-variable has to be
    set to a directory that contains all the mp3 files you want to
    be scanned by muff. 
    
    The best way of doing this is to edit the /etc/muff.conf file
    and set the value of mp3dir to a nice path on your system. The
    configuration file is well documented, so you don't need to be afraid
    that you make anything really really stupid ;-)
    
    If the mp3path defined in /etc/muff.conf does not make sense, muff
    will try to guess a good path for your system, which will very 
    probably result in this path being " / " which is really, really bad.
    
    See also "C) [4] Predefining some of muff's variables in the config file"
    and "B) [3] Updating the database"
      
     
      
  [2] More on Regular Expressions
  
    As muff uses "egrep" to scan the database for patterns,
    you can use any regular expression grep understands for searching for
    files. A few important examples include:
    
    fly         -- would search for any file containing the pattern "fly"

    fly.mp3     -- You may believe, that this finds any files containing
                   the pattern "fly.mp3" but then you are mistaken. In
                   regular expressions, the dot (.) represents exactly 
                   one arbitrary character. If you want to search for a
                   dot, you have to escape it using a backslash (\.)

    fly\.mp3    -- Only filenames containing "fly.mp3" match this 
                   expression

    fl[aeiouy]  -- finds all filenames containing either of 
                   "fla" "fle" "fli" "flo" "flu" "fly". So you might find                  
                   filesnames containing "mark knopfler" or "pink floyd",
                   and also "fluid" "flaw" "flown" "fly" "flight" etc but
                   not "berflssig" (which is the german word for superfluous
                   or unneccessary with all the horrible umlauts simply 
                   omitted).

    fl[^aeiouy] -- finds anything that contains a pattern of three letters 
                   the first of which are "fl" and the third NOT one of
                   "a" "e" "i" "o" "u" or "y". Hence this would find 
                   "berflssig" but not all the things fl[aeiouy] would find.

    rem[^/]+mp3 -- Finds all filenames that contain a pattern that begins
                   with "rem", ends with "mp3" and has inbetween an arbitrary
                   number of characters other than a slash (/). So if all
                   your files from REM are in a subdirectory .../rem/, none
                   of them will be found, unless some have a filename like
                   ".../rem/rem_-_losing_my_religion.mp3".
                   In other words: all files will be found that have the
                   pattern "rem ... mp3" as part of their filename without
                   path. Hence you'll find anything like "song (remix).mp3"
                   or "...remains.mp3" or ".../rem/rem_-_daysleeper.mp3" but 
                   not ".../rem/walk_unafraid.mp3"
                   
    (ga)*	-- Finds all files whose name contain a sequence of 0 or
                   more matches of "ga". Because we are using egrep, you
                   don't need to escape the brackets.
                   As the expression on the left would find all files
                   (the star means at least zero times, not at least
                   once), it is useless. Therefore you may say:
                   
    (ga)\+      -- To find filenames containing a sequence of at least
                   one match of "ga". If you want to easily find a 
                   filename containing "ga ga" this is probably quite 
                   stupid, as it will show your whole Peter Gabriel 
                   collection as well. Hence you may try
    (ga )\+     -- or of course just
    ga ga       -- but that looks so unimpressive ;-)
                   
    
    (drive\.mp3^) -- Finds all filenames that end on "drive.mp3". Useful 
                     if you don't want to find files like 
		     "... you drive me crazy.mp3". The hat at the end
                     denotes the end of line.

  
    See the re_syntax manpage ("man re_syntax") for more details. And
    have a look at the egrep documentation (man egrep) to find out about
    the most complicated patterns to search for.
  
  
  
  [3] I don't want to use Eterms. How can I switch to xterm?
  
    Edit the muff shellscript (muff, not muff-run) and just make sure the
    first command (Eterm ... ) does not work by, e.g. switching Eterm
    to eterm. Muff will notice that this doesn't work and start an xterm
    instead, assuming that everyone has xterm installed.

    I'm using Eterm because on my system the predefined background
    colour for dialog is more beautiful (a lot darker) in Eterms 
    than in xterms. Now don't ask me why, I don't know and I 
    really don't care that much.
    
    
  [4] Predefining some of muff's variables in the config file
  
    When starting, muff looks in ${HOME}/.muff.conf (or, if this file
    does not exist, in /etc/muff.conf) for predefined values
    of the following variables:
    
    mp3dir   -- the directory underneath which muff searches for
                mp3 files. Adjust this variable according to you 
                system. Please really do this!
                
    tmpdir   -- the directory in which muff stores its temporary files.
                I'd recommend not changing this one.
                If muff notices that it cannot write in $tempdir, it
                will set this variable to /tmp/muff.$USER, i.e. if
                your login name is "bill", temporary files will be
                stored in /tmp/muff.bill
    
    helpdir  -- the directory in which muff looks for its help file.
    		On most systems /usr/share/doc should do fine.
    
    paranoia -- governs whether muff checks if xmms is running all
                the time or not. If paranoia is set to 0 (zero), then
                muff will only check if xmms is running on startup.
                If paranoia is set to 1, muff will check every time
                it does something that affects xmms. Actually I think
                that this option is not that important.

    intelligent_grep -- This setting is for people who like to be
                totally in control of what is going on on their 
                computer. By default, muff replaces any space in your
                search-expression by "[ _-]". This means, that if you
                enter something like "meat loaf", all files will be 
                found whose name contains either of 
                "meat loaf" "meat_loaf" and "meat-loaf". I think that
                this makes a lot of sence, because of the many 
                different ways in which people name their mp3 files.
                Anyway, you may not want muff to do this. If you 
                don't, set the intelligent_grep variable to 0 (zero). 
                Leave it on 1 if you like this setting.
    
    muffplayer -- This can be either of muff-play or xmms, depending
                on what program you want to use for playback.

    muffplayplaylist -- This is the name of muff-play's playlist file.
                It resides in tempdir. If you can't remember the name, 
		that is no problem, 'cause you can open that file
		from within muff.

    keepplaylist -- If set to true, this option will cause muff to copy
                its playlist file to the subdirectory ".muff/" of your
		home directory (might overwrite a playlist file that
		is already there).

    localplaylist -- Set this to true if you want muff-play to use the
                playlist file in ${HOME}/.muff/

    usesavedplaylist -- This option - if set to true - tells muff to
                copy the playlistfile from ${HOME}/.muff to the 
		playlistfile that is to be used for playback. Just as
		with keepplaylist, there is actually no point in setting
		this option to true if localplaylist is set to true.

    statusonstartup -- Muff will open the status window on startup if
                you set this option to true.

    playonstartup -- Set this option to true and muff will start playback
                on startup (unless, off course, you don't have entries
		in your playlist yet).

    rememberposition -- If you're using muff-play and set this option to
                true, muff will remember the name of the last song being
		played before you exit muff and will start playing
		this song the next time you start muff (provided you did
		not delete this song from the playlist file and 
		the option "playonstartup" is set to true as well.

    removeplaylistonstartup -- This option will cause muff to remove 
                muff-play's playlist on startup (if it exists and you're
		using muff-play and the option has the value "true"
		without the quotes).
    
    removeplaylistonexit -- As above, only delete the playlist file 
                when exiting muff.

    addfileshere -- Will tell muff to add new files after the song that's
                being played at the moment. You can toggle this option from 
		within muff, so it's not really that important and only
		there for your convenience.
		The three allowed values are "true", "random" and "false".
		For their meaning see either the documentation in the 
		configuration file or section B[5].

    shuffle  -- Set the default mode of playback here. "true" will make
                muff-play play back tracks in random order by default, 
		any other value will make it play back the playlist from
		top to bottom.
                
    editor   -- You can open muff-play's playlist in an external editor
                from within muff. Obviously, you should declare your
	        favourite editor here.
    
    extensions -- Here you can specify all file extensions you want
                muff and muff-play to handle. Please note that if
		you're using muff-play you _must_ also specify 
		programs that can open files with the given extensions.
		If you're using xmms for playback, there is no point
		in using extensions of file types xmms cannot open
		(i.e. gnumeric documents). 

		Please take a look at muff's configuration file to
		see how to specify external programs and command options.


                
    It is really important (at the moment, i.e. release 0.3) that you 
    keep the exact layout of the items in /etc/muff.conf . This is:
    case matters, the Lines that contain parameter settings must not
    begin with anything else but the parameter name and there has to
    be exactly one space before and after the "=". Hence, if ">" denotes
    the beginning of a line, settings must look like
    >parameter = setting
    .


  [5] What does muff mean?
  
      i) Whitethroat White"throat`, n. (Zo"ol.)
            Any one of several species of Old World warblers, esp. the
            common European species (Sylvia cinerea), called also
            strawsmear, nettlebird, muff, and whitecap, the
            garden whitethroat, or golden warbler (S. hortensis), and
            the lesser whitethroat (S. curruca).

     ii) Muff Muff (mu^f), n. Cf. LG. muff, D. mof, G., Dan., & Sw.
              muff, F. moufle mitten, LL. muffula, MHG. mouwe sleeve, D.
              mouw, and E. muffle, v.
         1. A soft cover of cylindrical form, usually of fur, worn by
            women to shield the hands from cold.
      
         2. (Mech.) A short hollow cylinder surrounding an object, as
            a pipe.
      
         3. (Glass Manuf.) A blown cylinder of glass which is
            afterward flattened out to make a sheet.
      
         4. Perhaps a different word; cf. Prov. E. maffle to
            slammer. A stupid fellow; a poor-spirited person.
            Colloq. ``A muff of a curate.'' --Thackeray.
      
         5. See 4. (Baseball) A failure to hold a ball when once in
            the hands.
      
         6. (Zo"ol.) The whitethroat. Prov. Eng.
         
    iii) Muff Muff, v. t. imp. & p. p. Muffed; p. pr. & vb. n.
              Muffing.
            To handle awkwardly; to fumble; to fail to hold, as a ball,
            in catching it. 
         
     iv) muff, (Computer)
            acronym for Music File Finder, some shell-scripts for bash.

  

  [6] How to use help
  
    Basically, I'd advise to read it if you want to know more about muff
    than you do already know. If you know pretty much of everything there is
    to know about it, you'll be disappointed.
    
    If you are reading this help file from within muff, you can scroll
    up and down using the arrow keys. 
    
    By pressing "/" (slash) you can enter an expression to search the
    help file for. Please not that this search IS case sensitive.
    
    By pressing "n" you can search for the next occurence of the 
    expression.
    
    If some lines are too long you can scroll to the left or to the right
    using the left or right arrow keys respectively.



  [7] Copyright and other unimportant issues

    muff is published under the gpl. A copy of gpl should be found
    in /usr/share/doc/muff/
    If not, have a look at http://www.gnu.org/copyleft/gpl.html



  [8] How to install muff
  
    First, download the muff tarball from some appropriate server.
    
    Secondly, copy the tarball to some directory I'll simply call
    i-dir.
    
    Third, cd to i-dir and type "tar xzvf muff-0.3.tar.gz"
    
    Fourth, cd to i-dir/muff-0.3 and run ./install
    
    You don't need to be root to run i-dir/muff-0.3/install, but you'll be asked
    for your root passwort if you aren't.
    
    If you want to change the default locations for the muff files (see
    "C) [9] Where are the muff files"), you may change some settings in the 
    i-dir/muff/schmeisse shell script. If you change the $helpdir settings 
    there, you'll have to change this variable in muff-run as well.
    
    
    
  [9] Where are the muff files?
  
    These are the default locations. You may change them during 
    installation (see "C) [8] How to install muff")
    
    Executables are
      /usr/local/bin/muff
      /usr/local/bin/muff-run
      /usr/local/bin/muff-play
      
    The helpfiles are in
      /usr/share/doc/muff
      
    The system-wide configuration file is
      /etc/muff.conf
     
      This file is only used, if you don't have a file named
        .muff.conf
      in your home directory (i.e. if ${HOME}/.muff.conf does
      not exist.
    
      
  
  
 [10] Support
    
    There is not much of support for muff, but if you have any questions
    you may try to mail me at
      richard.brauer@physik.rwth-aachen.de
    or take a look at the muff homepage
      http://muff.sourceforge.net
    
    Apart from that -- as muff is no more than a bash script making
    use of dialog, egrep, xmms and xmms-shell, you may want to consult
    these programs' online documentation (man foo).


D) Some information on muff-play
 
  [1] You said what it was but I can't remember
  
    muff-play is a program written in bash and running in daemon mode
    that can be used to open files from a playlist files with external
    programs that are specified in a configuration file. It is intended
    to be used in combination with muff (obviously) but that's not
    necessary.

   
  [2] Why should I use it?
    With muff-play you can open any files your systems can open.
    Now that doesn't sound very impressive, but let me tell you what
    I mean:

    muff is a pretty nice program if you have lots of files on your
    computer that you want to open, but you don't always know where
    they are (or can't stand typing these f*ing long pathnames).
    When using xmms for playback, muff can only be used for opening
    files that don't confuse xmms. If you use muff-play, you can open
    all sorts of files, as long as your system provides programs to
    open these files with. You can actually still use xmms, by
    specifying xmms as mp3command (and oggcommand) and giving
    the appropriate options (typically -n 0 --enqueue).

    And even if you're only using muff for its most obvious purpose,
    i.e. searching for and playing back music files, muff-play has
    some interesting features, e.g.

      - add files to playlist at random positions, hence creating
        randomized playlists from the beginning.
      - delete active track (in most cases: track being played) from
        the playlist.
      - edit muff-play's playlist in an external text editor with
        changes taking effect immediately (i.e. after saving the 
	file).
  
   
  [3] How tell muff to use muff-play
    In the muff configuration file (this file is 
    ${HOME}/.muff/muff.conf - if it doesn't exist on startup it is 
    copied from either ${HOME}/.muff.conf or /etc/muff.conf)
    there should be an entry for muffplayer. Set this to muff-play, 
    i.e. make sure there is one line in your configuration file reading
    >muffplayer = muff-play
    where ">" denotes the beginning of the line.
    

   
  [4] I want to start it myself
    Well, do it. muff-run wants to have 4 command line parameters and
    as of version 0.3 it doesn't warn you if these are not given. 
    Parameters are:
    $1: The name of a communication file (full path)
        This is the file that is read by muff-play when it is woken 
	from halted status. It expects to find exactly one number
	in that file.
    $2: The name of muff's configuration file (full path)
    $3: The name of muff's temp directory (typically /tmp/muff).
        muff-play expects that this directory is already existing.
    $4: The name of the muff-play lockfile (full path)
        muff-play writes its process id into that file, so other
	processes can read it from there and use it to send commands
	to muff-play.

    These parameters have to be given in this precise order. There
    is no warning, if the parameters don't make sense, and I don't know
    what happens if they are wrong/stupid/whatever. 

    Typically you will call muff-play saying something like
    muff-play /tmp/muff/muffcom.file /home/yourname/.muff.conf \
              /tmp/muff /tmp/muff/muff_play.lock

      Note: in bash-syntax the backslash means that the command will be
            continued on the next line.
   


  [5] Now I've started it but it's not doing anything

    That's because it is a daemon mode program. After being started,
    muff-play reads some configuration values from the configuration 
    file (extensions you want it to know plus appropriate programs with
    the right options for your system...).

    It then goes into halt state (It calls something like "kill -s 19 $$")

    Each time muff-play is woken up (see below) it looks for the
    communication file (typically /tmp/muff/muffcom.file) and if 
    it exists, it reads a command from that file. Commands are just
    numbers. As of version 0.3, muff-play knows what to do for the
    following commands:

      0: quit
      1: play
      2: pause
      3: skip to next title
      4: skip to previous title
      5: stop playing, but don't quit program
      6: playback of track has finished. Please do something useful now
     40: Stuff track being played at the moment into you brain (which
         is just some file in your ${HOME}/.muff/
     41: Play the file you remembered
     42: Delete track being played at the moment from playlist
     50: open muff-play status window
     51: Update muff-play status window (doesn't matter if window
         is not open, 'cause we only update a status file that is
	 "tail -f"ed in the window)
     52: Re-read the configuration file. This will be neccessary when
         muff-play's mother process re-reads the config file. There would
	 for example be no point in muff searching for .mpg-files if 
	 muff-play doesn't know a player for this file type. So if you - while
	 using muff - add mpg to the known extensions (and of course 
	 specify a play command for this extension), muff-play will have to
	 learn this extension. The same holds for things like changing the
	 location of the playlist file or the name of the temporary directory.

    After doing what you want it to do, muff-play goes into halt-state
    again. Since version 0.3-5 there is a message queue. It may not be
    working correctly in all possible situations yet, but seems to be
    doing a good job in all circumstances I've put muff-play into so far.

    Now there are two ways to wake up muff-play.

    a) It can wake itself. That happens when playback of the active title
       has finished. Muff will then open the next file from its playlist.

    b) It can be woken up from external programs (that's what muff does).
       To wake up muff-play, you need to do the following:

        i) read muff-play's process id from its lockfile
           (e.g. say something like
           "read pid < /tmp/muff/muff_play.lock"
           on the command line, assuming /tmp/muff/muff_play.lock is 
	   muff-play's lock file).
       ii) wake up muff-play by saying
           kill -s 18 ${pid}

       Now this won't do anything special, because you forgot to 
       specify a command. So what you have to do before going to 
       step ii) is saying

       echo 1 >> /tmp/muff/muffcom.file

       (instead of 1 you can put any of the commands muff-play understands.)

       It is important that you append your command to the communication
       file, as this file is used as message queue by muff-play, i.e. it
       reads and executes all commands from this file and then erases it.
       If this file does not exist after executing commands, muff-play goes
       into sleep state and has to be woken up again (see above).

    To nicely cause muff-play to stop running, wake it up and make it
    execute the command "0". This way it will terminate the last
    child process it called (note that muff-play uses "kill -9" to do this).

    muff-play writes a _lot_ of status output into a logfile. This is
    situated in the temp dir and called "muffplaysownlogfile.log", so 
    by default it is
    /tmp/muff/muffplaysownlogfile.log

    If you want to test muff-play, it is a good idea to "tail -f" this
    file.
       
    muff-play also puts the output generated by its external players
    into a file whose default name is
    /tmp/muff/playlogfile.log
    You might want to do a "tail -f" on this file as well; In the case
    when the external play command produces nice output (as ogg123 does),
    this is sometimes useful. You really want to look at this file if
    the external player does not seem to be working correctly.
       
   
  [6] Can I use it for something else but music playback?

    You don't get it, do you?