Re: [linux-audio-dev] Re: Nord Modular instrument converter

From: Simon Jenkins <sjenkins@email-addr-hidden>
Date: Sat Apr 30 2005 - 18:01:45 EEST

On Fri, 2005-04-29 at 16:30 +0300, Juhana Sadeharju wrote:
> >From: Simon Jenkins <sjenkins@email-addr-hidden>
> >
> >2. Is C++ OK? (You'd end up with a Patch class that could be
> >over-ridden to dump itself in whatever format was required).
>
> C++ is ok, and would make sense because the nmedit code is C++.
>
> For each module, the nmedit has a parameter etc. descriptions.
> If I understand correctly, we don't need them because we write
> our modules as an exact clones (inputs, outputs, parameters at
> least). But if the nmedit code already loads all the information,
> please keep it that way. The info could be useful.
>

I was assuming you wanted something light-weight that just
loads in a patch and let you inspect everything in it? So
I've modified the nmedit lex & yacc files to parse a patch
into a very simple CPatch class (ie not using the nmedit
classes at all) which you can interrogate.

Here's what I've got so far. It doesn't parse the user-defined
module names yet, nor the text notes that can be attached to a
patch, but everything else is pretty much done.

http://www.sjenkins.pwp.blueyonder.co.uk/audiodev/nmp_0_0_1.tar.gz

Unpack it, then...

>cd nmp_0_0_1
>make
>./nmp <patchname>

and it prints out a description of the patch.

The patch is parsed into a CPatch class, then DescribePatch()
interrogates the patch and describes whats there.

To use this in a patch converter, you could either write a
ConvertPatch() function to interrogate CPatch and generate
the converted format, or you could modify or derive a class
from CPatch which generates the converted file "on-the-fly"
as the parser finds the blocks in the file.

I can't do any more on this for a week or so, hence the
incomplete release now. Enjoy.

Simon
Received on Sat Apr 30 20:15:13 2005

This archive was generated by hypermail 2.1.8 : Sat Apr 30 2005 - 20:15:14 EEST