#!/usr/bin/env python # Parse libraries and create html docs import os, sys, time, platform, subprocess if len(sys.argv)>1: print """mma-libdoc is a MMA maintenance program to parse library files and create/maintain the html library documentation. This program should be run as 'root' and it takes no command options. For more details see the file "README.mma-libdoc" which is distributed with MMA.""" sys.exit(0) installdir = ( "c:\\mma\\", "/usr/local/share/mma", "/usr/share/mma", ".") libpath = '' docpath = '' for p in installdir: a = os.path.join(p, 'lib', '') if os.path.isdir(a): libpath=a docpath = os.path.join(p, 'docs', 'html', 'lib') break if not libpath: print "Can't find the MMA library!" print "Please check your installation and/or change the search path in this program." sys.exit(1) try: os.mkdir(docpath) except: pass index = [] links = [] MMA = "mma" # set different path to mma if you need to if platform == "Windows": sh_value = True else: sh_value = False print "Processing library files" def dodir(dir): """ Process files in directory. """ global index, links newdirs = [] olib = os.path.join(docpath, dir) if not os.path.isdir(olib): try: os.mkdir(olib) except: print "Can't create directory", olib sys.exit(1) links.append("
This document is provided as a supplement to the MMA Reference Manual which lists all of the commands in the program and helpful information which can be used to create your own "style" files. If you are a newcomer to MMA, you should also have a look at the MMA Tutorial for some "getting started" information.
The information on these HTML pages has been generated directly from the library files in your MMA library. Each entry uses the filename as a header and then lists the various defined grooves. In addition, the individual groove names are clickable and will display further, detailed information on that groove.
You should be able to use any of the grooves listed in the "STDLIB" section in your files without using other directives. However, if you have files in other locations you will need to need to explicitly load the library file(s) with a Use directive.
The filenames are in all lowercase. These are the actual filenames used in the library. If you are loading files with the Use directive you must use the same case (please note that typographic case applies only to the filename---this is operating system dependant). Groove commands are case-insensitive.
Following each groove description is a boxed number in the form (4). This indicates the sequence size of the groove. Next, is a list of tracks and instrument names. This shows the first voice or drum note defined for each track---it is quite possible that the track uses other voices. This data is included so that you can see what tracks are active.
The library files supplied with MMA contain embedded documentation. The -Dxh and -Dxl MMA command line options extract the following information from the each library file:
In addition, the -Dgh command generates sequence graphs and detailed settings for each groove.
If you find that you don't have some of the grooves listed below in your distribution you need to run the program mma-libdoc to update these docs. Not all style files are distributed in the default MMA distribution.
This document and the files linked were created by mma-libdoc.
It is a part of the MMA distribution and is protected by the same copyrights as MMA (the GNU General Public License).
Created: %s""" % time.ctime() ) out.write("") out.close()