Support Our Community!
We’re proud to keep this forum running as a place for enthusiasts like you to connect, learn, and share. To help cover hosting costs and keep everything running smoothly, we invite you to consider becoming a VIP Member for just $1 per month.

As a thank you, you’ll gain VIP status, enjoy a completely ad-free experience, and know you’re helping sustain the forum for everyone.

Thank you for being a part of our community! ❤️

Become a VIP Member Today!

KSEQ to ESEQ file conversion

The Yamaha SY99 is a synthesiser combining frequency modulation synthesis (branded as Advanced FM) and sample-based synthesis (branded as Advanced Wave Memory 2) and the direct successor to Yamaha's SY77/TG77

Moderators: parametric, Derek, Saul

User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

Thanks you!

So this means you can either use Full Pattern Mode or use Song Mode with a Pattern Track on Track 16? That would make sense.

My friend’s KSEQ files are all (but one) without patterns, so I will likely not implement this in the near future. Even thought it would be another interesting challenge ;)

I already included some info about the missing pattern function in the »Info«-section about what works and what not. But maybe it should be clearer.
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

By the way, how did you manage to get the correct drum mapping for the songs? All the sequences I have from the SY77 have a totally different drum sound mapping. But the demo songs sound perfect!
User avatar
bnz99 Germany
Member
Member
Posts: 53
Joined: Sat Jul 25, 2020 5:31 pm
4

Re: KSEQ to ESEQ file conversion

Unread post by bnz99 »

Well, I play them back with the sy77 and the exact multi's coming with the songs. So it's also exactly the correct sounds and drum mappings.

So I figured out how the patterns work. For what it's worth the short description: you record the patterns in pattern mode. This seems to be primarly designed to be used in step editing mode (the default). The SY77 automatically jumps to track 16 the moment you hit the record button in pattern mode. Once you have the patterns recorded, you go to song mode. Track 16 cannot (!) be selected for normal instrument recording. Only tracks 1 to 15 are selectable for real or step recording. If you go to the song editing mode (step editing for the songs), you can hit track 16 though. For track 16, it's not the step editing page that is shown, but a special chain pattern page where you can build sequences of patterns and specify how often they repeat. This pattern chain will then be played back along with the remaining the song.

