Program:  JVDEST.C   JVDEST.EXE
Author:   Greg Youngdahl

	JVDEST is a tool for manipulating the destination addresses of
patches from JV-80 family synthesizers (including JV-80, JV-880, JV-90,
and JV-1000) so that their address will cause them to load into one of
the patches of the JV's Temporary Performance Patch buffers, or into
the JV's Temporary Patch buffer.  The program changes the address bytes
in all the patch messages (1 common and 4 tone messages) and adjusts
the checksums as required.

	The program is intended for use on files with single patches in
them, mostly as a helper for JVEDIT1.0 (which only accesses the Temporary
Patch buffer) to allow patches to be loaded into Temporary Performance
Patch buffers without having to load them into the Internal patch bank
first.  It can also read files with multiple patches in them (such as a
bank of 64 patches) and write a new file with *all* the patches addressed
for the specified destination.  If the file has any other messages in it
(as a bulk dump of the performance buffers would) the other messages are
discarded, and only the patches appear in the new file.  While I doubt
these "features" (processing multiple patches in a file to have the same
address, and weeding out non-patch messages) are of much use, they come
about as a result of reusing some other code that parses through a file
locating all of the patch messages in the file and making a list of them.
Another side effect of that reuse is that the patches come out sorted into
alphabetical order (since the reused search code stored its resulting list
in alphabetical order).

	Another consequence of using this tool on patches that were
originally written by a JV-80 or JV-880 is that the size of the output file
will increase by 8 or 4 bytes respectively (per patch) to the size of the
patches from a JV-90 or JV-1000, since the output file will now contain the
bytes for the parameters that don't exist on the '80 or '880, set to a no-op
value (0).  This is because in general I have tried to "normalize" all the
patches I write so that if they are used on a JV-90 or JV-1000 there will be
values loaded for those parameters so that there are no lingering values
from whatever patch may have been copied over, which may leave the synth
with incorrect (or at least unexpected) settings for those parameters.
There is no problem loading these patches into a JV-80 or JV-880, the extra
parameter bytes are simply silently ignored.


USAGE:  jvdest destination currentfile newfile

The JVDEST program locates patches in the "current" file and rewrites
them into the "new" file with their destination address modified as
specified by the "destination" variable.

Valid "destination" values are

    1 - 7   for Temporary Performance Patch buffers 1 - 7
    P or p  for the Temporary Patch buffer



EXAMPLE 1:  To set a file called lilypad.syx to load into the Temporary
	    Performance Patch buffer 5, calling the new file lilypad5.syx,
	    you would issue the following command:

		jvdest 5 lilypad.syx lilypad5.syx


EXAMPLE 2:  To set a file called synharp.syx to load into the Temporary
	    Patch buffer, calling the new file syntharp.syx,
	    you would issue the following command:

		jvdest P synharp.syx syntharp.syx
