Xpantastic! group photo

Yahoo Groups archive

Xpantastic!

Index last updated: 2026-04-28 23:44 UTC

Message

Re: [xpantastic] Xpander sysex patch spec- the Xplorer version

2018-05-24 by geebeex@...

Hi,

you should look at the XpanderSinglePatchViewer.cpp, it is self explanatory there.
you have OBWORDS_DATA_LENGTH of data to be "repacked" as double byte values, which is not required of course for the patch name (string) that comes afterward.

// for each double byte, repack the value, and set the Patch property accordingly
unsigned char* pByte= (unsigned char*)pPatch;
for (int i=0;i<OBWORDS_DATA_LENGTH;i++) {
// 8th bit of the 8 bits value is the first bit of the high byte
unsigned char cValue = ((shortArray[i] & 0x0100)>>1) | (shortArray[i] & 0x00ff);
*pByte=cValue;
pByte++;
}
...
// name is 2 bytes/char, high byte never used, thus wchar_t compatible
iReadBytes=0;
iReadBytes=fread(&pPatch->name,sizeof(wchar_t),PATCHNAME_LENGTH,pFile);
assert(iReadBytes==PATCHNAME_LENGTH);

Regards,

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.