I have built a simple four bar song (c major scale up and down) along with a pattern chain of two patterns in case you are interested to look at it anyway (no pressure, I personally don't need it). Pattern 1 is placed at bars 1-3 and pattern 2 is placed a bar 4. In pattern_norepeat.K07, this chain is played once without repetition. In pattern-looped-once.K08 the pattern is repeated once. In the current midi conversion, Pattern 1 is ignored and only pattern 2 is played once on track 16. No repetitions.

By the way, I'll probably clean up the dropbox folder in a day or two.
User avatar
bnz99 Germany
Member
Member
Posts: 53
Joined: Sat Jul 25, 2020 5:31 pm
4

Re: KSEQ to ESEQ file conversion

Unread post by bnz99 »

Ah, just continued testing the chic corea demo song chic01. It actually uses patterns for some drums. Never realized that.
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

bnz99 wrote: Thu Nov 28, 2024 5:42 pm Well, I play them back with the sy77 and the exact multi's coming with the songs. So it's also exactly the correct sounds and drum mappings.
Ahhh, ok! For some reason (probably my personal perspective) I thought you were using Software instruments. I just found the drum sound mappings in the SY77 manual (page 153). Will try to remap them to GM drums, though this will not work for all sounds, though.

Thanks also for the pattern test file! I’ll save them for later in any case, together with your explanation.
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

Update to Version 0.4

https://animaux.de/kseq/

+ You can now convert »Sequencer All (.Kxx)« files as well as »Song KSEQ (.Mxx)« files.
User avatar
Derek Wales
Global Moderator
Global Moderator
Posts: 6772
Joined: Fri Dec 07, 2007 12:00 am
17
Where Are You Located?: Wales, UK

Re: KSEQ to ESEQ file conversion

Unread post by Derek »

Well done, Animaux! :D

I am glad somebody is working on this and making progress, as I never had the appetite to continue beyond the basic top level decoding I did in sy.factory as I don't use workstation sequencers myself. It's always been in my "when I am really bored backlog" and if enough people were asking for it, but in the 18 years since I first wrote sy.factory I only ever had an occasional enquiry - not enough to warrant me putting the effort in amongst everything else I do.

I am thinking once you are happy it is stable enough maybe create some posts in SY77 and SY99 forum sections that are more explicit for somebody looking for KSEQ to MIDI Conversion (as it may get overlooked due to this thread being about KSEQ to ESEQ and being in the SY99 sub forum), and I can make those topics "sticky" to keep them at the top of the forum.

Also, I assume this work is all done with SY77 KSEQs, and again maybe this will get overlooked if somebody is looking for SY77 KSEQ to MIDI? But that is all tidying up that can be done once you think this is stable enough to be know about. I would also be happy to provide a link from my xfactory librarians page.

I am not sure if you are aware, but the SY99 expanded the SY77 Sequencer by allowing you to have 10 songs in memory. Attached is an SY99 blank KSEQ created by sy.factory, which shows you the structure for a KNN with ten songs in

I do have SY99 TNN files with sequence data in, which may be worth you running through your converter. I was going to provide one. but I have just noticed a bug when saving as a KNN file from the TNN file in that it just exports the first song in an SY99 TNN. If it would help you, I can look into fixing that bug and go through the SY99 TNN files I have to get the sequencer data for you. If the TNN files only have one song in, I could probably merge a few into a test file.

Keep up the good work! :D
Attachments
SY99 KNN.K01.zip
(759 Bytes) Downloaded 19 times
Regards
Derek Cook

http://www.carregddu.co.uk
http://www.echoes-music.co.uk
http://www.xfactory-librarians.co.uk
http://www.ex5tech.co.uk
User avatar
bnz99 Germany
Member
Member
Posts: 53
Joined: Sat Jul 25, 2020 5:31 pm
4

Re: KSEQ to ESEQ file conversion

Unread post by bnz99 »

By the way, I have made a simple binary comparison between my two pattern examples (pattern_norepeat.K07 and pattern-looped-once.K08). It found differences in only two bytes 0xBA6 and F8A. So the pattern chains are described somewhere in the area 0xBA1 - 0x0FFF described as "random bytes ?" in the Pekos Bill document.

I'll have to create a few more example files to map out this area of the file format, but I think I'll try to continue where you left off as I think we are too close to have something working well :-) Unfortunately, I won't have access to my SY77 as I'm with my family for the rest of the year.

Attached is a work in progress 010editor binary template of what we know so far (to my understanding and only for sy77 kseqs). That'll probably help to figure out the remaining stuff with some systematically created example files. It probably still has a few problems, I just hacked this together in a few hours yesterday and today.
Attachments
kseq.zip
(3.42 KiB) Downloaded 22 times
User avatar
bnz99 Germany
Member
Member
Posts: 53
Joined: Sat Jul 25, 2020 5:31 pm
4

Re: KSEQ to ESEQ file conversion

Unread post by bnz99 »

Look like this might be easier than I thought.

My test pattern were arranged in the following form:
pattern_norepeat.K07:

- repeat start marker
- pattern 1
- pattern 1
- pattern 1
- pattern 2
- END

This is what it looks like in the reserved6 area:
pattern_norepeat.png
pattern_norepeat.png (15.48 KiB) Viewed 139 times
pattern-looped-once.K08:

- repeat start marker
- pattern 1
- pattern 1
- pattern 1
- pattern 2
- repeat end marker x1
- END

This is what it looks like in the reserved6 area:
pattern-repeat-once.png
pattern-repeat-once.png (6.59 KiB) Viewed 139 times
My hypothesis: the pattern chains might just be a byte wise chain of either markers (0x80 for start repeat, 0XFF end of chain, the -127 (0x81) might be the number of repetitions when the leftmost bit starts with 1 and needs to be masked out (100000001)) or they are patterns numbers of the pattern allocation table. It's probably something like this. I'm not sure what to make of the second changed byte at 0xF8A yet though.

I guess everything else to confirm this needs more sample files.
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

Thank you very much Derek!

