Skip to main content

Topic: nwctxt syntax reference (Read 742 times) previous topic - next topic

nwctxt syntax reference
I,
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?

Thanks!

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).
#
!NoteWorthyComposer(2.0)

# 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.
|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: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
|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:14|BoundaryBottom:12
|StaffProperties|Lines:5|Style:Standard|Layer:N|Color:Default
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:2

# 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 NWC2 Clip
# Text from the NWC2 User Tool and clipboard mechanisms
|Clef|Type:Treble
|Note|Dur:Whole|Pos:1^
|Bar
|TempoVariance|Style:Fermata|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
Registered user since 1996

Re: nwctxt syntax reference
Reply #2
I would also recommend using the .Developer Tools that are installed with the  latest user tool starter kit.