1
The attached User Tool: rg_getStaff.vbs will get the current staff and return it to the STDOUT window as a report.
From there, a user can select it and copy it to the Clipboard. The staff can then be pasted as a New File, to an editor, or added to a song with The User Tool: rg_pasteStaff.vbs
If the script is placed in the Scripts folder (remove .txt), the command is:
CScript //nologo Scripts\rg_getStaff.vbs
Input Type is: File text
The attached User Tool: rg_pasteStaff.vbs will paste a staff from the Clipboard.
The Clipboard must contain at least one line that begins with:
|AddStaff
The staff (or staves) are inserted above the current staff.
StaffProperties, a StaffInstrument, Lyrics, and staff objects are supported.
If the script is placed in the Scripts folder (remove .txt), the command is:
CScript //nologo Scripts\rg_pasteStaff.vbs
Input Type is: File text
Required Option is: Returns File Text
3
NWC 2.75+ is required.
-- rg_MasterTune.lua ver 1.0 <http://nwsw.net/-f9239>
-- This NWC user tool can be used to set the Master Tuning.
-- Playing the Song it creates alters the Master Tuning.
-- The change affects all windows for the current NWC session.
-- Options: Returns File Text [x], Prompts for User Input [x]
local msg = 'Enter new tuning in semitones'
local opt = nwcut.prompt(msg, '#[-12,12]', 0)
if opt then
local userObj = '|User|MIDIParm.nw|LSB:2|DataMSB:' .. opt + 64
for _, channel in ipairs{1,2,3,4,5,6,7,8,9,11,12,13,14,15,16} do
nwcut.writeline('|AddStaff')
nwcut.writeline('|StaffProperties|Channel:' .. channel)
nwcut.writeline(userObj)
end
end
See: MIDI Non-Registered (and Registered) Parameters for some idea of why this works
4
Markup.rg is a User plugin for text markup that is attached to a single point in a score.
It is not designed for positioning text between two or more items.
To install, save the Lua attachment as:
%ProgramData%\Noteworthy Software\nwc2\UserPlugins\Markup.rg.nwcuser.Lua
6
With this clip:!NoteWorthyComposerClip(2.51,Single)
|Key|Signature:Bb|Tonic:F
|Note|Dur:Whole|Pos:0
|Bar
|Key|Signature:F#|Tonic:G
|Note|Dur:Whole|Pos:0
!NoteWorthyComposerClip-End
if measure 2 selected, the context provided to a User Tool is:IMO, it should be:If a Tool inserts item(s) before the bar, it may matter very much what the Key is.
The PHP library function: NWC2PlayContext() will make bad assumptions about the Key and subtle bugs may result.
10
When Text is centered on a RestChord, it is centered on the width of the rest, even if hidden.
The start and end of slurs appear to ignore both the notehead and rest width.
!NoteWorthyComposer(2.51)
|PgSetup|StaffSize:22|Zoom:5|DurationPadding:N
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)|WithNextStaff:Layer|Color:Highlight 2
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:Half,Slur|Pos:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:4th,Slur|Pos:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:8th,Slur|Pos:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:16th,Slur|Pos:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:32nd|Pos:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|Note|Dur:64th|Pos:0
|AddStaff|Name:"Staff-1"
|StaffProperties|EndingBar:Open (hidden)|BoundaryTop:10|BoundaryBottom:10
|StaffProperties|Channel:2
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:Half,Slur|Opts:Stem=Up,HideRest|Dur2:Half,Slur|Pos2:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:4th,Slur|Opts:Stem=Up,HideRest|Dur2:4th,Slur|Pos2:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:8th,Slur|Opts:Stem=Up,HideRest|Dur2:8th,Slur|Pos2:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:16th,Slur|Opts:Stem=Up,HideRest|Dur2:16th,Slur|Pos2:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:32nd|Opts:Stem=Up,HideRest|Dur2:32nd|Pos2:0
|Text|Text:"\}"|Font:StaffSymbols|Pos:6|Justify:Center|Placement:AtNextNote
|RestChord|Dur:64th|Opts:Stem=Up,HideRest|Dur2:64th|Pos2:0
!NoteWorthyComposer-End
14
Quite easy. Figuring out how easy took several hours.
<?php
# rg_ForceAccidentals.php ver 1.0
# Ref: http://my.noteworthysoftware.com/?topic=8445.0
require_once ('lib/nwc2clips.inc');
$clip = new NWC2Clip(); // Input Type: Clip Text
echo $clip->GetClipHeader(), PHP_EOL; // Returns Clip Text
$PlayContext = new NWC2PlayContext();
foreach ($clip->Items as $item) {
$o = new NWC2ClipItemWithPitchPos($item, true);
foreach (array('Pos', 'Pos2') as $pos_tag)
foreach ($o->PitchPos[$pos_tag] as $npp)
$npp->Accidental = $PlayContext->GetNotePitchAccidental($npp);
$PlayContext->UpdateContext($o);
$o->ReconstructPosOpts();
echo $o->ReconstructClipText(), PHP_EOL;
}
echo NWC2_ENDCLIP, PHP_EOL;
?>
Comments and criticisms welcome.
15
around line 94:<?php
if (isset($o->Opts["Stem"]) && ($o->Opts["Stem"] == "Up")) $notes = array_merge($notes2,$notes);
else $notes = array_merge($notes,$notes2);
?>
Currently: isset($o->Opts["Stem"]) will be false for any input from NWC.
Perhaps the test should be:
if (isset($o->Opts['Opts']) and $o->Opts['Opts']['Stem'] == 'Up') ...
Which moved the code to around line 104 where it remains unchanged. Perhaps the merge order no longer matters.
20
The Symbol font is installed on Windows by default and should be available to all. It contains useful glyphs for creating braces in custom heights which are useful in some music notation.
!NoteWorthyComposer(2.0)
|Font|Style:User1|Typeface:"Symbol"|CharSet:2
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)
|Text|Text:"ì"|Font:User1|Pos:-8|Placement:AtNextNote
|Text|Text:"í"|Font:User1|Pos:-11|Placement:AtNextNote
|Text|Text:"î"|Font:User1|Pos:-14|Placement:AtNextNote
|Note|Dur:4th|Pos:-1
|Text|Text:"ü"|Font:User1|Pos:-8|Placement:AtNextNote
|Text|Text:"ý"|Font:User1|Pos:-11|Placement:AtNextNote
|Text|Text:"þ"|Font:User1|Pos:-14|Placement:AtNextNote
|Note|Dur:4th|Pos:-1
|Text|Text:"ì"|Font:User1|Pos:-8|Placement:AtNextNote
|Text|Text:"ï"|Font:User1|Pos:-11|Placement:AtNextNote
|Text|Text:"í"|Font:User1|Pos:-14|Placement:AtNextNote
|Text|Text:"ï"|Font:User1|Pos:-17|Placement:AtNextNote
|Text|Text:"î"|Font:User1|Pos:-20|Placement:AtNextNote
|Note|Dur:4th|Pos:-1
|Text|Text:"ü"|Font:User1|Pos:-8|Placement:AtNextNote
|Text|Text:"ï"|Font:User1|Pos:-11|Placement:AtNextNote
|Text|Text:"ý"|Font:User1|Pos:-14|Placement:AtNextNote
|Text|Text:"ï"|Font:User1|Pos:-17|Placement:AtNextNote
|Text|Text:"þ"|Font:User1|Pos:-20|Placement:AtNextNote
|Note|Dur:4th|Pos:-1
!NoteWorthyComposer-End
21
The Spacer Command and Boundary Change Command introduced in NWC 2.5 have these properties:
- the color is not seen in Print Preview or Viewer Mode
- a visibility option that causes the object to be hidden, disables the object.
This allows for some interesting uses for these properties.
Various colors can be set to clarify the purpose of the object. I use Color:1 (red) for spacers with a zero width. This distinguishes them from the other small spacers. I use Color:3 (blue) for spacers that only matter in the editor.
If I am using the same width spacer to generally "spread out" a song, I assign it a color. This makes it easy to find with the Filtered Properties Command should I wish to change the overall spacing.
Boundary objects are often used to collapse staves when they contribute nothing to a score (French scoring) and to adjust the spacing between staves. When printing an individual part, they usually need to be disabled. By assigning a color to those Boundary objects, I can selectively disable them with the 'Global Modification (adp)', User Tool Command
!NoteWorthyComposerClip(2.5,Single)
|Boundary|Style:NewSize|Upper:8|Lower:8|Color:1
|Boundary|Style:Gap|Width:200
!NoteWorthyComposerClip-End
To disable the effect of red Boundary objects, run: Global Modification (adp)
To reset them to default visibility, run: Global Modification (adp)
23
IMO, NoteWorthy would be improved if it allowed more range and granularity in its numeric operations.
Many quantities are stored as bytes which made sense in 1994 when the typical environment was Windows 3.x In the current millennium, 32bit integers are processed as quickly as bytes; memory and persistent storage have increased exponentially. In many areas, it makes little sense to continue with byte sized numbers.
NWC 2.5 has set the stage for the future. The new Boundary and Spacer objects resolve to the nearest hundredth of a note width:
!NoteWorthyComposerClip(2.5,Single)
|Spacer|Width:100
|Boundary|Style:Gap|Width:200
!NoteWorthyComposerClip-End
In the UI (User Interface), the spinboxes allow for 2 digits after a fixed decimal point.
Moving forward, I think that all the values for x that appear in the following code after a colon or equals sign ought to be replaced by x * 100
Spinboxes for these items should allow for 2 digits after a fixed decimal point.
!NoteWorthyComposer(2.5)
|StaffProperties|BoundaryTop:12|BoundaryBottom:12
|Lyrics|Offset:2
|Note|Opts:StemLength=7,XAccSpace=1,XNoteSpace=1
|Rest|Opts:VertOffset=1
|Chord|Pos:|Opts:Stem=Down,StemLength=7,XAccSpace=1,XNoteSpace=1|Pos2:
|RestChord|Opts:Stem=Down,StemLength=7,XAccSpace=1,XNoteSpace=1,VertOffset=2|Pos2:
|Boundary|Style:NewSize|Upper:8|Lower:8
|Dynamic|Style:mp|Pos:1
|DynamicVariance|Style:Crescendo|Pos:2
|Flow|Style:Coda|Pos:1
|PerformanceStyle|Style:Tenuto|Pos:1
|Ending|BracketHeight:5|VertOffset:1
|SustainPedal|Pos:1
|Tempo|Tempo:120|Pos:1
|TempoVariance|Style:Caesura|Pos:2
|Text|Text:"x"|Pos:1
|Instrument|Pos:1
|MPC|Controller:pan|Pt1:1|Pos:1,0
!NoteWorthyComposer-End
(In the above, "Style:" should be interpreted as any supported style. For some reason, nwctxt requires a valid style where the Style tag is allowed)
Once this groundwork is laid, NoteWorthy would have the data it needs to resolve MIDI (playback) quantities, and EMF (screen, printer) coordinates, to the full granularity allowed by the MIDI and EMF specifications. Support could be added at a leisurely pace without the need for changes to the file layout.
These items ought to be changed to allow negative quantities:- Spacer Width
- Extra Accidental Spacing
I don't see why the full signed 32bit range in nwctxt should not be allowed. The nwctxt parser could simply use the closest allowed value when converting to NWC's binary format.
25
A simple hymn:
!NoteWorthyComposer(2.5)
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)|BoundaryBottom:20
|Lyric1|Text:"1. A-men 1. a a\r\n"
|Lyric2|Text:"2. b b 2. b b\r\n"
|Lyric3|Text:"3. c c 3. A-men\r\n"
|Note|Dur:4th|Pos:0
|Bar|Style:LocalRepeatClose|Repeat:3|Visibility:Never
|Bar|Style:Double
|Note|Dur:Half|Pos:0
|Note|Dur:Half|Pos:0
|Bar|Style:SectionClose
|Boundary|Style:Gap|Width:500|SystemConnections:N
|Bar|Style:LocalRepeatOpen|Visibility:Never
|Note|Dur:4th|Pos:0
|Bar|Style:LocalRepeatClose|Repeat:3|Visibility:Never
|Bar|Style:MasterRepeatOpen|Visibility:Never
|Ending|Endings:1,2|Visibility:Never
|Bar|Style:MasterRepeatClose|Visibility:Never
|Bar|Style:Double
|Note|Dur:Half|Pos:0
|Note|Dur:Half|Pos:0
|Bar|Style:SectionClose
!NoteWorthyComposer-End
0.202 rg_ZenTxt v1.0
NWC highlights the Amen in the first verse. No major publisher puts it there.
To get NWC to highlight the Amen in the third verse requires a kludge. IMO, it shouldn't.
27
A couple of chords from a published work:
!NoteWorthyComposerClip(2.0,Single)
|Key|Signature:Bb,Eb,Ab
|Chord|Dur:4th|Pos:n0,2,n5,n7
|Chord|Dur:4th|Pos:n1,3,b5,6,n8
!NoteWorthyComposerClip-End
I understand why NWC puts as much space as it does between note and the nearest column of accidentals. There are leger lines to consider and since they may exist on a layered staff, NWC must always allow for them. I do not understand the spacing of the leftmost columns(s). Leger lines will never be a consideration. IMO, NWC would be improved if the leftmost column(s) were more tightly spaced.
NWC 2.5 allows text to replace these accidentals. Tedious, but a major improvement for printing. Playback suffers, since text is not highlighted during the note chase. Having some, but not all, accidentals highlight is most confusing, especially when using the standalone viewer. IMO, some thought should be given to note chase highlighting. My thoughts are:- an option on the visibilty tab to 'Highlight on playback'
- an automatic highlighting of certain characters from the system font (noteheads, accidentals, articulations, augmentation dots, flags)
- highlight anything placed 'At Next Note/Bar' that is not placed before a bar.
The attachment shows how G. Schirmer handled the chords.
32
!NoteWorthyComposerClip(2.0,Single)
|Instrument|Name:"Flute"|Patch:73|Pos:9
|RestChord|Dur:8th|Opts:Stem=Down|Dur2:4th|Pos2:0
|Note|Dur:8th|Pos:0^|Opts:Stem=Down
|Note|Dur:4th|Pos:0^|Opts:Stem=Down
|Note|Dur:Half|Pos:0
|Bar
|Note|Dur:8th,Tenuto|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:0^|Opts:Stem=Down,Beam=End
|Note|Dur:4th|Pos:0^|Opts:Stem=Down
|Note|Dur:Half|Pos:0
!NoteWorthyComposerClip-End
If a musician plays first measure, it will sound like the second measure on most instruments, and more like the second than NoteWorthy's playback of the first on nearly all instruments.
IMO, NoteWorthy's playback would be improved if, before scheduling a 'note on' for a MIDI channel, it removed any pending 'note offs' for that note number in the MIDI channel. (note off = note on with velocity zero).
40
If you run this:
<?php
require_once("lib/nwc2clips.inc");
$clip = new NWC2Clip();
foreach ($clip->Items as $item) {
$o = new NWC2ClipItemWithPitchPos($item);
$type = $o->ObjType;
echo $type.'->'.$o->ObjTypeHasPitchPos($type).PHP_EOL;
}
exit(NWC2RC_REPORT);
?>
true is reported for Rest objects. Rest objects do not have PitchPos.