Korg Forums Forum Index Korg Forums
A forum for Korg product users and musicians around the world.
Moderated Independently.
Owned by Irish Acts Recording Studio & hosted by KORG USA
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MicroKorg XL+ to XL file converter
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Korg Forums Forum Index -> Korg MS2000 & microKorg
View previous topic :: View next topic  
Author Message
VladiKuz



Joined: 09 Dec 2013
Posts: 26
Location: Russia

PostPosted: Mon Dec 09, 2013 12:28 pm    Post subject: MicroKorg XL+ to XL file converter Reply with quote

As you know, files from MicroKorg XL+ can not be loaded in the usual MicroKorg XL. The difference is not only in the file extensions, but identifiers sections within the files themselves.

I created a simple utility that converts any XL+ files for XL (i.e. non "plus").

Supported file types:
- library *. mkxlp_all;
- identity program *. mkxlp_prg;
- global settings *. mkxlp_glob.

So grab it here (win32 executable):

http://vladikuz72.narod.ru/XLplus2XL/XLplus2XL.htm
Back to top
View user's profile Send private message
hugli



Joined: 13 Jan 2014
Posts: 5

PostPosted: Fri Jan 17, 2014 4:33 pm    Post subject: Reply with quote

Where did you find the specs for the mkxlp* formats? I'd like to write a converter from the binary to some human readable format so that I can print them and keep my computer shut. Mainly for learning purposes, I only own my mkxp for a week.

Thanks for help
Back to top
View user's profile Send private message
VladiKuz



Joined: 09 Dec 2013
Posts: 26
Location: Russia

PostPosted: Mon Jan 20, 2014 10:51 am    Post subject: Reply with quote

Where did you find the specs for the mkxlp* formats?

I have no information about the file format. I just figured out its component parts using a hex editor, comparing different mkxlp*/mkxlp* files.
Of course, if engaged in detailed study of varying the parameters of the instrument and observing what bytes changed, you can get right up to the end.
Back to top
View user's profile Send private message
hugli



Joined: 13 Jan 2014
Posts: 5

PostPosted: Tue Jan 21, 2014 8:58 am    Post subject: Reply with quote

Thanks for the hints. My quest for "decompiling" the format starts today.
(I knew straight away, that I wil use my new toy (MKXL) mainly for non-musical purposes)
Back to top
View user's profile Send private message
itsme1234



Joined: 10 Feb 2014
Posts: 4

PostPosted: Mon Feb 10, 2014 7:07 pm    Post subject: Reply with quote

Hi Vlad. So, have you sucessfully transfered the sound patches from the XL+ over to the XL? Thanks
Back to top
View user's profile Send private message
VladiKuz



Joined: 09 Dec 2013
Posts: 26
Location: Russia

PostPosted: Tue Feb 11, 2014 7:44 am    Post subject: Reply with quote

itsme1234
Of course, because for this I did Converter Smile

However, we should not forget that there are differences within the synthesizer to set PCM / DWGS samples. Therefore, patches, using such samples may sound different.
Back to top
View user's profile Send private message
michelkeijzers
Approved Merchant
Approved Merchant


Joined: 08 Feb 2007
Posts: 9113
Location: Netherlands

PostPosted: Tue Feb 11, 2014 10:55 am    Post subject: Reply with quote

Dear VladiKuz,

I can't check your application here at work but I will try at home. It looks promising and thanks for sharing it for free to the community here.

For the record, I don't have a microKorg myself but I'm busy adding support of PCG Tools (see signature below) for microKorg and trying to read mkxl* files ... if you have specs of those files, could I get a copy of it?

Kind regards, Michel
_________________

Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
VladiKuz



Joined: 09 Dec 2013
Posts: 26
Location: Russia

PostPosted: Tue Feb 11, 2014 12:52 pm    Post subject: Reply with quote

michelkeijzers
if you have specs of those files, could I get a copy of it?

PCG Tools with support XL(+) files - very interesting!

Sorry, i have no specs/docs of format those files. I just figured out its component parts using a hex editor, comparing different mkxlp*/mkxlp* files. But in a day or two, i am explain there some discovered details (need some time, i am very busy now).
Back to top
View user's profile Send private message
michelkeijzers
Approved Merchant
Approved Merchant


Joined: 08 Feb 2007
Posts: 9113
Location: Netherlands