I’m happy to start a specific thread for the converter since it seems to be working quite well already, except for the lack of pattern track support. Maybe for now the SY77 forum would be sufficient, since looking at your example file I’m sure my converter wont work with those at the moment.

It’s maybe just a matter of finding the COM-KSEQSY1_SEQ-markers and adjust the offsets, but then again it looks like the lengths of the individual sequences seem to be shorter than in the SY77-examples, where everything seems to have a fixed block length. Maybe this is beyond the scope of what I can do without having access to either a SY77 oder SY99.

Is it possible to save .Mxx-files (Song KSEQ) from the SY99 as well?

Regarding the pattern track, I think you already figured out what bnz99 is currently trying to reverse engineer, Derek?

»Pekos Bill« has deciphered the structure of the user patterns to some extent, but he assumed another section to be filled with random data. I supected, and bnz99 now found out that the pattern chain seems to be stored exactly there. You should have all the info about these parts since sy.factory shows them all nicely (Patterns, User Pattern Chains, User Time Siganatures).

Do you still have documentation about these and would be willing to share the info?

All the best,

Alexander
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

I’ve created a new thread for the converter like Derek suggested. It’s in the SY77-forum for now, since at least for now it is probably only working for SY77 files:

viewtopic.php?p=127641
User avatar
Derek Wales
Global Moderator
Global Moderator
Posts: 6772
Joined: Fri Dec 07, 2007 12:00 am
17
Where Are You Located?: Wales, UK

Re: KSEQ to ESEQ file conversion

Unread post by Derek »

animaux wrote: Sun Dec 01, 2024 7:16 pm Thank you very much Derek!

I’m happy to start a specific thread for the converter since it seems to be working quite well already, except for the lack of pattern track support. Maybe for now the SY77 forum would be sufficient, since looking at your example file I’m sure my converter wont work with those at the moment.

It’s maybe just a matter of finding the COM-KSEQSY1_SEQ-markers and adjust the offsets, but then again it looks like the lengths of the individual sequences seem to be shorter than in the SY77-examples, where everything seems to have a fixed block length. Maybe this is beyond the scope of what I can do without having access to either a SY77 oder SY99.

Is it possible to save .Mxx-files (Song KSEQ) from the SY99 as well?

Regarding the pattern track, I think you already figured out what bnz99 is currently trying to reverse engineer, Derek?

»Pekos Bill« has deciphered the structure of the user patterns to some extent, but he assumed another section to be filled with random data. I supected, and bnz99 now found out that the pattern chain seems to be stored exactly there. You should have all the info about these parts since sy.factory shows them all nicely (Patterns, User Pattern Chains, User Time Siganatures).

Do you still have documentation about these and would be willing to share the info?

All the best,

Alexander
I have the SY99 packed away at present whilst it is up for sale (and new toy has taken its place), but could dig it out and see if I can save to the different options.

In terms of your Q on formats, it is 16 years since I wrote the code to import/export files, so will need to dig it out and see what I can share. It may take me a little while to get around to that
Regards
Derek Cook

http://www.carregddu.co.uk
http://www.echoes-music.co.uk
http://www.xfactory-librarians.co.uk
http://www.ex5tech.co.uk
User avatar
animaux Germany
Member
Member
Posts: 29
Joined: Wed Oct 16, 2024 8:29 pm
Where Are You Located?: Weimar

Re: KSEQ to ESEQ file conversion

Unread post by animaux »

Derek wrote: Wed Dec 04, 2024 10:22 pm I have the SY99 packed away at present whilst it is up for sale (and new toy has taken its place), but could dig it out and see if I can save to the different options.

In terms of your Q on formats, it is 16 years since I wrote the code to import/export files, so will need to dig it out and see what I can share. It may take me a little while to get around to that
Thank you Derek,

though it would interesting to have a look at the SY99 files, my initial interest was decoding the SY77 sequences. I only have a whole lot of those I wanted to convert and don’t have either SY99 or SY77 myself. If there is someone interested in converting those as well, then they could provide me with example files and you wont have to dig out your SY99, I guess.

16 years is quite some time, considering I sometimes forget what I wrote last week ;). No hurries from my part, but if you are able to dig out some info about what sy.factory is decoding from the sequences, I would be very happy.

All the best,

Alexander
Post Reply