Speakup v0.09 & Loadspk v0.08
------------------------------
Notes on the source code...

Speakup and Loadspk work very closely together.  Each one more or less depends
on the other to work flawlessly.

So, when changing any synth symbol headers, (symbol*.h), you must also change
the corresponding headers in the loadspk source (same names).  They both
include standard definitions which get translated into the kernel proper
and/or into the client programs.

Required defines (in both kernel and loadspk):
----------------------------------------------
	VERSION_x		where 'x' is one of the synth names displayed
	NUM_STATIC_x		in symbols.h (DTLK, ACNTPC, SPKOUT, etc.)
	NUM_XTEND_x
	NUM_ALIAS_x

	STATIC_STR_x
	XTEND_STR_x
	ALIAS_STR_x

Required only in kernel:
------------------------
	DEFAULT_STATIC_x
	DEFAULT_XTEND_x

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

All of these get built into the various larger structures, depending on
which synth is specified/detected.  Take a look at symbols.h (in either the
kernel or loadspk source) if you're curious.

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

The spk_variable Structure

struct spk_variable {
	char *id;	/* command as displayed in loadspk/dumpspk */
	char *param;	/* value of the parameter to the command */
	char *build;	/* a string, describing how to construct the 
			 * string sent to the synth, with the character '_' 
			 * to be filled in with the parameter.  eg.  "\x01_P"
			 * will convert to "\x01+30P", if param is "+30"
			 */
	int flags;	/* one of:
			 *  HARD_DIRECT	: setting that's immediately send to
			 *		the synth
			 *  SOFT_DIRECT	: as above, but sent to speakup
			 *  NUMERIC	: an ascii-represented numeric value
			 *  USE_RANGE	: changes the way valid is treated
			 *		(see below)
			 *  BUILDER	: setting is built into the reset
			 *		string
			 *  NO_USER	: this setting is not allowed to be
			 *		changed by the user
			 *  ALLOW_BLANK : ALIAS-ONLY flag to allow a blank
			 *		parameter
			 */
	char valid[33];	/* If the flag USE_RANGE is given, valid is a
			 * range described by "lowval,highval".  For example,
			 * "0,20" is the range 0-20.
			 *
			 * If USE_RANGE is not given, valid is a
			 * "-1"-terminated set of valid values for param.
			 * eg. { 'a', 'e', 'i', 'o', 'u', -1 } or "aeiou\xff"
			 *
			 * an empty set { -1 } matches anything.
			 */
};

Usage examples:
---------------

Example 1.

{ "rate", "9", "\x1bR_", HARD_DIRECT, "0123456789ABCDEFGH\xff" }

would allow loadspk to use the command:
	rate = $
where '$' was any of 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H
and, upon input, would immediately send "\x1bR$" to the hardware device,
as well as setting the appropriate variable in Speakup.  If $ is empty,
"\x1bR9" is sent to the synth.



Example 2.

{ "pitch", "50", "\x1_p", (NUMERIC | HARD_DIRECT | USE_RANGE), "0,99" }

would correspond to loadspk using the command:
	pitch = $
where '$' was a string representing a numeric value in the range 0-99.  It would
also be sent directly to the hardware as an ascii string (the NUMERIC flag
ensures the ascii conversion).  If 'pitch=' was entered, then "01h 50p"
would be sent to the synth (that is, ctrl-A followed by the string "50p").


