Parameter file format deciphered

Discussion relating to the Korg Wavedrum

Moderators: Sharp, X-Trade, Pepperpotty, karmathanever

MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Parameter file format deciphered

Post by MidiSaron »

Hi all,

After having a closer look at the file WD2_PROG.BIN with a hex editor, I found out where and how the single parameters are stored. Actually it's quite simple. Every parameter is stored as a 16-bit value, MSByte first, 2's complement where negative values can occur. There's no additional header or something like that in the file.

The 54 parameters are stored in the following order:
Head Algo Pres Curve
Pre EQ
Head Algo Tune
Head Algo Decay
Head Algo Level
Head Algo Pan
Head Algo Number
Head Algo Parameter 1
Head Algo Parameter 2
Head Algo Parameter 3
Head Algo Parameter 4
Head Algo Parameter 5
Head Algo Parameter 6
Head Algo Parameter 7
Head Algo Parameter 8
Rim Algo Tune
Rim Algo Decay
Rim Algo Level
Rim Algo Pan
Rim Algo Number
Rim Algo Parameter 1
Rim Algo Parameter 2
Rim Algo Parameter 3
Rim Algo Parameter 4
Rim Algo Parameter 5
Rim Algo Parameter 6
Rim Algo Parameter 7
Rim Algo Parameter 8
Head PCM Tune
Head PCM Decay
Head PCM Level
Head PCM Pan
Head PCM Number
Head PCM Vel Curve
Head PCM Pres Curve
Head PCM Pres Tune
Head PCM Pres Decay
Rim PCM Tune
Rim PCM Decay
Rim PCM Level
Rim PCM Pan
Rim PCM Number
Rim PCM Vel Curve
Rim PCM Pres Curve
Rim PCM Pres Tune
Rim PCM Pres Decay
Reverb Type
Reverb Balance
Reverb Depth
Reverb Hi Damp
Delay Feedback
Delay Balance
Delay Time
Delay Hi Damp

The file WD2_PROG.BIN contains the 100 user presets, from 00 to 99, just one after the other. Although presets containing double-size algos have less editable parameters, the space reserved for these presets in the file is exactly the same. I guess the non-used parameters are ignored by the Wavedrum.

The file PRE_PROG.BIN contains the factory presets, P00...P99, and has the same format. There's another incarnation of this file, in folder Factory, called F_PROG.BIN. I don't know why this file exists twice on the SD card; maybe one version is used when doing a factory reset.

Only guessing here, but maybe the format of the Wavedrum Oriental's files is similar, with 150 rather than 100 presets in them?

I'm wondering why the files mentioned by freestok have the extension .BOR rather than .BIN. Is this a windows thing?


Anyway, once I got that format, it was easy to import the file into a spreadsheet program, thus creating a complete parameter listing for all presets. I'll write about that in another posting here.

Hope this is of some help for someone!

edit: of course I meant WD2_PROG.BIN, not WD2_DATA.BIN
edit: removed "the following applies to the silver Wavedrum", since the format of the Oriental Wavedrum is exactly the same.
Last edited by MidiSaron on Sat Oct 13, 2012 2:17 pm, edited 3 times in total.
MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Post by MidiSaron »

It's me again :)

Here's the spreadsheet file I mentioned earlier today:
http://www.mediafire.com/?a3pqs1bk1qt4noo

Note that all data input to the spreadsheet is done via a single cell: A1 on sheet "HexString". That cell contains one very long string of ASCII hex characters that represent the entire file PRE_PROG.BIN. I obtained that string by copy/paste from the hex editor I was using (0xED on Mac, other hex editors would surely work too).
I hope Excel can cope with such long strings; I created this with Open Office.

You can grab the contents of your own WD2_PROG.BIN file that way and get a nice listing of all your Wavedrum presets.

Let me know what you think!
freestok
Junior Member
Posts: 68
Joined: Fri Jul 22, 2011 11:24 pm

Post by freestok »

It's amazing

i'm so glad for that

WD2_PROG.BIN of SILVER
and WD2_PROG.BOR of ORIENTAL, is the same file format, only the name of extension are change ...but still same

i'm very impressed of your work, thank you, you make my day

when i try to open the xls file, i have in each case #NOM except the first cell with the name of preset...it is normal ?
i don't inderstand how it's work

can you explain me ?, if i change some value...the xls write directely into the WD2_PROG.BIN an change inside the value ?

i must put the xls file into the same forlder contain the WD2_PROG.BIN ?
i not need to modify the path of each cell ?

Thank !
MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Post by MidiSaron »

