General Discussion of the Nord Stage (EX), Nord Stage 2 (EX), Nord Stage 3, and Nord Stage 4 Synths, FAQ, Troubleshooting etc.

ns2p file format

Postby varignet » 12 May 2017, 21:44

Hi, has anybody attempted at deciphering the ns2p format?
what I feel is missing in the nord sound manager is the slots status.
this is surely stored in the ns2p file somewhere.
I'm writing a python tool to handle and rename ns2p filee offline ( more news to come ) but i am having difficulties figuring it out.
I'm currently using a hexadecimal binary editor and running some tests and any help to point me in the right direction would be most welcome.

thx
Nord Lead A1, Korg Trinity 76 Pro, Kawai MP7SE, Guitars, Ukes
varignet
 
Posts: 208
Joined: 29 Sep 2016, 23:08
Location: London
Country: Great Britain
Has thanked: 25 times
Been thanked: 9 times
Your Nord Gear #1: Nord Lead A1

ns2p file format


Sponsor
 

Re: ns2p file format

Postby maxpiano » 13 May 2017, 06:25

Nord Sound Manager is a Librarian, not an Editor, apart from the ability to manage Samples associated to a Program; that's why you can't see in it any other Program parameter, including the Slots saved status.

The .ns2p format may be flat or encrypted, an hex editor with a comparison feature is the correct way to attemp to reverse engineer it, by moving 1 parameter at a time. But if encryption and/or validation checksum(s) are in the file this may become a very tough task to accomplish. Good luck...
Last edited by maxpiano on 13 May 2017, 21:51, edited 1 time in total.

The author maxpiano was thanked by:
varignet
User avatar
maxpiano
Patch Creator
 
Posts: 6246
Joined: 27 Jun 2011, 13:29
Location: Italy
Country: Italy
Has thanked: 448 times
Been thanked: 2196 times
Your Nord Gear #1: Nord Stage 3

Re: ns2p file format

Postby varignet » 13 May 2017, 20:12

maxpiano wrote:Nord Sound Manager is a Librarian, not an Editor, apart from the ability to manage Samples associated to a Program; that's why you can't see in it any other Program parameter, including the Slots saved status.

The .ns2p format may be flat or encrypted, an hex editor with a comparison fetaure is the correct way to attemp to reverse engineer it, by moving 1 parameter at a time. But if encryption and/or validation checksum(s) are in the file this may become a very tough task to accomplish. Good luck...


thanks, i think I'm making progress!
Nord Lead A1, Korg Trinity 76 Pro, Kawai MP7SE, Guitars, Ukes
varignet
 
Posts: 208
Joined: 29 Sep 2016, 23:08
Location: London
Country: Great Britain
Has thanked: 25 times
Been thanked: 9 times
Your Nord Gear #1: Nord Lead A1

Re: ns2p file format

Postby Streef » 01 Sep 2017, 09:46

Hi Varignet, any luck with this? I would love to be able to have a ns2p "viewer", so I can reprogram my sounds into the NS3. I should have never traded-in my NS2 before getting the NS3, but I wasn't aware that you loose all patches...:-(((
Nord Stage 2EX, Novation Circuit
Streef
Patch Creator
 
Posts: 76
Joined: 25 Aug 2013, 09:23
Country: Netherlands
Has thanked: 5 times
Been thanked: 32 times
Your Nord Gear #1: Nord Stage 2 EX

Re: ns2p file format

Postby cookie » 20 Sep 2018, 02:45

Also interested to share ideas and where you're at.

I'm trying to find a way to see all programs that are duplicates, meaning not the name but the content of the entire program.
Idea is to extract from a backup file (which is a ZIP file) all the ns2p from the program directory (with sub-directories "Bank A"...) and do some recursive "FC /B file1.ns2p file2.ns2p".
I have 27 bytes different in 2 ns2p files I believe are the same.

I'll make further tests but would be happy to share info if any.

Fred
User avatar
cookie
Patch Creator
 
Posts: 728
Joined: 08 Dec 2011, 17:38
Location: France
Country: France
Has thanked: 136 times
Been thanked: 306 times
Your Nord Gear #1: Nord Stage 2

Re: ns2p file format

Postby Mr_-G- » 20 Sep 2018, 18:47

Hm... the format is not open, so I doubt that you will be able to do this reliably. Even a binary file comparison might have differences if only the patch is named differently.
Or imagine the same patch with a different part volume, or an effect switched on or off, would show a difference.
User avatar
Mr_-G-
Moderator
 
Posts: 4618
Joined: 18 Aug 2012, 16:48
Has thanked: 1476 times
Been thanked: 1257 times
Your Nord Gear #1: Nord Stage 2

Re: ns2p file format

Postby cookie » 21 Sep 2018, 00:00

Mr_-G- wrote:Hm... the format is not open, so I doubt that you will be able to do this reliably. Even a binary file comparison might have differences if only the patch is named differently.
Or imagine the same patch with a different part volume, or an effect switched on or off, would show a difference.


