Author |
Message |
Dewb

Joined: Apr 07, 2004 Posts: 9 Location: Boston, MA
G2 patch files: 1
|
Posted: Fri Apr 29, 2005 11:35 am Post subject:
G2 patch format deciphered |
 |
|
I'm happy to report that I've been able to reverse engineer most of the G2 .pch2 file format.
I've put a draft format spec at http://www.dewb.org/g2/pch2format.html . If the technically minded could take a look and give me clarity/readability comments I'd appreciate it.
There are some parts of the patch that I haven't figured out yet. Some I have a pretty good idea on, others I'm still in the dark. Also, each module has its own indexes for parameters, inputs, and outputs. It's not hard to document this information, but so far I've only had time to do the In/Out and Osc groups. The rest will come soon.
The original analysis was done on 1.22/1.24. I haven't checked 1.3x for changes, but I don't think it will be hard to make any necessary updates.
The inevitable follow up question is: what about a parser? Right now, I do have a super-ugly debugging parser that reads and dumps .pch2 files. I plan to write a more usable read/write parser suitable for embedding in other programs. First, though, I wanted to see what technology choices would best serve people who would like to write applications based on the parser. I'm leaning towards a straight C library but C++, Java, and Perl are also on the table.
The most obvious application is an NM1->G2 patch converter. I'd love to see one of these, however imperfect, but I don't have an NM1. I vaguely remember some discussion on the list a while back about the idea of converting both formats to and from an intermediate XML-based description language, as a way of performing the conversion. I think that's a great idea and I'm happy to work on the G2 side of that effort.
Thanks to everybody here and on the mailing list for all the patching education over the last couple years; I hope I can deliver a small bit of usefulness in return. |
|
Back to top
|
|
 |
jksuperstar

Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Fri Apr 29, 2005 12:06 pm Post subject:
|
 |
|
Wow! Great Work....Now we can see if some of those "hidden modules" are available!
And, we can get some of those Nord Moduler (1) tools I miss, like raw2pch.
* <- 1 gold star for you! |
|
Back to top
|
|
 |
inversekinematics
Joined: Feb 12, 2005 Posts: 29 Location: Sweden
G2 patch files: 1
|
Posted: Fri Apr 29, 2005 2:00 pm Post subject:
Re: G2 patch format deciphered |
 |
|
Dewb wrote: | I'm happy to report that I've been able to reverse engineer most of the G2 .pch2 file format.
I've put a draft format spec at http://www.dewb.org/g2/pch2format.html. If the technically minded could take a look and give me clarity/readability comments I'd appreciate it.
There are some parts of the patch that I haven't figured out yet. Some I have a pretty good idea on, others I'm still in the dark. Also, each module has its own indexes for parameters, inputs, and outputs. It's not hard to document this information, but so far I've only had time to do the In/Out and Osc groups. The rest will come soon.
The original analysis was done on 1.22/1.24. I haven't checked 1.3x for changes, but I don't think it will be hard to make any necessary updates.
The inevitable follow up question is: what about a parser? Right now, I do have a super-ugly debugging parser that reads and dumps .pch2 files. I plan to write a more usable read/write parser suitable for embedding in other programs. First, though, I wanted to see what technology choices would best serve people who would like to write applications based on the parser. I'm leaning towards a straight C library but C++, Java, and Perl are also on the table.
The most obvious application is an NM1->G2 patch converter. I'd love to see one of these, however imperfect, but I don't have an NM1. I vaguely remember some discussion on the list a while back about the idea of converting both formats to and from an intermediate XML-based description language, as a way of performing the conversion. I think that's a great idea and I'm happy to work on the G2 side of that effort.
Thanks to everybody here and on the mailing list for all the patching education over the last couple years; I hope I can deliver a small bit of usefulness in return. |
Impressive research there... now see if we could get some cool stuff to work in some way that it shouldn't  _________________ (dx/dt=delta*(y-x))(dy/dt=r*x-y-x*z)(dz/dt=x*y-b*z) |
|
Back to top
|
|
 |
King Rat
Joined: Mar 11, 2005 Posts: 98 Location: London
Audio files: 5
G2 patch files: 13
|
Posted: Fri Apr 29, 2005 6:24 pm Post subject:
|
 |
