StrataSynch Configuration For Windows XP

StrataSynch's behaviour can be changed with environment variables. This allows a more seamless interaction between StrataSynch and other applications such as midi players, ABC converters, etc. What follows is an introduction to the environment variables that StrataSynch uses, tags that are used in defining those variables, and finally an example of a command file.

StrataSynch Environment Variables

Environment VariableFunction
STRATASYNCH_VIEW_COMMAND This is a string that StrataSynch uses to convert an ABC tune into Postscript and then possibly display it using a Postscript viewer program.
STRATASYNCH_PLAY_COMMAND StrataSynch uses this string to convert ABC to midi and then play it.
STRATASYNCH StrataSynch uses this string to convert ABC to midi and then play it.
STRATASYNCH_HELP Path to main StrataSynch helpfile. This is set upon installation

Tags Table

The following tags are embedded in the environment variable definitions

TagFunction
:0: This is expanded to a temporary filename containing the ABC text
:1: upto :9: These tags are similar to :0: except they are available to facilitate transferring data from one command to another via temporary files. These temporary files are created in your system's temporary directory(I presume the system deletes them on login,logout, or shutdown to prevent them from accumulating)
:abcxref: An ABC file can contain more than 1 song. StrataSynch generates upto 2. This tag expands to the correct 'xref' field which is how ABC designates a single song within a file. Some tools(e.g. ABC to midi converter) require this field.

Example Command(Batch) File

The StrataSynch installer actually writes a small command file(stratasynch.cmd) in its install directory. Variables STRATASYNCH and STRATASYNCH_HELP are assigned initial values. The other variables should be defined in this file.
rem 'rem' precedes comments and are ignored by Windows
rem These are initially set by the installer program.
set STRATASYNCH=generators
set STRATASYNCH_HELP=helpfiles\stratasynch.html
rem
rem SET VIEWER COMMAND
rem
rem
rem 1. abcm2ps takes ABC output from StrataSynch(:0: tag) and outputs it to :1:
rem 2. :1:(Postscript file) is input to ghostview. The & separates the 2 commands. 
rem 		
set STRATASYNCH_VIEW_COMMAND=abcm2ps -B 4 -j0 -e :abcxref: -O:1: :0: & ghostview :1:
rem
rem
rem SET PLAYER COMMAND
rem
rem 1. Convert ABC output to MIDI
rem 2. Play the MIDI using Timidity player.
rem
set STRATASYNCH_PLAY_COMMAND=abc2midi.exe :0: :abcxref: -o :1: & timidity :1:
rem
rem
rem ACTUAL INVOCATION OF STRATASYNCH-DO NOT REMOVE
stratasynch_entry.exe