Yahoo Groups archive

Casio CZ/ VZ/ FZ - Pro Series

Index last updated: 2026-04-28 22:42 UTC

Message

Re: [CZsynth] VZ SysEx Format

2014-01-29 by José Ángel Morente

Some time ago I posted a C program used to convert from VZ1 to standard SYX files. You may take a look at the checksum routine, maybe it can be helpful:

#include
#include
#include

#define TONES_NO 64;

typedef unsigned char byte;

int main (int argc,char *argv[])
{
char *inputfilestream;
char *outputfilestream;
FILE *inputfile;
FILE *outputfile;

byte tonebuf[336];
byte operbuf[100];

byte syxopen[8]={
0xf0, 0x44, 0x03, 0x00, 0x70, 0x70, 0x02, 0xf7
};
byte syxdata[6]={
0xf0, 0x44, 0x03, 0x00, 0x70, 0x74
};
byte syxclose[7]={
0xf0, 0x44, 0x03, 0x00, 0x70, 0x71, 0xf7
};

int i,j,checksum=0;

byte buffer[10];

if (argc >= 2) {

inputfilestream = argv[1];
if (argc > 2) {
outputfilestream = argv[2];
} else {
outputfilestream = malloc(255);
strcpy(outputfilestream,inputfilestream);
outputfilestream = strcat(outputfilestream,".syx");
}

inputfile = fopen(inputfilestream,"rb");
outputfile = fopen(outputfilestream, "wb");

//write OPEN and DATA sysx messages
fwrite(syxopen,sizeof(syxopen),1,outputfile);
fwrite(syxdata,sizeof(syxdata),1,outputfile);

//process the patches
for (i=0;i<64;i++) {
fread(tonebuf,sizeof(tonebuf),1,inputfile);
checksum = 0;
for (j=0;j
//update the checksum
checksum -= tonebuf[j];

buffer[1] = tonebuf[j] & 0x0f;
buffer[0] = tonebuf[j] >> 4;
fwrite(buffer,2,1,outputfile);
}
//ignores the bit 7
checksum &= 0x7f;
fwrite(&checksum,1,1,outputfile);

}
//process the operations
for (i=0;i<64;i++) {
fread(operbuf,sizeof(operbuf),1,inputfile);
checksum = 0;
for (j=0;j
//update the checksum
checksum -= operbuf[j];

buffer[1] = operbuf[j] &; 0x0f;
buffer[0] = operbuf[j] >> 4;
fwrite(buffer,2,1,outputfile);
}
//ignores the bit 7
checksum &= 0x7f;
fwrite(&checksum,1,1,outputfile);

}

buffer[0] = 0xf7;
fwrite(buffer,1,1,outputfile);
fwrite(syxclose,sizeof(syxclose),1,outputfile);


fclose(inputfile);
fclose(outputfile);
}
return 0;
}


--



On Sun, Jan 5, 2014 at 10:23 PM, <facebook@...> wrote:

Happy new year to all,


I spent some time during the holidays setting up an smal HTML5 based framework which is intented to act as a librarian for the VZ sound patches.

Going through the specs I came over the checksum, which isn't described in detail in the CasioVZ-HohnerHS Sysex Format.pdf.

Can anyone help me out on the details here?

My idea:
Create a little helper to rearrange existing sysex files, which will (in the first step) be consolidated in a new sysex file to be uploaded.

My progress:
So far I can drag and drop sysex files into the GUI and extract the tone and op names of the banks, also a re-arrangement is possible (from gui side).

My need:
Any help on the internal sysex format - especially on the check sum.

Technology:
HTML5 so anyone could use it. Upload to the VZ would still need an external tool but maybe HTML5 will support that, too in the future.

Me:
I have a VZ10m, HS-2, CZ-3000 and an HT-3000 in my set-up (besides D-110, X3R, AN1x, Phm and sonic|core Scope 5)

Any help is appreciated,

cheers,

Pete

(I was in the forum before but lot my ID after a computer crash ;) )


Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.