Page 1 of 1

Sequence .PAT file format

Posted: Tue Jul 28, 2020 5:11 pm
by amongstmyselves
Hi all,

I was wondering if anyone knows the format of the .PAT files used for the sequencer. I'd like to try adding in a bunch. I'm thinking of writing some code to make up these files maybe from some simple text description files or something.

I'm using OS 1.4.4

Cheers,

Steve.

Re: Sequence .PAT file format

Posted: Sat Sep 19, 2020 11:05 am
by John Bowen
Steve,

minorguy has some comments about these. I’ll ask him to respond here.

Re: Sequence .PAT file format

Posted: Sat Sep 19, 2020 1:51 pm
by minorguy
I think that aspect of the sequencer needs some work. The file holds the 16 steps of the 4 tracks as 4-byte signed integers. But it doesn't contain any of the other parameters. So the file size is (16 * 4 + 1) * 4 = 260 bytes. The +1 is for the 4-byte version number.

The data is arranged this way. All integers are little endian (low byte first). First is the version number which is always 1. Next comes the 16 steps of track A, or what's called SeqA in the menu. Step 1 is first and step 16 is last. After that come the steps for tracks B, C, and D. That's it.

So for example, the first few bytes of file that's shipped with the Solaris, seq1.pat, look like the following in hexidecimal:

01 00 00 00 00 00 00 00 03 00 00 00 07 00 00 00
0C 00 00 00 00 00 00 00 03 00 00 00 07 00 00 00

The first integer is 0x01 which is the version number. This is followed by 0x00, 0x03, 0x07, 0x0C, 0x00, 0x03, and 0x07 which are the first seven step values of track A. (The pattern length is not saved in the file.)

Unfortunately there's a bug such that after you load the file the values are not displayed in the graphics display. However the values are still loaded and will be used. It's just that the display didn't get updated with the new values.

Re: Sequence .PAT file format

Posted: Mon Sep 21, 2020 5:31 pm
by amongstmyselves
Thanks minorguy,

That's the information I was after.

Cheers,

Steve.