My apologies. still slowly recovering from my Christmas light hangover...
It is pretty simplistic right now as it is expecting the file names hard coded and you have to manual update the script to have the right audio file name.
Here is how the xseq file format works:
the first 512 bytes are a header that contains the following:
file type (8bytes hard coded to 'xLights')
file version (2bytes set to 1 Today)
number channels (8 bytes total number of channels in the sequence)
number periods (8 bytes total number of periods, this is 20*num seconds in song Today)
Padding (4 bytes)
Audio file name (remaining bytes to 512 boundary)
After the header the file consists of 1 byte per period per channel. so channel 1 starts at 512 bytes, if there are 1024 periods in the file then channel 2 starts at 1536, channel three at 2560, etc...
Notes on the script:
'\' is a special character in python and has be escaped in a string. You will see where I build the audio file name:
out.write(b'\x00\x00\x00\x00C:\\xLights\\emanuel.wav')
out.write(b'\x00'*458)
how that works. The second line of code is to pad out the 512 bytes to all 0 and the 458 must be adjusted to the proper value based on the length of the filename.
There are a lot of improvements I could make to this and I could even make a graphical front end to it. I am willing to make these changes but would like to hear what Matt is working on so that we are not duplicating any efforts.
Good luck,
Frank