PostPosted: Tue Feb 11, 2014 12:58 pm    Post subject: Reply with quote

VladiKuz wrote:
michelkeijzers
if you have specs of those files, could I get a copy of it?

PCG Tools with support XL(+) files - very interesting!

Sorry, i have no specs/docs of format those files. I just figured out its component parts using a hex editor, comparing different mkxlp*/mkxlp* files. But in a day or two, i am explain there some discovered details (need some time, i am very busy now).


Actually ... I don't need that much details for now ... since the microKorg is not using combis, the program name and category (which is based on the index) is the only thing I need to know.

However, getting example files would be great ... currently I can read .mkxl_all files, but I don't have any .mkxlp* files ... so if you can send (zip) them to me (preferably before Friday evening), I would be very glad so I can this weekend try to finish with at least all Microkorg XL and XL Plus formats. And if I have time also sysex for microKorg.
_________________

Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
VladiKuz



Joined: 09 Dec 2013
Posts: 26
Location: Russia

PostPosted: Wed Feb 12, 2014 6:01 am    Post subject: Reply with quote

michelkeijzers
However, getting example files would be great ... currently I can read .mkxl_all files, but I don't have any .mkxlp* files

I sent the files to you today, check mailbox Smile

Little informations, from my observations:

The .mkxl[p]_all files contain:
0x00000 AllD - 32 bytes
0x00020 PrgS - 32 bytes
0x00040 PrgD - 528 bytes, the same as .mkxl[p]_prog file
...................... - each program repeated 128 times
0x10840 GlbD - 176 bytes, the same as .mkxl[p]_glob file
0x108F0 LibD - 160 bytes

.mkxl* and .mkxlp* have only one differences: the sequence "6140" (36h 31h 34h 30h) in each section of XL files, and sequence "6141" (36h 31h 34h 30h) in each section of XLplus files.
Back to top
View user's profile Send private message
michelkeijzers
Approved Merchant
Approved Merchant


Joined: 08 Feb 2007
Posts: 9113
Location: Netherlands

PostPosted: Wed Feb 12, 2014 8:45 am    Post subject: Reply with quote

VladiKuz wrote:
michelkeijzers
However, getting example files would be great ... currently I can read .mkxl_all files, but I don't have any .mkxlp* files

I sent the files to you today, check mailbox Smile

Little informations, from my observations:

The .mkxl[p]_all files contain:
0x00000 AllD - 32 bytes
0x00020 PrgS - 32 bytes
0x00040 PrgD - 528 bytes, the same as .mkxl[p]_prog file
...................... - each program repeated 128 times
0x10840 GlbD - 176 bytes, the same as .mkxl[p]_glob file
0x108F0 LibD - 160 bytes

.mkxl* and .mkxlp* have only one differences: the sequence "6140" (36h 31h 34h 30h) in each section of XL files, and sequence "6141" (36h 31h 34h 30h) in each section of XLplus files.


Thank you very much for sending ... especially the mkxlp containing the PrgD information is interesting since that is what is being used in PCG Tools. But I will store the other files for possible later addition too when useful to be used.
_________________

Developer of the free PCG file managing application for most Korg workstations: PCG Tools, see https://www.kronoshaven.com/pcgtools/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
itsme1234



Joined: 10 Feb 2014
Posts: 4

PostPosted: Fri Feb 14, 2014 4:15 pm    Post subject: Reply with quote

Thanks much Vlad!

I wonder if those 'sample' that are not converted along with the presets can be manually loaded in? Have you tried this or is it even possible? Thanks again!!
Back to top
View user's profile Send private message
X-Trade
Moderator


Joined: 14 Feb 2006
Posts: 6494
Location: Leeds, UK

PostPosted: Fri Feb 14, 2014 6:52 pm    Post subject: Reply with quote

itsme1234 wrote:
Thanks much Vlad!

I wonder if those 'sample' that are not converted along with the presets can be manually loaded in? Have you tried this or is it even possible? Thanks again!!