freestok wrote:WD2_PROG.BIN of SILVER
and WD2_PROG.BOR of ORIENTAL, is the same file format, only the name of extension are change ...but still same
D'oh! So that's the difference between .BIN and .BOR! Could have found that out by myself :oops:
Does WD2_PROG.BOR contain all 150 presets of the Oriental?
freestok wrote:when i try to open the xls file, i have in each case #NOM except the first cell with the name of preset...it is normal ?
This should not happen. Which cells on which sheet show #NOM?
Are you using Excel or Open Office Calc or something different? I could upload the file in Open Office format too.
freestok wrote:can you explain me ?, if i change some value...the xls write directely into the WD2_PROG.BIN an change inside the value ?

i must put the xls file into the same forlder contain the WD2_PROG.BIN ?
No, it doesn't work like that. Look at sheet "HexString", there's only one cell that contains something: A1. This very long string (maybe it's not displayed properly because it's so long) represents the whole content of the file PRE_PROG.BIN. I used a hex editor to get the content in this hexadecimal text format and copied from there.
Then look at the sheet "Listing". The values column C all are grabbed from cell A1 on sheet "HexString". There's no read or write to/from any external file done. In column D these values are converted to decimal numbers.
Finally, on sheet "Matrix" these values are just displayed in a nicer way.
Kaden
Junior Member
Posts: 97
Joined: Fri Feb 04, 2011 12:29 am
Location: Vancouver

Post by Kaden »

Rows 3-103/Columns C-BI on the Matrix page show only #NAME in Excel 2007.

Is this expected behaviour?
Make. Write. Play drums
freestok
Junior Member
Posts: 68
Joined: Fri Jul 22, 2011 11:24 pm

Post by freestok »

i talk with a friend about this mistake #NAME

cause micosoft office 2007 have a different coding, and i can't believe that but it's real, microsoft call librairie of code in different despite a langage !

example, a fonction call "square" in english office and you send at your friend...but your friend have office 2007 in french language.....square fonction translate in french...and "square" in french language call "carre"...then the fonction "square" dosen't work properly cause the wrong translation make trouble in code

and yes, the WD2_DATA.BOR file in WAVEDRUM ORIENTAL contain the 150 sounds, it's more haviest rather than WD2_DATA.BIN in SILVER

WD2_DATA.BIN haviest arround 91 MO for SILVER
WD2_DATA.BOR haviest arround 160 MO for ORIENTAL
WD2_DATA.BMN haviest arround 6 MO only for MINI-WAVEDRUM (very small)

BIN ==> Binari file
BOR ==> Binari ORiental
BMN ==> Binari MN (MiNi)
WaterDrum
Senior Member
Posts: 340
Joined: Fri Apr 01, 2011 9:38 am
Location: 3rd Stone from the Sun , Bavaria

Post by WaterDrum »

this file runs with Office2010 and with OpenOffice :lol:
everything is in the matrix
would never have thought that Excel could do hex reading

You are really the Wizard of Excel
especially as you only needed 2 days (?) for that ... 8) 8) 8)
Thank you very very much Midisaron
lets see , how it develops.

@ all : this is especially interesting ,
because you can juggle with the soundbankfiles as you like

PRE_PROG.BIN = Preset bank(Silver)
WD2_PROG.BIN= User bank (Silver)

the PRE_PRG.BIN
can be substituted with another PRG.BIN file
by simply renaming ...:idea:
then the new "Preset"sounds can be played ,
and written to the personal User Soundbank
then again rename back to the original Preset bank
one more reason to get in contact with your local SD Card ? :wink:

@freestok
Open Office takes 500 MB after installation
download in French
http://www.openoffice.org/fr/
MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Post by MidiSaron »

freestok wrote:cause micosoft office 2007 have a different coding, and i can't believe that but it's real, microsoft call librairie of code in different despite a langage !
Just looked around in Excel's help files. Maybe it helps to start "Microsoft Office Tools" (should be present on your computer if M$ Office is installed) and enable german language.
If everything else fails you can rename the german function names with the corresponding french/english ones. Luckily Excel has a search/replace function :)
The function names in different languages can be looked up here for instance:
http://www.piuha.fi/excel-function-name ... glish.html
freestok wrote:and yes, the WD2_DATA.BOR file in WAVEDRUM ORIENTAL contain the 150 sounds, it's more haviest rather than WD2_DATA.BIN in SILVER
So you should be able to display all 150 presets by extending the tables "Listing" and "Matrix" ("Listing" has to be extended because "Matrix" gets its information from there).

Still looking for a convenient way for everybody to convert the binary file into a hex string. I used the hex editor 0xED (simply copy/pasting from there), but this program is Mac-only. Any ideas?
MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Post by MidiSaron »

