Hey, I would like to do my own converter. Is there someplace that you document the file format for your sequence file, not the XML version.
Thanks
Ron
Hi Ron; only in the source code. BTW, we no longer use xseq files.
In xLights 3.6
*.xseq was the binary file containing all channels, frames for a sequence
*.xml had the nutcracker efefcts
*.fpp was binary file for the FPP
In xLights 4.0 we standardized on *.fpp as our binary file.
Here is the code that writes the fpp file in xLights
void FRAMECLASS WriteFalconPiFile(const wxString& filename)
{
wxUint8 vMinor = 0;
wxUint8 vMajor = 1;
wxUint16 fixedHeaderLength = 28;
wxUint32 stepSize = rountTo4(SeqData.NumChannels());
wxUint16 stepTime = SeqData.FrameTime();
// Ignored by Pi Player
wxUint16 numUniverses = 0;
// Ignored by Pi Player
wxUint16 universeSize = 0;
// Gamma 0=encoded 1=linear
wxUint8 gamma = 1;
// Gamma 0=unknown 1=mono 2=RGB
wxUint8 colorEncoding = 2;
wxFile f;
// Step Size must be multiple of 4
//wxUint8 buf[stepSize];
size_t ch;
if (!f.Create(filename,true))
{
ConversionError(wxString("Unable to create file: ")+filename);
return;
}
wxUint8* buf;
buf = (wxUint8 *)calloc(sizeof(wxUint8),stepSize < 1024 ? 1024 : stepSize);
// Header Information
// Format Identifier
buf[0] = 'P';
buf[1] = 'S';
buf[2] = 'E';
buf[3] = 'Q';
buf[6] = vMinor;
buf[7] = vMajor;
// Fixed header length
buf[8] = (wxUint8)(fixedHeaderLength%256);
buf[9] = (wxUint8)(fixedHeaderLength/256);
// Step Size
buf[10] = (wxUint8)(stepSize & 0xFF);
buf[11] = (wxUint8)((stepSize >>

& 0xFF);
buf[12] = (wxUint8)((stepSize >> 16) & 0xFF);
buf[13] = (wxUint8)((stepSize >> 24) & 0xFF);
// Number of Steps
buf[14] = (wxUint8)(SeqData.NumFrames() & 0xFF);
buf[15] = (wxUint8)((SeqData.NumFrames() >>

& 0xFF);
buf[16] = (wxUint8)((SeqData.NumFrames() >> 16) & 0xFF);
buf[17] = (wxUint8)((SeqData.NumFrames() >> 24) & 0xFF);
// Step time in ms
buf[18] = (wxUint8)(stepTime & 0xFF);
buf[19] = (wxUint8)((stepTime >>

& 0xFF);
// universe count
buf[20] = (wxUint8)(numUniverses & 0xFF);
buf[21] = (wxUint8)((numUniverses >>

& 0xFF);
// universe Size
buf[22] = (wxUint8)(universeSize & 0xFF);
buf[23] = (wxUint8)((universeSize >>

& 0xFF);
// universe Size
buf[24] = gamma;
// universe Size
buf[25] = colorEncoding;
buf[26] = 0;
buf[27] = 0;
if (mediaFilename.length() > 0) {
int len = strlen(mediaFilename.c_str()) + 5;
buf[28] = (wxUint8)(len & 0xFF);
buf[29] = (wxUint8)((len >>

& 0xFF);
buf[30] = 'm';
buf[31] = 'f';
strcpy((char *)&buf[32],mediaFilename.c_str());
fixedHeaderLength += len;
fixedHeaderLength = rountTo4(fixedHeaderLength);
}
// Data offset
buf[4] = (wxUint8)(fixedHeaderLength%256);
buf[5] = (wxUint8)(fixedHeaderLength/256);
f.Write(buf,fixedHeaderLength);
for (long period=0; period < SeqData.NumFrames(); period++)
{
for(ch=0; ch<stepSize; ch++)
{
buf[ch] = SeqData[period][ch];
}
f.Write(buf,stepSize);
}
f.Close();
free(buf);
}