
***** Basic TX SETUP file structure (good enough for present use):
(Details can be gotten from description of bulk dump in TX manual, 
 allowances being made for midi data being limited to 7 bits.)

(h= hex)

0h - fh: TX  Header. Has ascii version number on version 02.00 at 08h.
10h - dfh*  Various parameters, like program change assignments
f0h - 4f0h*  64 16-byte wave descriptors in order from *.W00 to *.W64

*Version two start 2 byte later.

The wave descriptions have an 8 bit ascii file name at offset 7.
I forget now what the other data is (perhaps original key info).

***** Basic TX VOICE file structure. (See voice bulk dump in manual 
                                      for details.)

0h-fh  Header with ascii version number at 08h
10h-124fh 32 92h-byte voice parameters
1250h- 20f9h** 64** 38h-byte timbers
2050h** - Original key info for the voice/timber splits 
            followed by 64 (or 128) timber one-shot timing infos

** Version 2 has 128 timbers so these locations change accordingly.

Voice parameter blocks have the following important items:

0h-7fh 32 4-byte structure: timber#/low note/ hi note/ fade 
86h - 8fh 8-byte ascii voice name

The low note/ hi note values convert to 'regular' note values using this 
formula: note = note - note / 4 + 1. 

The only thing I use in the Timber structures is the first byte, which is
the wave number.  But again, per the TX16w manual, it's easy to figure out
the AEG numbers, etc.

I make a list of wave names and wave numbers from the SETUP.Sxx file.
I look at the voice file *.Vxx for voices available. I select a voice, 
look up its 32 potential splits and timbers, and then look up the timbers 
to see what wave numbers were used.  Then I write out the Typhoon voice file.

TYPHOON File structure:

General:

Typhoon uses 4-byte key words such as "FORM" or "Wave" for signify data types. 
Immediately following the data type is a 4-byte pointer to the next structure 
of equal class (or to the end of file if there are no more.) NOTE: Motorola
uses MSB first whereas Intel uses LSB first. C programmers may need to watch 
out for this on the pointers.

The voice file has this structure:

0h -"FORM"
4h- 4-byte pointer to end of file
8h- "TYPVVInf"    (for voice type)
10h - data common to a voice as a whole
24h - "Grop"  ( for group data)
28h- 4-byte pointer to next group or to EOF)
2ch- "Parm" (beginning of group parameters)
30h- 73h 4-byte pointer to next parameters (this case Mod table parameters) 

Repeated from 74h to e4h are 8 groups of mod table parameters as follows:
  "Mod " 
  4-byte pointer ro next "Mod "
  6 bytes of table parameter: source#/destination #/ parameters

e4h- "Splt"   (split)
e8h- 4-byte pointer to next "Splt" or EOF
ech- "Wave"
f0h- 4-byte pointer to next "Splt" or EOF
f4h- 8-byte ascii wave file name
fch- 4-bytes data I believe for original key info or for yam-waves the
                  wave extension number *.Wxx) ???????????????
80h-  8-byte ascii disk name where wave may be found

Now repeated as needed are the various splits:

 "Splt"   (split)
 4-byte pointer to next "Splt" or EOF
 "Parm"
 4-byte pointer to "Wave" below
 1-byte "low note split point"
 1-byte unknown
 "Wave"
 4-byte pointer to next "Splt" or EOF
 8-byte ascii wave file name
 4-bytes data 
 8-byte disk name where wave may be found

Note that the "Grop" structures may repeat as often as needed for the voice.

The Typhoon voice parameters above can sort of be figured out easily. I have 
some of them nailed down, but for purposes here, I know the following 
to be right:

35h low note range (0)
36h hi note range  (60h)
37h low velocity range (0)
38h hi velocity range (127)

Hopefully knowing the pointer system will help explain things.  There really 
isn't anything too strange going on here.

I have found that Typhoon is not very tolerant to data not in proper form 
or range. For instance, placing the high note value (36h) to 70h will crash
the system(!).
