public void putPatch(IPatch bank,IPatch p,int patchNum)
public void putPatch(Patch bank,Patch p,int patchNum)
	public void putPatch(IPatch bank,IPatch p,int patchNum)		//puts a patch into the bank, converting it as needed	{		if (!canHoldPatch(p))		{			DX7FamilyStrings.dxShowError(toString(), "This type of patch does not fit in to this type of bank.");			return;		}			// Transform Voice Data to Bulk Dump Packed Format				//    ***** Voice A *****		((Patch)bank).sysex[getPatchStart(patchNum)+ 0]=(byte)( ((((Patch)p).sysex[6+ 2]&  1)    *64)	// Poly/Mono .......................(0- 1)							     +  (patchNum     & 63));		// UNDOCUMENTED! related voice# ....(0-63)		((Patch)bank).sysex[getPatchStart(patchNum)+ 1]=(byte)( ((((Patch)p).sysex[6+ 4]&  7)    *16)	// Pitch Bend Step (Low)............(0-12)							     +  (((Patch)p).sysex[6+ 3]& 15));		// Pitch Bend Range ................(0-12)		((Patch)bank).sysex[getPatchStart(patchNum)+ 2]=(byte)(  (((Patch)p).sysex[6+ 5]& 127));		// Portamento Time .................(0-99)		((Patch)bank).sysex[getPatchStart(patchNum)+ 3]=(byte)( ((((Patch)p).sysex[6+ 1]& 15)    * 8)	// Source Select ...................(0-15)							     + ((((Patch)p).sysex[6+ 8]&  1)    * 4)	// Portamento Pedal and Knob Assign (0- 1)							     + ((((Patch)p).sysex[6+ 7]&  1)    * 2)	// Portamento Mode .................(0- 1)							     +  (((Patch)p).sysex[6+ 6]&  1));		// Portamento/Glissando ............(0- 1)		((Patch)bank).sysex[getPatchStart(patchNum)+ 4]=(byte)( ((((Patch)p).sysex[6+10]&  7)    *16)	// Modulation Wheel Assign .........(0- 7)							     +  (((Patch)p).sysex[6+ 9]& 15));		// Modulation Wheel Sensitivity ....(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+ 5]=(byte)( ((((Patch)p).sysex[6+12]&  7)    *16)	// Foot Control Assign .............(0- 7)							     +  (((Patch)p).sysex[6+11]& 15));		// Foot Control Sensitivity ........(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+ 6]=(byte)( ((((Patch)p).sysex[6+14]&  7)    *16)	// Aftertouch Assign ...............(0- 7)							     +  (((Patch)p).sysex[6+13]& 15));		// Aftertouch Sensitivity ..........(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+ 7]=(byte)( ((((Patch)p).sysex[6+16]&  7)    *16)	// Breath Control Assign ...........(0- 7)							     + 	(((Patch)p).sysex[6+15]& 15));		// Breath Control Sensitivity ......(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+ 8]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+ 9]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+10]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+11]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+12]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+13]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+14]=(byte)( 	(((Patch)p).sysex[6+26]&  7));		// Attenuation .....................(0- 7)		((Patch)bank).sysex[getPatchStart(patchNum)+15]=(byte)((((((Patch)p).sysex[6+ 4]& 15)>>3)*64)	// Pitch Bend Step (High) ..........(0-12)							     + 	(((Patch)p).sysex[6+29]& 63));		// Performance Key Shift ...........(0-48)		//    ***** Voice B *****		((Patch)bank).sysex[getPatchStart(patchNum)+16]=(byte)( ((((Patch)p).sysex[6+32]&  1)    *64)	// Poly/Mono .......................(0- 1)							     +  (patchNum     & 63));		// UNDOCUMENTED! matching voice# ...(0-63)		((Patch)bank).sysex[getPatchStart(patchNum)+17]=(byte)( ((((Patch)p).sysex[6+34]&  7)    *16)	// Pitch Bend Step (Low)............(0-12)							     +  (((Patch)p).sysex[6+33]& 15));		// Pitch Bend Range ................(0-12)		((Patch)bank).sysex[getPatchStart(patchNum)+18]=(byte)(  (((Patch)p).sysex[6+35]&127));		// Portamento Time .................(0-99)		((Patch)bank).sysex[getPatchStart(patchNum)+19]=(byte)( ((((Patch)p).sysex[6+31]& 15)    * 8)	// Source Select ...................(0-15)							     + ((((Patch)p).sysex[6+38]&  1)    * 4)	// Portamento Pedal and Knob Assign (0- 1)							     + ((((Patch)p).sysex[6+37]&  1)    * 2)	// Portamento Mode .................(0- 1)							     +  (((Patch)p).sysex[6+36]&  1));		// Portamento/Glissando ............(0- 1)		((Patch)bank).sysex[getPatchStart(patchNum)+20]=(byte)( ((((Patch)p).sysex[6+40]&  7)    *16)	// Modulation Wheel Assign .........(0- 7)							     +  (((Patch)p).sysex[6+39]& 15));		// Modulation Wheel Sensitivity ....(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+21]=(byte)( ((((Patch)p).sysex[6+42]&  7)    *16)	// Foot Control Assign .............(0- 7)							     +  (((Patch)p).sysex[6+41]& 15));		// Foot Control Sensitivity ........(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+22]=(byte)( ((((Patch)p).sysex[6+44]&  7)    *16)	// Aftertouch Assign ...............(0- 7)							     +  (((Patch)p).sysex[6+43]& 15));		// Aftertouch Sensitivity ..........(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+23]=(byte)( ((((Patch)p).sysex[6+46]&  7)    *16)	// Breath Control Assign ...........(0- 7)							     +  (((Patch)p).sysex[6+45]& 15));		// Breath Control Sensitivity ......(0-15)		((Patch)bank).sysex[getPatchStart(patchNum)+24]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+25]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+26]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+27]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+28]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+29]=(byte)(0);				// not used?		((Patch)bank).sysex[getPatchStart(patchNum)+30]=(byte)(  (((Patch)p).sysex[6+56]&  7));		// Attenuation .....................(0- 7)		((Patch)bank).sysex[getPatchStart(patchNum)+31]=(byte)((((((Patch)p).sysex[6+34]& 15)>>3)*64)	// Pitch Bend Step (High) ..........(0-12)							     + 	(((Patch)p).sysex[6+59]& 63));		// Performance Key Shift ...........(0-48)		//    ***** Common *****		((Patch)bank).sysex[getPatchStart(patchNum)+32]=(byte)( ((((Patch)p).sysex[6+62]& 15)    *8)	// Dual Mode Detune ................(0-15)							     + ((((Patch)p).sysex[6+61]&  1)    *4)	// Voice Memory Select .............(0- 1)							     +  (((Patch)p).sysex[6+60]&  3) );		// Key Assign Mode .................(0- 2)		((Patch)bank).sysex[getPatchStart(patchNum)+33]=(byte)(   ((Patch)p).sysex[6+63] );		// Split Point .....................(0-99)		((Patch)bank).sysex[getPatchStart(patchNum)+34]=(byte)(   ((Patch)p).sysex[6+64] );		// Performance name  1 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+35]=(byte)(   ((Patch)p).sysex[6+65] );		// Performance name  2 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+36]=(byte)(   ((Patch)p).sysex[6+66] );		// Performance name  3 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+37]=(byte)(   ((Patch)p).sysex[6+67] );		// Performance name  4 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+38]=(byte)(   ((Patch)p).sysex[6+68] );		// Performance name  5 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+39]=(byte)(   ((Patch)p).sysex[6+69] );		// Performance name  6 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+40]=(byte)(   ((Patch)p).sysex[6+70] );		// Performance name  7 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+41]=(byte)(   ((Patch)p).sysex[6+71] );		// Performance name  8 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+42]=(byte)(   ((Patch)p).sysex[6+72] );		// Performance name  9 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+43]=(byte)(   ((Patch)p).sysex[6+73] );		// Performance name 10 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+44]=(byte)(   ((Patch)p).sysex[6+74] );		// Performance name 11 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+45]=(byte)(   ((Patch)p).sysex[6+75] );		// Performance name 12 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+46]=(byte)(   ((Patch)p).sysex[6+76] );		// Performance name 13 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+47]=(byte)(   ((Patch)p).sysex[6+77] );		// Performance name 14 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+48]=(byte)(   ((Patch)p).sysex[6+78] );		// Performance name 15 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+49]=(byte)(   ((Patch)p).sysex[6+79] );		// Performance name 16 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+50]=(byte)(   ((Patch)p).sysex[6+80] );		// Performance name 17 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+51]=(byte)(   ((Patch)p).sysex[6+81] );		// Performance name 18 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+52]=(byte)(   ((Patch)p).sysex[6+82] );		// Performance name 19 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+53]=(byte)(   ((Patch)p).sysex[6+83] );		// Performance name 20 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+54]=(byte)(   ((Patch)p).sysex[6+84] );		// Performance name 21 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+55]=(byte)(   ((Patch)p).sysex[6+85] );		// Performance name 22 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+56]=(byte)(   ((Patch)p).sysex[6+86] );		// Performance name 23 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+57]=(byte)(   ((Patch)p).sysex[6+87] );		// Performance name 24 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+58]=(byte)(   ((Patch)p).sysex[6+88] );		// Performance name 25 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+59]=(byte)(   ((Patch)p).sysex[6+89] );		// Performance name 26 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+60]=(byte)(   ((Patch)p).sysex[6+90] );		// Performance name 27 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+61]=(byte)(   ((Patch)p).sysex[6+91] );		// Performance name 28 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+62]=(byte)(   ((Patch)p).sysex[6+92] );		// Performance name 29 ..............ASCII		((Patch)bank).sysex[getPatchStart(patchNum)+63]=(byte)(   ((Patch)p).sysex[6+93] );		// Performance name 30 ..............ASCII			calculateChecksum(bank);	}