Agreed.
My idea is to have a list of "identical" programs so I can make some cleaning.
Identical means exactly the same program parameters except the location #.

I'm making progress on the binary comparison but still digging.

Fred
User avatar
cookie
Patch Creator
 
Posts: 728
Joined: 08 Dec 2011, 17:38
Location: France
Country: France
Has thanked: 136 times
Been thanked: 306 times
Your Nord Gear #1: Nord Stage 2

Re: ns2p file format

Postby cookie » 21 Sep 2018, 01:09

OK, this turns out to be more simple than expected but hard to explain here.
Let me give it a try and go directly to the conclusion : you can identify 2 .ns2p files that contain the same program by comparing the binary files together.

I'm working now on the backup file which is a ZIP file and extracted the Program directory with the 4 sub directories (Bank A, Bank B...).
All files are 547 bytes.

I found out that the bank location of the program is located at position 000C.
A is coded 00, B is 01, C is 02 and D is 03

Page and Program locations are at position 000E. Remember always hexadecimal.
Let me show you an example if you want to get the Page and Program numbers (in decimal) from the value (in hexadecimal) found at 000E.
Say we have "3F" in 000E : 3F is 63 in decimal (=HEX2DEC in Excel)

Remember we had the formula to get the Program change from the Page and Program # : PCC = (PAGE-1)*5+(Program-1)
Back to our 63 decimal, some reverse math and we have :

Page = Quotient (63/5)+1 = 12+1 = 13
Program # = 63-(Page-1)*5+1 = 63-(13-1)*5+1=63-60+1=4

For identical sounds, there are also 2 different values in the 2 last positions at 0221 and 0222.
I believe this must be some CRC as there is no consistancy.

Therefore, I can now run a comparison binary program on all the ns2p files and identify those who have differences ONLY on those 4 positions, all others are different.
This is my first step : to clean identical programs in different bank/page/program.

Next step is to work on the comparison that shows few differences, say 1 byte more.
For info, I Identified while making tests that the leslie slow/fast is located at position 002C with hex values : 56=fast and 54=slow.

Hope that helps,

Fred

The author cookie was thanked by 2 members, including:
animauxPScooter63
User avatar
cookie
Patch Creator
 
Posts: 728
Joined: 08 Dec 2011, 17:38
Location: France
Country: France
Has thanked: 136 times
Been thanked: 306 times
Your Nord Gear #1: Nord Stage 2

Re: ns2p file format

Postby RichardG » 21 Sep 2018, 10:42

Mr_-G- wrote:Hm... the format is not open, so I doubt that you will be able to do this reliably. Even a binary file comparison might have differences if only the patch is named differently.
Or imagine the same patch with a different part volume, or an effect switched on or off, would show a difference.


I disagree.
I know it has been done for the DX-line of synths which has a propriety format as well.
It takes *a lot* of effort but if it's done by a human another human can figure it out (we're not talking about something like DNA ;) ).

And if the formats are known you can build anything you want as Clavia won't change the layout and if it does you can simply compare the "before" and "after" results and amend your software.
There's bound to be a versioning or something in the patches or Clavia wouldn't be able to run conversions themselves (as happens sometimes between OS-releases).

You could build alternative librarians or filter out duplicates or even a generator that randomly assigns values to the synth part as a starting point for a new sound.

I know that for the DX7 there are tons of patches around so to filter out exact duplicates (regardless of name) is a big help, or group alike sounds based on certain parameters.
We're probably nowhere near that with the Nord sound-libraries right now but you'll never know.
The following statement is not true. The previous statement is true.
User avatar
RichardG
 
Posts: 211
Joined: 28 Jul 2017, 08:57
Country: Netherlands
Has thanked: 50 times
Been thanked: 75 times
Your Nord Gear #1: Nord Stage 4

Re: ns2p file format

Postby RichardG » 21 Sep 2018, 10:52

cookie wrote:OK, this turns out to be more simple than expected but hard to explain here.

I think you're doing quite well :)
But then again I used to be a programmer.

cookie wrote:I believe this must be some CRC as there is no consistancy.

As I said in my comment to Mr -G- that's what they did in the DX7 and the simplist way to determine if the data is valid at all.
Probably a CRC32 or something

cookie wrote:For info, I Identified while making tests that the leslie slow/fast is located at position 002C with hex values : 56=fast and 54=slow.

There is a chance that certain parameters are bit-mapped instead of a complete byte if they only have an on/off situation.
or that part of a byte is used for a limited range (so 0,1,2,3 would be 00,01,10,11 in binary).
But you probably know this :D
The following statement is not true. The previous statement is true.

The author RichardG was thanked by:
PScooter63
User avatar
RichardG
 
Posts: 211
Joined: 28 Jul 2017, 08:57
Country: Netherlands
Has thanked: 50 times
Been thanked: 75 times
Your Nord Gear #1: Nord Stage 4

Next

Return to Nord Stage Forum



Who is online

Users browsing this forum: No registered users and 9 guests