Skip to main content
Topic: nwctxt syntax reference (Read 2195 times) previous topic - next topic

nwctxt syntax reference

I'm trying to work with NWC user tools.
First, I would like to create my own parser but I didn't find find reference for nwctxt syntax.

Where can I find it?


Re: nwctxt syntax reference

Reply #1
The actual notation objects use the same representation as is available from Edit, Copy while working in the editor.

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.
# ------------------------------------------------------------------------------
# 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.0 (newer files use version 2.5).

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

# ------------------------------------------------------------------------------
# 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.

|PgSetup|DurationPadding:Y|PageNumbers:3|StaffLabels:First System

# Margins are specified in Centimeters. You can convert to
# inches by dividing these values by 2.54.

# 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:Staff Italic|Typeface:"Times New Roman"|Size:10|Bold:Y|Italic:Y|CharSet:0
|Font|Style:Staff Bold|Typeface:"Times New Roman"|Size:8|Bold:Y|Italic:N|CharSet:0
|Font|Style:Staff Lyric|Typeface:"Times New Roman"|Size:7|Bold:N|Italic:N|CharSet:0
|Font|Style:Page Title Text|Typeface:"Times New Roman"|Size:24|Bold:Y|Italic:N|CharSet:0
|Font|Style:Page Text|Typeface:"Times New Roman"|Size:12|Bold:N|Italic:N|CharSet:0
|Font|Style:Page Small Text|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:User 1|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User 2|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User 3|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User 4|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User 5|Typeface:"Times New Roman"|Size:8|Bold:N|Italic:N|CharSet:0
|Font|Style:User 6|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

# The various StaffProperties can be assigned using multiple instances of
# the instruction.
|StaffProperties|EndingBar:Section Close|Visible:Y

# 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

# The notation contained in the staff uses the same format as NWC2 Clip
# Text from the NWC2 User Tool and clipboard mechanisms

# ------------------------------------------------------------------------------
# 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.
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:10|BoundaryBottom:18|Lines:5|Style:Upper Grand Staff|Layer:N|Color:Default
|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"

# ------------------------------------------------------------------------------
|StaffProperties|EndingBar:Section Close|Visible:Y|BoundaryTop:15|BoundaryBottom:14|Lines:5|Style:Lower Grand Staff|Layer:N|Color:Default
|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"
Registered user since 1996