|
Eh? |
|
Back to top
|
|
 |
LLR3
Joined: Sep 10, 2004 Posts: 41 Location: Helsinki Finland
|
Posted: Sat Apr 30, 2005 7:15 am Post subject:
|
 |
|
Excellent work!
Now how about a DX7 patch converter? Anyone?
*LLR3 |
|
Back to top
|
|
 |
Hyde

Joined: Jul 15, 2004 Posts: 118
G2 patch files: 2
|
Posted: Sun May 01, 2005 2:10 am Post subject:
|
 |
|
Dewb - KEEP UP THE GOOD WORK!!!
A converter would be a godsend. Using things in ways they aren't meant to be is something us glitchcore guys would love to see happen.
I have a question though: is it in any way possible for 'us' - the general public - to create our own modules? And upload them to the synth or Editor? That would be SO SICK  |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Sun May 01, 2005 3:03 am Post subject:
Re: G2 patch format deciphered |
 |
|
excellent work!!!
Dewb wrote: | I'm leaning towards a straight C library |
That would be nice.
Any thoughts on the checksum? That would seem the biggest remaining hurdle. |
|
Back to top
|
|
 |
Dewb

Joined: Apr 07, 2004 Posts: 9 Location: Boston, MA
G2 patch files: 1
|
Posted: Tue May 03, 2005 9:15 am Post subject:
|
 |
|
Thanks for the comments everyone.
All this enables is alternative ways of creating patches. Creating new modules would require writing DSP code to insert into the G2 OS package... that's a whole 'nother can of worms. Similarly, I doubt the "hidden" modules are actually available for use; the resources might be in the editor, but the code might not be in the G2.
A DX7 patch loader would be a nice test case for the parser API. Does anyone know of a site giving a good description of the DX7 .syx format?
No thoughts on the checksum yet. Still trying to fill in the unknown holes in the patch data. I've gotten a few, but one is giving me trouble. |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Tue May 03, 2005 9:42 am Post subject:
|
 |
|
A DX7 convertor would be a fantastic application for this. If the spec is unavailable, I have it in print form here, and can get it to anyone who needs it (will have to bum a scanner, but that should be possible). |
|
Back to top
|
|
 |
mosc
Site Admin

Joined: Jan 31, 2003 Posts: 18235 Location: Durham, NC
Audio files: 222
G2 patch files: 60
|
Posted: Tue May 03, 2005 12:19 pm Post subject:
|
 |
|
Dewb, you are to be commended for doing this difficult work, Congrats on the breakthrough. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
 |
sebber

Joined: Aug 27, 2004 Posts: 501 Location: Berlin
Audio files: 3
G2 patch files: 33
|
Posted: Wed May 04, 2005 8:15 am Post subject:
|
 |
|
I think this is just great.
If we would have a 80%-working patch-converter I'd have so much fun listening to imperfect patches which is what
a) I unintendedly do all the time
b) I like to hear most, because I like to imperfect perfect things. (they become so much more human then).
Great work. BTW, if you don't know it already, there's a pretty imperfect comparison chart for NM/G2-modules here:
http://www.sebastianberweck.de/G2/MRT.htm, maybe it's useful for a first converter. |
|
Back to top
|
|
 |
nescivi

Joined: Mar 23, 2005 Posts: 94 Location: Montreal
|
Posted: Thu May 05, 2005 2:27 pm Post subject:
|
 |
|
Hi,
for what it's worth..
at the moment there is a discussion going on at the Linux Audio Developers list about a NM to PD (or something else) patch convertor.
I forwarded them the link about the G2 specs and to this discussion... as it seems you're both aiming at a similar thing.
For the archive of the LAD emaillist:
http://lalists.stanford.edu/lad/2005/04/
thread is called "Nord Modular instrument converter" |
|
Back to top
|
|
 |
cappy2112

Joined: Dec 24, 2004 Posts: 2490 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Fri May 06, 2005 11:46 am Post subject:
|
 |
