Help with Korg STY File Format / OC31 Compression

For discussion relating to the Korg PA4X arranger

Moderators: Sharp, X-Trade, Pepperpotty, karmathanever

Post Reply
User avatar
ANAFREE
Full Member
Posts: 119
Joined: Tue Aug 15, 2017 5:31 pm

Help with Korg STY File Format / OC31 Compression

Post by ANAFREE »

I want to develop a tool for importing Korg styles into my DAW (Ableton). I made some progress but got stuck with file formats and internal compression. I know this is an old topic and I am about 20 years late working on this. I have read whatever I could find on other forums but unfortunately many of people and resources are no longer available. I am posting here a summary of what I have learned so far with the hope that someone can provide help. Sorry for the long post below.

I am interested in a style of music (Balkan) that is heavily based on an arranger (especially Korg's PA series). There is a huge body of musical knowledge stored in various styles but I don't own an arranger and can't justify the cost of buying one right now, given that I can already do similar 'arranging' in a DAW. This is why I want a tool that can to import Korg styles.

Based on what I have seen, this should be possible. For example, KORG PA Manager and Music Studio are capable of importing Korg sets and styles, while also reading MIDI, performance data and sound samples. As far as I know, Korg has been unwilling to provide support or file specifications, so a lot of the work has been done by reverse engineering, like in this discussion around developing a (now extinct) tool here
http://www.korgforums.com/forum/phpBB2/ ... c3edea3483


The STY files contain some bookkeeping index information, for which there exists some unofficial (though outdated) documentation
http://www.synthzone.com/forum/ubbthrea ... looks_insi
and I have been able to read. However, the actual style data is compressed and reading it is not straightforward, so this is where I am also stuck.

From the posts here
http://www.korgforums.com/forum/phpBB2/ ... c3edea3483

here
https://www.audiokeys.net/forum/forum/b ... -korg-pa3x

and here
http://www.korgforums.com/forum/phpBB2/ ... hlight=lzw


the compression is unofficially called OC31 because of the first characters marking these blocks (though that doesn't seem to be a recognized 'magic number') and might be based on LZ77, LZ78 or LZW. However, from my attempts it is not straightforward to decompress the data using for example an LZW library, so there is some more unknown structure. This is what one file looks like:
r/Korg - Help with Korg STY File Format / OC31 Compression

There is a 'header' with the style name followed by something like a dictionary of bytes of increasing value that is sometimes broken up by other data. This 'dictionary' appears in most files but is not consistent (e.g. stops at different points). The file structure reminds of a dictionary used in some compression algorithms but decoding it has been a challenge.

From the forum posts and the public user profile information there, it looks like iaoranaemaeva (Alain Fraysse), Babosh, MikeB and others have been able to make some progress and figure out the file formats to some extent. At some point a group of people tried work together to develop an editor (see post here) but whatever resources they collected were stored in a forum (www.dunbharra.net/korg/forum) that is no longer reachable.

I have been using various forum and internet archives to recover some of the old information and discussions but so far have been unsuccessful with deciphering the files . By posting here I am hoping that I might reach someone that participated in the discussions years ago and can provide tips about the file formats or put me in touch with people that might. Thanks.
BR
Platinum Member
Posts: 1515
Joined: Tue Oct 19, 2004 6:11 am
Location: USA

Post by BR »

Just trying to help you.

There is a software called <a href="https://www.midisoft.pl/en/en-mwpa.html" target="_blank">MidiWorks PA+</a> for KorgPa series (never tried myself).
I believe you can import your Korg pa Styles, doing editing and save them as midi file format.
Then you can import your midi styles into a DAW.
Post Reply

Return to “Korg Pa4X”