NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: NoteWorthy Online on 2007-07-25 08:17 pm

Title: Working with *.nwctxt files
Post by: NoteWorthy Online on 2007-07-25 08:17 pm
NoteWorthy Composer uses a text language to represent the notation. When saved to file, the uncompressed text will typically use the *.nwctxt file type. When you work with text files, you can use Save As or Export from the NWC File menu to switch to or create the *.nwctxt version. As of version 2.75, these files always use utf-8 character encoding.

You can load a *.nwctxt file into a text editor in order to get an idea of how items are represented. The actual notation objects use the same representation as is available from Edit, Copy while working in the editor. The Developer Tools included with the  user tool starter kit (https://noteworthycomposer.com/nwc2/usertools/) are also useful during the discovery process.

A sample file is shown below.

Code: [Select · Download]
# This is a sample NWC Text file. As you can see, any text starting with 
# a '#' character is treated as a comment.
#
# When accepting nwctxt in a File mode user tool, a comment header will
# include some details about the current editor file. For example:
#
#/File: D:\nwctest.nwctxt
#/SavePending: N
#/ReturnFormat: FileText
#
# ------------------------------------------------------------------------------
# This first non-comment line of the file should be the !NoteWorthyComposer
# header line. This indicates that this file contains NoteWorthy Composer Text.
# This sample targets version 2.75.
#
!NoteWorthyComposer(2.75)

# Blank lines can appear anywhere in the file after the
# initial !NoteWorthyComposer header

# ------------------------------------------------------------------------------
# The Editor line indicates the currently active staff and selection positions
|Editor|ActiveStaff:1|CaretIndex:1|SelectIndex:59|CaretPos:0

# ------------------------------------------------------------------------------
# The SongInfo, PgSetup, PgMargins, and Font lines can appear anywhere in
# the file, but it is good form to have them at the top, prior to adding
# any staff data.

# It is fine to use multiple SongInfo, PgSetup, and PgMargins in a file.
# If a field is specified more than once, the last one overrides any
# previous assignment.
|SongInfo|Title:"<FileTitle>"|Author:"<Author>"|Lyricist:"<Lyricist>"
|SongInfo|Copyright1:"<Copyright1>"
|SongInfo||Copyright2:"<Copyright2>"
|SongInfo|Comments:"<Comments>"

|PgSetup|StaffSize:16|NtnTypeface:NWC2SwingDings|Zoom:4
|PgSetup|TitlePage:Y|JustifyVertically:Y|ExtendLastSystem:Y
|PgSetup|DurationPadding:Y|PageNumbers:3|StaffLabels:First System
|PgSetup|BarNumbers:Circled|StartingBar:20|AllowLayering:Y

# Margins are specified in Centimeters. You can convert to
# inches by dividing these values by 2.54.
|PgMargins|Left:1.27|Top:1.27|Right:1.27|Bottom:1.27
|PgMargins|Mirror:Y

# Unlike the other top level instructions, each Font instruction should
# be defined on a single line. Each Font instruction must include the
# Style option, which identifies which named font is being defined on
# the line. The Size is in points. The CharSet comes from Script field
# in the Font dialog.
|Font|Style:StaffItalic|Typeface:"Times New Roman"|Size:12|Bold:Y|Italic:Y|CharSet:0
|Font|Style:StaffBold|Typeface:"Times New Roman"|Size:9|Bold:Y|Italic:N|CharSet:0
|Font|Style:StaffLyric|Typeface:"Times New Roman"|Size:9|Bold:N|Italic:N|CharSet:0
|Font|Style:PageTitleText|Typeface:"Times New Roman"|Size:24|Bold:Y|Italic:N|CharSet:0
|Font|Style:PageText|Typeface:"Times New Roman"|Size:12|Bold:N|Italic:N|CharSet:0
|Font|Style:PageSmallText|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0

# If a particular User font is not used in the file, then it might
# not appear in the file.  When scanning an existing nwctxt file,
# you cannot assume that any particular fields or instructions
# will exist in the file.
|Font|Style:User1|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User2|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User3|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User4|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User5|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User6|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0

# ------------------------------------------------------------------------------
# The first AddStaff line is optional, although it is required if you want to name,
# label, or group a staff
|AddStaff|Name:"<Staff1Name>"|Label:"<StaffLabel>"|Group:"Vocal"

# The various StaffProperties can be assigned using multiple instances of
# the instruction.
|StaffProperties|EndingBar:Section Close|Visible:Y
|StaffProperties|BoundaryTop:16|BoundaryBottom:14
|StaffProperties|Lines:5|WithNextStaff:Brace,ConnectBars|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1

# The StaffInstrument uses the same syntax as the Instrument instruction
# used in NWC clip text
|StaffInstrument|Name:"Lead 6 (voice)"|Patch:85|Trans:0|DynVel:10,30,45,60,75,92,108,127

# Lyrics can be defined anywhere after the AddStaff line, but it is good form
# to place them before the notation for the staff
|Lyrics|Placement:Bottom|Align:Standard Rules|Offset:0|UnderscoreAsSpace:N
|Lyric1|Text:"Aaaaaaaah________\r\n"

# The notation contained in the staff uses the same format as NWC Clip
# Text from the User Tool and clipboard mechanisms
|Clef|Type:Treble
|Note|Dur:Whole|Pos:1^
|Bar
|TempoVariance|Style:Fermata|Pause:0|Pos:9
|Note|Dur:Whole|Pos:1

# ------------------------------------------------------------------------------
# Whenever an AddStaff is encountered, a new staff is created. The new
# staff then becomes the target for the instructions that follow it, until
# another AddStaff is encountered.
|AddStaff|Name:"<Staff2Name>"|Label:"<PianoStaffLabel>"|Group:"Piano"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:10|BoundaryBottom:18|Lines:5|Style:Upper Grand Staff|Layer:N|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|Lyrics|Placement:Bottom|Align:Start of Accidental/Note|Offset:2
|Lyric1|Text:"1_1 1_2 1_3 1_4\r\n1_5 1_6 1_7 1_8\r\n"
|Lyric2|Text:"2_1 2_2 2_3 2_4\r\n2_5 2_6 2_7 2_8\r\n"
|Clef|Type:Treble
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
|Bar
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Note|Dur:4th|Pos:2
|TempoVariance|Style:Fermata|Pause:5|Pos:9
|Chord|Dur:4th|Pos:1,3,5

# ------------------------------------------------------------------------------
|AddStaff|Name:"<Staff3Name>"|Group:"Piano"
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:15|BoundaryBottom:14|Lines:5|Style:Lower Grand Staff|Layer:N|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:1
|StaffInstrument|Trans:0|DynVel:10,30,45,60,75,92,108,127
|Lyrics|Placement:Top|Align:Standard Rules|Offset:-2|UnderscoreAsSpace:N
|Lyric1|Text:"1_1 1_2 1_3 1_4\r\n1_5 1_6 1_7 1_8\r\n"
|Lyric2|Text:"2_1 2_2 2_3 2_4\r\n2_5 2_6 2_7 2_8\r\n"
|Clef|Type:Bass
|Note|Dur:4th|Pos:-1
|Note|Dur:4th|Pos:0
|Note|Dur:4th|Pos:1
|Note|Dur:4th|Pos:2
|Bar
|Note|Dur:4th|Pos:3
|Note|Dur:4th|Pos:4
|Note|Dur:4th|Pos:5
|TempoVariance|Style:Fermata|Pause:0|Pos:-7
|Note|Dur:4th|Pos:6
!NoteWorthyComposer-End

Note: As of version 2.75, all *.nwc files include nwctxt for all notation. An example of how to extract the nwctxt can be seen in this nwc2musicxml update (https://github.com/nwsw/nwc2musicxml/commit/283e520d1f5903fefbc7350a09879f7a08ea548c).

See also:

Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-07-25 08:31 pm
Works for me on Win98SE. Might be a day or so until I boot XP. Will report then.

Works on XP Home Edition.
Title: Re: Working with *.nwctxt files
Post by: Keith Mckenna on 2007-07-25 08:48 pm
Worked fine for me with the tablet pc version of XP Professional.

Keith
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-07-26 06:34 pm
File Import dialog box should default to: All Import Types

Comments are a nice addition, but the length of |SongInfo and |Lyricn make editing them a problem.
I would suggest that all whitespace be ingnored within braces so that your example might be written as:
Code: [Select · Download]
|SongInfo {
  |Title: "<FileTitle>"
  |Author:"<Author>"
  |Lyricist:"<Lyricist>"
  |Copyright1:"<Copyright1>"
  |Copyright2:"<Copyright2>"
  |Comments:"<Comments>"
}
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2007-07-27 12:14 pm
We will look at improving the Import/Export file type defaults, perhaps by remembering what a user selects.

I do not expect the text format to change to support bracketed enclosures and such.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-07-27 03:18 pm
I suspect you have given this some thought, as I have. Storing the fiiletype preference in the registry will solve the problem, but defaulting to all supported types will hardly cause an overload in the Open control. The MIDI and NWCTXT icons are different and I doubt than anyone will have very many NWCTXT files in any folder and further doubt whether anyone will mix the types in the same folder.

Long lines in NWCTXT will pretty much nix any use in the newsgroup except as attachments.
I don't know if this will be a problem since I have yet to figure out a use for the format. There is very little discussion of it here or in the newsgroup.
Title: Re: Working with *.nwctxt files
Post by: Richard Woodroffe on 2007-07-27 06:43 pm
I don't know if this will be a problem since I have yet to figure out a use for the format.

Well Rick,  I think you of all people will possibly find more uses than many of the rest of us.  You have found some really useful ideas using the straight forward text clips - (Hidden rests for example)

However,  since Eric first introduced this format some considerable time ago, I had a sneaking suspicion where it might be leading.
Then, because there had been no apparent change or development with the text fuctionality - I sort of did a wobbly on the idea - but with this improvement, I'm back to my original thoughts.

I think Eric might be developing a system that can eventually be used (perhaps with an additional program) to export and import mxml directly.
Since there will also be other uses for an inbuilt text language other than mxml, it makes sense to develop NoteWorthy's own text language and then use a conversion program. This will allow Eric to maintain control of what and how mxml is converted, and also to put in text functions that are not supported in mxml but might be one day, and so on.  This will also lay the groundwork for when ( /if ) xml replace html as the chosen internet language.

Just my penny worth (2 cents )

Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-07-27 07:28 pm
I had a sneaking suspicion where it might be leading.
No reason for suspicion. In early June, NWC had this to say about it in the newsgroup:
Quote
The new *.nwctxt format will eventually be able to fully export/import NWC
notation. It will make it possible to escape from the proprietary NWC binary
file type when the situation demands it.
Consult the newsgroup for reactions.
Title: Re: Working with *.nwctxt files
Post by: CDon on 2007-07-28 06:04 pm
I don't know if this will be a problem since I have yet to figure out a use for the format.

Hummmm... I have started looking at Perl to convert ABC notation to NWC.  I know of Brian Creer's ABC2NWC, but I don't particularly care for its output.  I suspect nwctxt will have a lot of applications.
Title: Re: Working with *.nwctxt files
Post by: Rob den Heijer on 2007-07-28 07:48 pm
Hmmm... All I am getting is this:
"This package requires a properly installed copy of Noteworthy Composer 2. Noteworthy Composer 2 is either not installed, or has been altered since its installation.
Setup aborted."
Any ideas?
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2007-07-28 08:00 pm
If you modify your installed copy of NWC2 after installation, you will get this message.

The main NWC2 installer creates an uninstall key that points to your working copy of NWC2. If you move the program files, or delete the uninstall data from the registry, then you will not be able to run updates or supporting setup programs.
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2007-07-28 08:02 pm
See also:

Latest update to NWC2
https://forum.noteworthycomposer.com/?topic=5942
Title: Re: Working with *.nwctxt files
Post by: kahman on 2007-07-31 01:16 am
As a programmer, I must say:
THANK YOU!
This makes me feel much better about NWC, now that it has adopted a format that can be easily reverse-engineered.
(Not that I wouldn't mind if NWC posted the complete specs.)  :-)
I've already written a little parser in python, it's in the User Tools section.
Title: Re: Working with *.nwctxt files
Post by: bidderxyzzy on 2007-08-27 04:43 am
My use for this would be to import SharpEye native format (.mro) files into NoteWorthy.  Passing them through MIDI format just looses to much, especially the correct enharmonic spelling of notes.  Now if NoteWorthy could just get that right... 

Doing this via an external text to text translator could be possible, but only if .nwc format is fully documented, as .mro format has been for a long time.  Or even better it could be added as an input format that NoteWorthy understands directly.
Title: Re: Working with *.nwctxt files
Post by: Lawrie Pardy on 2007-08-27 05:17 am
My use for this would be to import SharpEye native format (.mro) files into NoteWorthy.  Passing them through MIDI format just looses to much, especially the correct enharmonic spelling of notes.  Now if NoteWorthy could just get that right... 

Doing this via an external text to text translator could be possible, but only if .nwc format is fully documented, as .mro format has been for a long time.  Or even better it could be added as an input format that NoteWorthy understands directly.

There is a MusicXML import tool available for NWC2 (discussed and linked to here: https://forum.noteworthycomposer.com/?topic=4576.msg34732#msg34732 ).  I believe the tool is updated somewhat from what is discussed in the thread, but the link takes you to the latest version.

Whenever I use Sharpeye I export to mxml and import with this tool - works pretty well but ya gotta get the Sharpeye version fairly accurate before export or you end up creating quite a bit of work for yourself.  No need for a MIDI intermediate step and no enharmonic problems :)

It has already been stated somewhere... (on this forum I think - craft disease kickin' in) that the NWC file specification will not be published however with this (mxml2nwc) and *.nwctxt files it isn't really necessary.

However, I do agree that some additional internal import/export would be welcome.
Title: Re: Working with *.nwctxt files
Post by: David Palmquist on 2007-08-27 06:46 am
My experience with Sharpeye is similar to Lawrie's.  I prefer to import the less than perfect MRO file using mxml2nwcc.exe, then edit it in NWC2.  Editing in Sharpeye is so-o-o  t-e-d-i-o-u-s. 

The imported file sometimes has artifacts that NWC2 senses but doesn't display.  That's a nuisance until you know what to look for.

Title: Re: Working with *.nwctxt files
Post by: bidderxyzzy on 2007-09-11 09:34 pm
I have looked at the mxml2nwcc program and do not find it useful.  Breaking things into a separate text file for each stave, which doesn't get accurately entered into NoteWorthy anyway just doesn't hack it.

I find it interesting, though, that you (David) find editing in Sharp Eye slow.  Clicking on a note head in a chord and then being able to change it's attributes with one more click is certainly faster than having to delete the note, setup all it's attributes (not just the one you want to change) and reentering it.  In fact, you can merrily click away on all the notes in a system that should have a certain attribute and with one more click set them all simultaneously regardless of what the previous attributes were, a relief from having to separately select only the quarter notes (say) that should be eights, and then... as if the durations are mixed, the set duration buttons in NoteWorthy become inoperative.  To add a missing note, just point to that note in the image and click, far easier than maneuvering the cursor to a staff position and hitting enter.  In fact, I would like to see the NoteWorthy interface changed to more resemble Sharp Eye's, especially in handling of notes in a chord. 

The bottom line is that I always go to a perfect score in Sharp Eye before converting to NoteWorthy, because it's so much easier to edit in Sharp Eye.  I even go back, when I find a mistake I missed, to correct the Sharp Eye, a habit I acquired generating artwork for etching circuit boards, where keeping the wire lists and graphics in sync is crucial.  And enharmonics wouldn't be a problem if only NoteWorthy could spell.
Title: Re: Working with *.nwctxt files
Post by: Lawrie Pardy on 2007-09-11 11:26 pm
I have looked at the mxml2nwcc program and do not find it useful.  Breaking things into a separate text file for each stave, which doesn't get accurately entered into NoteWorthy anyway just doesn't hack it.

Huh? - what separate file for each staff??? *Oh, that's right, this is an nwctxt discussion - that's one staff at a time, but mxml2nwcc isn't single staff!

*<edit> Actually, the "strike through" part is incorrect...  mea culpa

Quote
I find it interesting, though, that you (David) find editing in Sharp Eye slow.  Clicking on a note head in a chord and then being able to change it's attributes with one more click is certainly faster than having to delete the note, setup all it's attributes (not just the one you want to change) and reentering it.  In fact, you can merrily click away on all the notes in a system that should have a certain attribute and with one more click set them all simultaneously regardless of what the previous attributes were, a relief from having to separately select only the quarter notes (say) that should be eights, and then... as if the durations are mixed, the set duration buttons in NoteWorthy become inoperative.  To add a missing note, just point to that note in the image and click, far easier than maneuvering the cursor to a staff position and hitting enter.  In fact, I would like to see the NoteWorthy interface changed to more resemble Sharp Eye's, especially in handling of notes in a chord. 

Umm, change the attribute of a note - highlight and press appropriate key - no delete and resetup...  E.G Bb with accent and fermata needs to be Bnat - Highlight note and press '7' - note is Bnat and all other attributes are unchanged...

I almost don't use a mouse in NWC - far too slow - lose the mouse and use the keyboard - much better.  That said, I would LOVE to be able to select multiple, non consecutive notes.  That is one thing missing that I would like to have.  Of course, I can easily get around it with the Global_Mod user tool...

bidderxyzzy, please tell me you don't really use the mouse for most of your NWC work!  If you do then I advise a short learning curve - learn the keyboard shortcuts - the main ones don't take long and you will benefit enormously.

I certainly would not want to see the NWC interface changed to approach Sharpeye's - dreadful IMHO - FAR too mouse oriented - far too slow in most cases.

Quote
The bottom line is that I always go to a perfect score in Sharp Eye before converting to NoteWorthy, because it's so much easier to edit in Sharp Eye.  I even go back, when I find a mistake I missed, to correct the Sharp Eye, a habit I acquired generating artwork for etching circuit boards, where keeping the wire lists and graphics in sync is crucial.  And enharmonics wouldn't be a problem if only NoteWorthy could spell.

There are ways to edit enharmonic spelling automagically - trouble is I don't remember 'em 'cos I don't need to use 'em.  I rarely have that problem as most of my music is hand entered...  A search of this forum will probably find 'em, or one of the others may remember 'em...
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2007-10-04 06:36 pm
Topic updated to include a complete example of the nwctxt format. See the top of the topic...
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-10-06 09:42 am
It seems dubious to treat the notation (system) font differently other fonts.
This complicates parsing when you just want a list of fonts. Also, there is no reason that Font ID's might not contain backslashes, quotes, pipes, spaces and other symbols that might choke a parser if not properly escaped and quoted.

I would suggest, simply:
|Font|Style:System|Typeface:"NWC2STDA"|Size:16|Bold:N|Italic:N|CharSet:0

This would also accomodate a future decision to allow the System font to be selected from the CommomDialog Font picker. The future ability to specify Bold|Italic|CharSet might prove quite useful, for example:
|CharSet:1 might be used to map the 64th note flags to glyphs that looked like slashed 8th flags (for grace notes).

I also note that: |StartingBar: supports negative integers. I have no opinion on the desirabilty of this.
Quote from: Rick G.
I'm just Beta testing
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-10-09 11:05 pm
It is a classic trade-off. NWC1 used to have an import/export menu, but we constantly fielded questions about how to save as MIDI. So, we moved this into the Open and Save commands. Now, we get questions about why the notation does not look the same after saving to MIDI. Since the volume of these questions never really changed much, Export/Import seems the most appropriate, and is what appears in NWC2.
By this logic, perhaps nwctxt should be moved from Export to Save/Save As...

OTOH, with the exception of fermatas & breath marks, MIDI "export" is lossless. MIDI import belongs on the import menu.

A related thought: does anyone really use the "uncompressed format" any more? Seems to me that nwctxt is now the real uncompressed format.

And going further ... perhaps the compressed (i.e., normal) format should simply become compressed nwctxt. File size might be a bit bigger, but no one is doing "sneaker net" with single-sided 5¼ inch floppies anymore. This would seem to simplify things. It would eliminate the proprietary Clipboard format and associated bugs of having cut/paste not be the same as copy/paste via Notepad or User Tool as happened <here> (https://forum.noteworthycomposer.com/?topic=5111.msg32363#msg32363)

A console nwc<->nwctxt converter would seem easy (maybe too easy).

I don't feel strongly about this. How NoteWorthy does its internals is its own business. It just seems to make sense.
Title: Re: Working with *.nwctxt files
Post by: David Palmquist on 2007-10-10 01:14 am
Quote
File size might be a bit bigger, but no one is doing "sneaker net" with single-sided 5¼ inch floppies anymore.

Flashback!  I remember a friend had a small clipper and was hoping to make a few bucks converting 5 1/4 floppies to two sided mode by adding a notch.  That way they could be read upside down. 

If I recall correctly, that is...

Title: Re: Working with *.nwctxt files
Post by: Rob den Heijer on 2007-10-10 02:48 pm
You do! I did that, too. For Commodore floppies. With a special clipper (no sails) or simple scissors.
Good fun - never failed.
Title: Re: Working with *.nwctxt files
Post by: John Ford on 2007-10-10 03:48 pm
I used to have two clippers:  one for 5 1/4" floppies, another for 3 1/2" floppies (turned 720's into 1.44MB).  You had to be careful about the plastic "sawdust" you ended up with, but generally, it worked pretty well.  That brings back some memories.  I remember working for the US government, and even though they gave us computers to use, they didn't want to spend a penny on floppy storage media.  So we just recycled our 720's and reused them as 1.44's.

Now we just go out and buy 4GB USB sticks.  We've come a long way.
Title: Re: Working with *.nwctxt files
Post by: bidderxyzzy on 2007-10-10 09:25 pm
  Here is a more nearly complete nwctxt file than provided above.  The mismatched barlines in the repeat section are deliberate, constituting a test that NoteWorthy passed by not getting lost.  The file exports and re-imports without loss or change.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2007-10-13 04:08 pm
Comments reflect NWC2 Beta 2.21 using Win98SE.

We will look at improving the Import/Export file type defaults, perhaps by remembering what a user selects.
Export... remembers what the user selects :)
Import... always defaults to "Midi Flies" :(

the length of |SongInfo and |Lyricn make editing [nwctxt] a problem.
Cummulative instances of SongInfo (and others) solves the problem :)
This does not work with Lyricn :(

Lyricn would seem to need this the most of all the new object types.
Title: Re: Working with *.nwctxt files
Post by: matta on 2008-04-02 06:19 pm
No questions, just some positive feedback.

I've transcribed now well over a hundred pieces of Byzantine music, programmatically producing NCWTXT files, which I then import into NoteWorthy Composer--in effect, I can now programmatically transcribe Byzantine psaltiki neumes into Western musical notation.

All thanks to this wonderful feature! All of these transcriptions necessarily include multiple staves, bent pitches, and additional (but muted) text or notes. All of this is very easy programmatically, and I am yet to find a bug using this interface!

Many thanks to the NoteWorthy team for the great NCWTXT interface!

Title: Re: Working with *.nwctxt files
Post by: kahman on 2008-04-02 07:25 pm
The next step is to send them into the Scripto.  Your transcriptions do sound fascinating, judging by your previous posts.
Title: Re: Working with *.nwctxt files
Post by: Robin L. Øye on 2008-04-04 02:39 pm
matta,

Could you show us (that haven't divined this) how you did what you did? If not us, then me, at least.
Title: Re: Working with *.nwctxt files
Post by: matta on 2008-04-05 07:27 am
1. Review the Byzantine music piece (written in psaltiki neumes) and break it down into the smallest meaningful instructions to the chanter/musician. These are in the following areas: type of tuning (partly similar to a scale in Western music), first note after a change in tuning, pitch movement (i.e., moving higher up the scale or lower down the scale), duration of the sound, any flattening or sharpening of the sound from the pitch that note would normally have in that tuning, and then any ways the note should be played (tied to next note, slurred with next note, forte, trilled, shake, tremolo).

2. I then parse all these instructions and turn them into three things: (i) commands for NoteWorthy Composer in NWCTXT language; (ii) MusicXML and a Byzantine extension in comments, which I use as a file format for storage; (iii) MIDI instructions. Work on the latter two is not complete.
Title: Re: Working with *.nwctxt files
Post by: Steele on 2008-06-22 06:40 pm
Is there a complete syntax description of nwctxt because I want to write an converter.
Title: Re: Working with *.nwctxt files
Post by: Richard Woodroffe on 2008-07-04 04:22 pm
The code in the very first post of this thread is quite useful and should help.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2009-05-17 05:29 pm
File->Export... has these options for 'Save as type:'

IMO, it would be useful to add:

Many of the uses of nwtxt involve converting the Pos: and Pos2: fields into absolute pitches. This is merely difficult for simple songs but, for songs with complex flows that also have clef and key changes, it is nearly impossible.

It would be useful if the nwctxt import routine would recognize:
The first two would be especially useful.

When programatically adding notes to a staff, calculating where notes have to be broken and tied to insert barlines is tedious. NWC2 has this capability built in. It would be helpful to be able to automatically use it.
Title: Re: Working with *.nwctxt files
Post by: Randy Williams on 2009-11-06 03:27 pm
Quote
IMO, it would be useful to add:

•NWC Text File (forced accidentals)

Many of the uses of nwtxt involve converting the Pos: and Pos2: fields into absolute pitches. This is merely difficult for simple songs but, for songs with complex flows that also have clef and key changes, it is nearly impossible.
Several observations:
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2009-11-06 04:46 pm
purdue, you have touched upon the reason that I have not published any tools or utilities that deal with conversion of pos to pitch. As long as NWC2 permits such things as:
Quote from: a fine mess
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Bar|Style:LocalRepeatOpen
|Note|Dur:8th|Pos:0
|Clef|Type:Bass
|Bar|Style:LocalRepeatClose|Repeat:2
|Ending|Endings:1
|Instrument|Name:"[+1]"|Trans:1|Pos:-6|Justify:Center
|Bar|Style:MasterRepeatClose
|Ending|Endings:2
|Instrument|Name:"[+2]"|Trans:2|Pos:-6|Justify:Center
|Bar|Style:MasterRepeatClose
|Ending|Endings:3
|Instrument|Name:"[+3]"|Trans:3|Pos:-6|Justify:Center
|Bar|Style:MasterRepeatClose
!NoteWorthyComposerClip-End
I probably never will.

NWC2 uses "nb#xv" to indicate accidentals that are actually printed. If it would add: "NB$XV" to indicate accidentals that are implied, the decoding process would be simpler. If the tool/util was only concerned with appearance, it could simply ignore "NB$XV".

The flow problem would still remain.
Title: Re: Working with *.nwctxt files
Post by: jonashogstrom on 2010-03-15 11:18 pm
When a file is opened as an nwctxt-file (with that extension), how come that it is not automatically saved with the same format? When I try to save a file that was opened as nwctxt, noteworthy2.1 tries to save it as a compressed nwc-file.
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2010-03-16 12:19 am
Saving .nwctxt files is only possible via the File, Export command. The File, Save command does not currently support the .nwctxt format.

Update: NWC 2.5 fully supports the direct editing of *.nwctxt files.
Title: Re: Working with *.nwctxt files
Post by: jonashogstrom on 2010-03-16 11:27 pm
Saving .nwctxt files is only possible via the File, Export command. The File, Save command does not currently support the .nwctxt format.

Any chance this could be fixed? It would be great if nwc could remember the format it used when loading and use the same format when saving. We have all nwc-files for our archive (200+) checked in to a version manager (subversion), and the text-format would be a great improvement since changes from two users could be merged. However, if everyone needs to remember to export the file rather than save the file each time they have made changes, inevitably someone will forget to do this.

/Jonas
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2010-03-17 01:28 am
Sounds like an effective setup. We will consider this for the next release, but I do not have any published time frame for you at the moment.
Title: Re: Working with *.nwctxt files
Post by: Beth on 2012-02-03 12:34 am
Does this enable me to import a music file into a word document?  I have had to print, scan and insert as a picture in the past when making worksheets with musical examples?
Beth
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2012-02-03 12:49 am
This topic is about text instructions that represent the NWC notation.

This FAQ is directed to your question: FAQ - Can I copy my score to another application, like a word processor? (http://ntworthy.com/composer/faq/57.htm)
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2012-02-03 12:53 pm
NWC 2.5 now fully supports the direct editing of *.nwctxt files. File Import/Export operations are no longer required.
Title: Re: Working with *.nwctxt files
Post by: Richard Woodroffe on 2012-02-03 03:15 pm
NWC 2.5 now fully supports the direct editing of *.nwctxt files. File Import/Export operations are no longer required.

One very small niggle that is really of no consequence but I'll mention it anyway -

Most programs that open different file types, if you do a "File Save As" , will maintain the original file type as default.
NoteWorthy doesn't do this with nwctxt. If you open a nwctxt file and do a "File Save as", the file type will be nwc not nwctxt.

Examples,
Open a .csv file with Excel and do a "Save As" and the file type will be maintained as .csv, not xls or xlsx
Open a .rtf file with Word and do a "Save as" and the file type will be maintained as .rtf not .doc or .docx

Not that I'd hold Microsoft products up as a beacon, but Open Office follows this methodology as well.


Title: Re: Working with *.nwctxt files
Post by: Rob den Heijer on 2012-03-21 07:58 am
It was a bit of a surprise when I opened a .nwctxt file, worked on it, saved... and it was saved as .nwctxt.
But a pleasant surprise. Currently I am working on a four score and ten scores (honestly!) and if I decide that something about the layout has to be changed in all files, I can do that using my editor, without having to re-export all (before editing) and saving them all again!

In short, I think it is great, thanks!
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2012-03-25 09:25 pm
Most programs that open different file types, if you do a "File Save As" , will maintain the original file type as default.
NoteWorthy doesn't do this with nwctxt. If you open a nwctxt file and do a "File Save as", the file type will be nwc not nwctxt.

Thanks for the report. This will be fixed in NWC 2.5.4.
Title: Re: Working with *.nwctxt files
Post by: Richard Woodroffe on 2012-03-26 07:46 am
Thanks for the report. This will be fixed in NWC 2.5.4.

Confirmed fixed in 2.5.4 beta 3
Title: Re: Working with *.nwctxt files
Post by: Susanna on 2014-05-09 12:47 am
Flashback!  I remember a friend had a small clipper and was hoping to make a few bucks converting 5 1/4 floppies to two sided mode by adding a notch.  That way they could be read upside down. 

If I recall correctly, that is...


I know this is a very old post, but my son and some of his friends did exactly that on their Commodore 64's.
Title: Re: Working with *.nwctxt files
Post by: Susanna on 2014-05-09 01:51 pm
I just downloaded and printed the sample given by Rick G. back several years ago.  I'll use it as a reference tool.  If I get the hang of it, I should find it very useful (as an old computer programmer!).
Title: Re: Working with *.nwctxt files
Post by: NoteWorthy Online on 2016-05-05 06:13 pm
The original post in this topic has been updated for version 2.75.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 02:15 am
Does the .nwctxt format follow an established meta format?
Title: Re: Working with *.nwctxt files
Post by: hmmueller on 2019-03-03 05:23 pm
No (to my knowledge; but I have seen a few 100 textual file formats in my life, so I guess I should have recognized a similar one). It's  an "enhanced" "CSV" format, using bars as "commas", commas as secondary separators, : and = as value assignments, and an implicit semantic block structure defined by AddStaff directives. I'd say it's about as adhoc as Microsoft's (old) VisualStudio format.

H.M.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 05:51 pm
Yeah, I was afraid of that.  But when I realized Lilypond files were just TeX, I got a glimmer of hope that nwctxt was following some convention, like maybe something defined by the Lua language.  Oh well.
Title: Re: Working with *.nwctxt files
Post by: hmmueller on 2019-03-03 06:22 pm
Why "afraid", and "hope"? It's just another text file format - it can be parsed and written like any new format. And it is simple enough to be fully understood from a few dozen example files ...

H.M.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2019-03-03 07:24 pm
I realized Lilypond files were just TeX,
How has this realization helped you?
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 07:40 pm
Because examples have to be exhaustive in order for the format to be “understood”.  Without direct knowledge, there is no way to know if any selection of “example” files are exhaustive.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 07:46 pm
Hope, because lasconic’s .nwctxt -> MusicXML converter makes mistakes when multiple lyric lines use voices to change rhythms on a man additional verse.  Without that bug fixed (and it doesn’t look likely), my users will be unable to import the content they created in NWC unless I write an importer from scratch.  And without proper documentation on what might appear in the file, interpreting my users files will be “best guess” instead of reliable.
Title: Re: Working with *.nwctxt files
Post by: hmmueller on 2019-03-03 07:52 pm
Well ... this might be becoming a fundamental debate about transport of information. But in all cases I have seen, the semantics is the much more complicated and interesting part than the syntax. The number of "simple XML formats" that define a catastrophic representation of the actual information is enormous - for example, Microsoft's second Visual Studio format. Having information in a "Tex" format is quite useless in writing a useful algorithm on that information; and, in many cases, I have seen syntactical biases essentially kill the understandability of many formats - many people operate under the assumption that if it saved as as TeX/XML/CSV/relational data, therefore it must follow the concepts of Tex/XML/CSV/rel.data. A famous example of such an ill-conceived format is the use of XML in Ant - a custom language would have been a much better choice.

... which is not to say that nwctxt is a highly professionally designed language; but using any other family of meta-format wouldn't have helped in the least.

H.M.
Title: Re: Working with *.nwctxt files
Post by: hmmueller on 2019-03-03 07:54 pm
Yes, that's the real problem - not because of any sort of format or meta-format, but because there is no complete semantics description. But no-one, up to now, seems to have found time to write such a beast ... any volunteers?

H.M.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 08:17 pm
many people operate under the assumption that if it saved as as TeX/XML/CSV/relational data, therefore it must follow the concepts of Tex/XML/CSV/rel.data. A famous example of such an ill-conceived format is the use of XML in Ant - a custom language would have been a much better choice.

Oh, don't get me wrong, I hate TeX, but at least there are probably documented rules for writing parsers on it, along with open-source reference implementations.
And anyway, there are enough well-designed meta formats that it's really a waste of everybody's time to write a custom one for almost any application.  And if the meta format is popular enough, OSs have a built-in parser.  At least json has a standardized character encoding, and xml has a way to explicitly specify the character encoding, something the nwctxt format does not account for.  Which means my app has to GUESS.  I mean, I hate MusicXML, and have posted on my blog often about it's laughably-poor design, but at least there's an XML parser built in to the OS on all my users' devices, and I don't have to worry about whether the metaformat reads properly.  And extensive documentation on what represented values can be.  It's just they sometimes leave out the parts about what those values mean....
Title: Re: Working with *.nwctxt files
Post by: hmmueller on 2019-03-03 09:09 pm
Well, then we agree on quite a few things. However, ...

... NWC is, and that's a nice thing, not a software that considers itself as an "open tool for programmers". It is a music editor, with some technical interfaces that sort of do its work for solving some smaller common problems. So we'll, on this front, live with it as it is, I'd assume.

Those who want to integrate it in the "larger world of processing anything and everything" (be it musically; or technically) will probably skin their knees and elbows, here and there ...

H.M.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 09:16 pm
My users are going to need content, and there is a huge amount of .nwc content out there.  hymnary.org, for instance, has at least a thousand well-formatted .nwc files.  I just want the work which went into creating the content to be useful.  And right now there is no technical solution to be able to use any of that content in my app without downloading, installing learning to use a 3rd party composition tool to correct almost every single lyric in an entire composition.  And when faced with that level of work, my potential users will simply never use the product.  That is unless lasconic (or someone else who knows java and understands how .nwctxt assigns lyrics to notes) fixes the bug in his converter, or I write an importer from scratch.
Title: Re: Working with *.nwctxt files
Post by: Flurmy on 2019-03-03 09:56 pm
Because examples have to be exhaustive in order for the format to be “understood”.  Without direct knowledge, there is no way to know if any selection of “example” files are exhaustive.
Long long ago there was a "NWCTEXT_Really_complete_example_file.nwctxt" but it became incomplete soon after being created.
Guess how it is today!  ;D
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-03 10:28 pm
Do you happen to know what was incomplete about it?  :-)
Title: Re: Working with *.nwctxt files
Post by: Flurmy on 2019-03-03 10:35 pm
In a few words: a lot.  :(
Think that we are talking of about ten years ago, probably when the textual format (nwctxt) was just introduced.
Title: Re: Working with *.nwctxt files
Post by: David Palmquist on 2019-03-04 10:11 am
Hope, because lasconic’s .nwctxt -> MusicXML converter makes mistakes when multiple lyric lines use voices to change rhythms on a man additional verse.  Without that bug fixed (and it doesn’t look likely), my users will be unable to import the content they created in NWC unless I write an importer from scratch.  And without proper documentation on what might appear in the file, interpreting my users files will be “best guess” instead of reliable.
It would probably help us understand your needs if you would tell us who your users/potential are, Ben? 

What is it you're trying to achieve? 

What do you expect your users will be doing that they can't do with the free  NoteWorthy Composer Viewer, available at https://noteworthycomposer.com/nwc2/viewer.htm (https://noteworthycomposer.com/nwc2/viewer.htm) ?
Title: Re: Working with *.nwctxt files
Post by: ilow99 on 2019-03-07 11:01 am
Hi Ben,
I'd just like to chip in here to say that I have written an nwctxt importer/converter using php and JavaScript from scratch (check out qwikkey under user tools at scriptorium), and the nwctxt format is really quite self-explanatory and easy to understand. The variable names and valid parameter settings are all named in full like the Basic language, and follow on from the same option names as via the application menu. So if one does not know the valid settings for a given variable, e.g. Note, length, position, etc, one can just refer to the application menu options. If in doubt, I would just create a simple nwctxt file with just a few notes, and then analyze the nwctxt file. You'd find that it's so easy, you'd get the hang of it pretty quickly.
Hope this helps.     ???
my youtube channel (https://m.youtube.com/channel/UCgow6IeXw4oxhNO7PSo2jpw)
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-07 12:58 pm
I did attempt to post a long detailed answer to David Palmquist's question a few days ago.  However, I see now that it's not here.  Suffice it to say that the viewer does not even attempt to do any of the things I want.
Title: Re: Working with *.nwctxt files
Post by: Mike Shawaluk on 2019-03-07 03:20 pm
I'm sorry your reply was lost; I am interested in knowing what features are missing from the NWC Viewer that your users need. Is there any chance you could post a "short and sweet" version of your previous reply?
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-07 04:01 pm
I’m building a Mac app to help people sing along in church.  The vast majority are not musicians and will never be musicians.  It will export videos of a designed-from-scratch notation I am patenting, which people “just get” instinctively, with no formal training.  The app will be operated by untrained volunteers,  secretaries, and graphic artists; most of whom have no training in reading (or editing) conventional notation.  They will need an authoritative source of content, and hymnary.org has at least a 1000 well-formatted NWC files.  As long as lasconic’s NWC-> MusicXML converter has the bug about assigning lyrics to rhythms in subsequent voices, it will be useless for the vast majority of my customers.  Going through midi would lose lyrics and section-definition information which the users will need to re-order sections into alternate forms with no notation experience.
Title: Re: Working with *.nwctxt files
Post by: David Palmquist on 2019-03-08 02:13 am
I'm not familiar with lasconic's converter.  Maybe the problem is the converter rather than NWC.

Have you tried Niversoft's?  It will create MusicXML from nwctext files (I don't know how it works with lyrics.  Not my thing..
https://www.niversoft.com/products/xml2nwc/#conversion (https://www.niversoft.com/products/xml2nwc/#conversion)




Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-08 02:13 am
Yes, the bug is in the converter, not NWC.  NWC displays the files fine.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-08 02:15 am
Unfortunately, Niversoft's converter says "Binary NWC files cannot be converted here.", and I don't think my users will know how to extract a  binary deflate stream and inflate it.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2019-03-08 05:31 am
I don't think my users will know how to extract a  binary deflate stream and inflate it.
It is a simple process for anyone with NoteWorthy Composer. Open the binary file and save it as nwctxt.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-08 12:54 pm
According to data from another company who sells other kinds of content to the same market, my users will predominantly have Mac's.  For them to run NWC, they'd have to buy & install a few hundred $ of software (a vm solution, a license to windows) like I did, and for that price, they may as well buy Finale (churches get a 42% discount!), which I also did (without the discount), and then they can open the Finale files sold from praisecharts.com and lifewayworship.com and export to MusicXML (which my app can import, if poorly), and that would also give them access to newer popular songs (which I've also been doing for testing, and wow, automated detection of pick-up beats in Chris Tomlin songs is next to impossible.).  And that would assume that their corporate machine would allow them to install a vm or boot camp, which it probably won't.  The better solution is they download the original file and just import it into my app, and voila, nothing else to do.

The level of work I'm already asking them to do is 5 times more complicated than what most of them will likely do. Surf the web for content?  Download specific file formats?  "Import a file"?  "Pick a video codec" "Set a resolution on a video export"? Import the video into ProPresenter or MediaShout?  For lyrics only, all they have to do right now in their Christian presentation apps is log-in with their CCLI credentials once, then whenever they want a song, they just type the name of the song in the search field, and pick from the list.  Making that process more complicated is something I'm trying hard to avoid, because it's needless friction in the adoption process (and a bad user experience).

And while I would love to make my app that simple, and that was the original design, I'd need CCLI to return one of my voicemails, which I suspect will happen after the app is available for sale, after I've produced a testimonial video of ecstatic responses of folks somewhere loving the notation, and after some celebrity worship music composer/leader endorsements (which have been surprisingly easy to get).  But none of that can happen until the patent attorney finishes the draft  of the claims.  So here I am with an app that's ready to release, waiting on a cheap lawyer from legal zoom, trying hard to solve the biggest problem my users will ever face (content acquisition) with things I can do, like writing an importer for other popular file formats.

And since NWC was an affordable solution for me to start composing in high school in 1999, and there is a plethora of content, especially traditional hymns, in nwc format, I have a strong desire to enable that content to be usable in my app.
Title: Re: Working with *.nwctxt files
Post by: David Palmquist on 2019-03-08 08:40 pm
..., they may as well buy Finale (churches get a 42% discount!),... to enable that content to be usable in my app.
They might as well, but there's a very steep learning curve with Finale.  Best of luck with your venture.
Title: Re: Working with *.nwctxt files
Post by: Rick G. on 2019-03-08 09:57 pm
So here I am ..., trying hard to solve the biggest problem my users will ever face (content acquisition) with things I can do, like writing an importer for other popular file formats.
NoteWorthy's compressed file format (at least since version 2.5) is not a secret. For someone with your resources, it should be possible to write an inflater that work with a non-Windows operating system.
Title: Re: Working with *.nwctxt files
Post by: benspratling4 on 2019-03-08 10:23 pm
I did write an inflater that does work on Mac, iOS, appletv, & Linux, and does extract the nwctxt portion of the compressed .nwc files.
Title: Re: Working with *.nwctxt files
Post by: Lawrie Pardy on 2019-03-09 01:05 am
While I don't have the knowledge to help, I applaud your dedication and the effort you're putting into this project.  I wish you well with it.