The XL and XL+ can't load new samples. They are built in.
_________________
Current Gear: Kronos 61, RADIAS-R, Volca Bass, ESX-1, microKorg, MS2000B, R3, Kaossilator Pro +, MiniKP, AX3000B, nanoKontrol, nanoPad MK II,
Other Mfgrs: Moog Sub37, Roland Boutique JX03, Novation MiniNova, Akai APC40, MOTU MIDI TimePiece 2, ART Pro VLA, Focusrite Saffire Pro 40.
Past Gear: Korg Karma, TR61, Poly800, EA-1, ER-1, ES-1, Kawai K1, Novation ReMote37SL, Boss GT-6B
Software: NI Komplete 10 Ultimate, Arturia V Collection, Ableton Live 9. Apple OSX El Capitan on 15" MacBook Pro
Back to top
View user's profile Send private message Visit poster's website
iron_horse



Joined: 06 Nov 2016
Posts: 1

PostPosted: Sun Nov 06, 2016 7:47 pm    Post subject: Reply with quote

In case anyone needs a simple way to convert .mkxl_all files to .mkxlp_all I knocked up a python script that does exactly that (on my mac, or if you have python installed on windows). Cut/paste the python code below into a file (for example kconvert.py) and run it using: python kconvert.py inputfilename outputfilename

Code:
# Python2 (might work on python3, not tried it)
#
# Convert .mkxl_all files to .mkxlp_all format (minor byte change)
#
# From info on http://www.korgforums.com/forum/phpBB2/viewtopic.php?t=87208&sid=f7399b5d9092db496a82ef99d1c4f526
#

#
# Arguments: input-filename output-filename
#

def fixData(start):
  end = start+4
  if "".join(data[start:end]) != '6140':
    raise AssertionError('Expected 6140 but not found at '+str(start))
  data[start+3] = '1'

#
#--- Main program
import sys
import os.path

if len(sys.argv) != 3:
  print('Usage: <script> inputFilename outputFilename')
  sys.exit(1)

inputFilename = sys.argv[1]
outputFilename = sys.argv[2]

if os.path.isfile(outputFilename):
  raise AssertionError('Output file already exists, please delete it first')

if not os.path.isfile(inputFilename):
  raise AssertionError('Input file not found')

# File is small so read it in one go
data = open(inputFilename, "rb").read()
data = list(data)
fileLength = len(data)

# First two chunks to change are only a few bytes apart
fixData(0)
fixData(32)
for start in range(64, fileLength, 528):
  fixData(start)

with open(outputFilename, 'w') as f:
  f.write("".join(data))
Back to top
View user's profile Send private message
raphkorg



Joined: 10 Nov 2018
Posts: 3

PostPosted: Sat Nov 10, 2018 3:51 pm    Post subject: Reply with quote

iron_horse wrote:
In case anyone needs a simple way to convert .mkxl_all files to .mkxlp_all I knocked up a python script that does exactly that (on my mac, or if you have python installed on windows). Cut/paste the python code below into a file (for example kconvert.py) and run it using: python kconvert.py inputfilename outputfilename

Code:
# Python2 (might work on python3, not tried it)
#
# Convert .mkxl_all files to .mkxlp_all format (minor byte change)
#
# From info on http://www.korgforums.com/forum/phpBB2/viewtopic.php?t=87208&sid=f7399b5d9092db496a82ef99d1c4f526
#

#
# Arguments: input-filename output-filename
#

def fixData(start):
  end = start+4
  if "".join(data[start:end]) != '6140':
    raise AssertionError('Expected 6140 but not found at '+str(start))
  data[start+3] = '1'

#
#--- Main program
import sys
import os.path

if len(sys.argv) != 3:
  print('Usage: <script> inputFilename outputFilename')
  sys.exit(1)

inputFilename = sys.argv[1]
outputFilename = sys.argv[2]

if os.path.isfile(outputFilename):
  raise AssertionError('Output file already exists, please delete it first')

if not os.path.isfile(inputFilename):
  raise AssertionError('Input file not found')

# File is small so read it in one go
data = open(inputFilename, "rb").read()
data = list(data)
fileLength = len(data)

# First two chunks to change are only a few bytes apart
fixData(0)
fixData(32)
for start in range(64, fileLength, 528):
  fixData(start)

with open(outputFilename, 'w') as f:
  f.write("".join(data))


ok, so how exactly do you "run" that?
i have it set it up in terminal, then whats the next step to convert the file?

i have no coding experience Confused

im on mac mojave

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Korg Forums Forum Index -> Korg MS2000 & microKorg All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group