Skip to main content
Topic: Possible additions to nwc2clips.inc (Read 10630 times) previous topic - next topic

Possible additions to nwc2clips.inc

To my knowledge, nobody has written a set of PHP include files to help with processing entire NWCTXT files, similar to the set that does exist to help with processing "clips" (the User Tools suite).  Perhaps instead of writing a new suite, the existing one can become a superset for both?  I haven't worked out all the details yet for other files, but I thought I'd throw out these possible additions to just nwc2clips.inc, to start a discussion.

In function NWC2ClassifyOptTag, before the final return:
Code: [Select · Download]
if ($ObjType == "SongInfo") return NWC2OPT_TEXT;
if (($ObjType == "Font") && ($Tag == "Typeface")) return NWC2OPT_TEXT;
if (($ObjType == "AddStaff") && ($Tag == "Group")) return NWC2OPT_TEXT;
I expect there are other song/staff option tags that are possibly needed here too.

Global constants, alongside the comparable "clip" constants:
Code: [Select · Download]
define("NWC2_STARTSONG","!NoteWorthyComposer");
define("NWC2_ENDSONG","!NoteWorthyComposer-End");

Re: Possible additions to nwc2clips.inc

Reply #1
I'm glad to see someone has an interest in this area.

I would be more inclined to agree with you if a User Tool could receive nwctxt on STDIN, and NWC2 would process nwctxt if the tool wrote it to STDOUT. As it is now, User Tools and nwctxt processors are separate entities. This would argue for separate libraries. Most of my code is in VBScript, so I don't feel strongly one way or the other.
Registered user since 1996

 

Re: Possible additions to nwc2clips.inc

Reply #2
The official support for this is currently pending an official way for licensed users to automatically process a *.nwc file as text, and then restore it to the binary *.nwc file (via scripting). I will see what we can do to facilitate this here in the forum pending the general release.