|
nescivi wrote: | Hi,
for what it's worth..
at the moment there is a discussion going on at the Linux Audio Developers list about a NM to PD (or something else) patch convertor.
I forwarded them the link about the G2 specs and to this discussion... as it seems you're both aiming at a similar thing.
For the archive of the LAD emaillist:
http://lalists.stanford.edu/lad/2005/04/
thread is called "Nord Modular instrument converter" |
Are you sure you got that URL correct? |
|
Back to top
|
|
 |
diskonext

Joined: Aug 26, 2004 Posts: 306 Location: London, UK
|
Posted: Fri May 06, 2005 1:18 pm Post subject:
|
 |
|
Great stuff!
Another application would be for use at the EM forum... you could make an automatic .pch2 to .jpeg convertor, for all of the non-G2 owners, and other interested folks... no need to take screenshots, just post the patch and have a picture inserted, automatically!
-diskonext _________________ :wq |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Sun May 08, 2005 12:48 pm Post subject:
|
 |
|
Wow, a nice surprise after coming home from a short holiday !
There are still some details to do of course, but this seems a good framework to start from.
BTW, I edited the link in the original post to be clickable.
Jan. |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Sat May 21, 2005 4:26 pm Post subject:
|
 |
|
Right, I had completely missed the module list on my first visit to the site ... a link on top of both pages would be helpfull for dumbo's like me :-)
What tooling do you use to decipher the (module) details - seems lke you could use some help. I've been doing about the same job some years ago for the NM Classic and this took ages to complete eventhough I did get good help from others.
After the EM event I'll have some time probably to sort out a couple of modules, or some of the unknown details.
At http://www.iaf.nl/Users/BlueHell/html/nm-open/nm-open-g2info.htm I have a little bit of extra info about how patches and MIDI dumps are related to each other. This is old info from before I myself had a G2, but apart from the version numbers it should still be OK I think.
Jan. |
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Jul 25, 2005 1:06 pm Post subject:
|
 |
|
Did this ever go any further, has the checksum been worked out yet?
Is there a similar document for the original NM format?
I would be interested on working on a converter.
Cheers
Andy |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Jul 25, 2005 2:17 pm Post subject:
|
 |
|
Hi Jan,
Thanks for the info.
Andy |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Mon Jul 25, 2005 3:19 pm Post subject:
|
 |
|
You're welcome Andy, I'm sure you'll have a good time with your G2 !
Jan. |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Fri Mar 17, 2006 3:49 pm Post subject:
|
 |
|
Hey all;
I have a quick well-deserved break from work so I thought I'd play with the G2 patch format stuff.
The last two bytes are definitely a checksum; change them and the file won't load.
Does anyone have any ideas on the checksum algorithm? I've been monkeying with it but no luck so far. |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Fri Mar 17, 2006 4:21 pm Post subject:
|
 |
|
jamos wrote: | I've been monkeying with it but no luck so far. |
From what I've seen on checksums for the NM protocol and for the MIDI dumps for the G2 the checksums were all pretty lame, just a sum or an XOR modulo 0x80. Here however we have two bytes, that's new .... still my first gues would be a sum of some sort, not a CRC (given history).
What did you try sofar ?
I'll start making a litlle checksum checker tool right away :) _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Fri Mar 17, 2006 4:28 pm Post subject:
|
 |
|
Blue Hell wrote: | What did you try sofar ? |
Up to now just a sum over all bytes in the entire file (less the checksum of course) and a sum over everything other than the header. Plus a CRC 16 using an algorithm I found online (and which may be faulty). I'll play with it a bit more tonight (have to work on taxes now, ugh) |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Fri Mar 17, 2006 5:21 pm Post subject:
|
 |
|
Do you know which polynomial the CRC used and what start value for the CRC did you try ?
Common 16 bit CRC's :
CRC-16 (IBM) (polynomial : $a001 :: x^16 + x^15 + x^2 + x^0)
CRC-CCITT-16 (polynomial : $8408 :: x^16 + x^12 + x^5 + x^0)
Common start values are 0 or 0xffff.
I've got a "known to be good" Delphi implementation for those two.
A good read-up is : http://en.wikipedia.org/wiki/Cyclic_redundancy_check _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
|
Back to top
|
|
 |
|