Yesterday WaterDrum pointed me to an issue some might have when trying to paste the hex version of their WD2_PROG files into my spreadsheet.
When doing a copy/paste from the hex editor I use I get an uninterrupted string of hex digits like this:
000000010036003800640000001D0032 (continues endlessly)
However many hex editors separate bytes by space characters, so it looks like this:
00 00 00 01 00 36 00 38 00 64 00 00 00 1D 00 32
Even if one succeeds at all pasting this into a single spreadsheet cell in a single paste operation, the hex digits are located in the wrong places in the string for my spreadsheet to work properly. One has to remove the space characters. If the whole string (including the blanks) is already in a spreadsheet cell, this can be done with the search/replace function of the spreadsheet program itself, just replace the space character with an empty string. Otherwise one can paste the string into an editor program and remove the blanks there.
WaterDrum
Senior Member
Posts: 340
Joined: Fri Apr 01, 2011 9:38 am
Location: 3rd Stone from the Sun , Bavaria

Post by WaterDrum »

I could not find a hex editor ,
that would make a direct copy/paste of the big hex string
into the Pre_Prog.XLS file .

In the end I used this Hex editor
http://mh-nexus.de/en/hxd/

and copied all the hex stuff into the standard Windows text editor.
Here I could easily delete the space characters.

http://www.speedyshare.com/jpbkM/PRE-prog-bin-hex.txt

this hex material still contains the space characters ...
looks complicated ?
This project is in experimental mode (needs feedback).
MidiSaron
Posts: 21
Joined: Wed Aug 01, 2012 8:15 pm
Location: Dortmund, Germany
Contact:

Post by MidiSaron »

Kaden wrote:Rows 3-103/Columns C-BI on the Matrix page show only #NAME in Excel 2007.
I think I know why Excel behaves like this. To make use of the hexadecimal-to-decimal conversion functions, a "analysis function add-in" or whatever it's called has to be installed. This is not difficult and nothing additional needs to be purchased. Look in the Excel help to find out how it's done.
The function I use is called HEX2DEC in English, HEXINDEZ in German and HEXDEC in French. The help page for this function should lead you to the help page where the install of that analysis thingie is descibed.

Hope this helps. :)
WaterDrum
Senior Member
Posts: 340
Joined: Fri Apr 01, 2011 9:38 am
Location: 3rd Stone from the Sun , Bavaria

Post by WaterDrum »

as far as I have read in the help file of Office 2010
the Analyze function has only to be installed to
Office versions lower than Office 2003 .
plus : I am happy that my German Version is reading this file correctly ...

I am not shure ,
if I could fix these "incompatibilities" so easily

this one more time is a point , where feedback is needed ...

positive and negative
so please ....

nobody reading this stuff ?
nobody has any problems with it ? Lucky
lessbones
Posts: 11
Joined: Tue Mar 27, 2012 2:35 am

Post by lessbones »

wow! this is truly awesome-- thanks guys-- ill be available to test anything you need on my mini
WaterDrum
Senior Member
Posts: 340
Joined: Fri Apr 01, 2011 9:38 am
Location: 3rd Stone from the Sun , Bavaria

Post by WaterDrum »

hi lessbones

thanx for your offer
I am not into writing xls code , only testing and watching.
Midisaron is the expert here...

As far as I can see , the MINI is not really compatible to Silver/Ori
...maybe similar...

-no panorama
-no pressure (p-tune , p-decay , p-curves)
-no Equalizer
-different PCMs
-FX ??

OK
now I have copied the Mini Soundbank ,
(probably it is INST_BMN) to a *txt file ,
from where it can be inserted into Midisarons spreadsheet .
here it is :
http://www.speedyshare.com/s3fAC/INST-BMN-2hex.TXT

This MINI hex stuff can actually be read with "PRE_PROG.XLS" file.
Then I have completely deleted a few vertical columns ,
that you dont find on the MINI.
(Pan , Pressure .... +++ )
I didnt give my best , so it is still worth experimenting...
but... it is not as easy as that...

have a look at and experiment with it,

anyway , if it could be read and you would make some changes
and you could , (maybe -later-),
transfer these changes to the SD card of your MINI ,
it would be kind of "blind experimental editing" and not Live editing .

At the moment it is more important to know
if the spreadsheet can be read correctly ( PC and APPLEMAC ! )
to get infos how to make the file best compatible for everybody
(If somebody is interested at all...? )
sometimes active cooperation is necessary... :wink:
Kaden
Junior Member
Posts: 97
Joined: Fri Feb 04, 2011 12:29 am
Location: Vancouver

Post by Kaden »

I enabled the analysis pack in Excel 2K7. There was no automagical replacement of #NAME with an actual value, so I'm assuming there's some form of user action required to facilitate this.

I know nothing of high level Excel.
Make. Write. Play drums
Post Reply

Return to “Korg Wavedrum”