Hi John,
Sorry I've been slow replying. I've been really busy and haven't visited the forum for a few days. Here's a copy of the reply I wrote in the newsgroup:
======================
Hmm. I just tried this here and can't replicate the problem.
Which version of the user tool kit are you using? We're up to v1.1 now.
Downloadable at http://www.noteworthysoftware.com/nwc2/tools.htm
Also which version of transpose_chords are you using? The curent version is 1.0.2, though the most recent change is trivial. It's at
http://nwc-scriptorium.org/nwc2scripts.html#Transpose_Chords
I've had a look at my code, and the relevant bit is shown below:
foreach ($clip->Items as $item)
{
$nothingToDo = FALSE ;
$o = new NWC2ClipItem($item);
if ($o->GetObjType() == "Text" &&
($t =& $o->GetTaggedOpt("Text")) && rootChordValue($t)
&& (isset($font) ? $o->GetTaggedOpt("Font") == $font : true))
{
transpose($t) ;
echo $o->ReconstructClipText()."\n" ;
}
else echo $item ;
unset($o);
}
The variable $item is simply the string that is being passed to the filter by NWC2, and hopefully you can see that unless it is a "Text" item, it gets printed without any alteration. This would lead me to suspect that NWC2 wasn't sending the Lyric=Never attribute, but since it works for me, I can't verify this. What version of NWC2 are you using? Perhaps it was a bug that is already fixed?
> If you need the source NWC file, I'd be happy to send it to you (I'd need an address, though).
Just remove NOTWAGNER, but you could also simply copy and paste a before and after.
For example, if I transpose
!NoteWorthyComposerClip(2.0,Single)
|Text|Text:"B"|Font:StaffItalic|Pos:6
|Note|Dur:4th|Pos:-8|Opts:Lyric=Never
|Note|Dur:4th|Pos:-7|Opts:Lyric=Never
|Note|Dur:4th|Pos:-6|Opts:Lyric=Never
|Note|Dur:4th|Pos:-5|Opts:Lyric=Never
|Bar
|Text|Text:"C"|Font:StaffItalic|Pos:6
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
!NoteWorthyComposerClip-End
using -4 C#, I get
!NoteWorthyComposerClip(2.0,Single)
|Text|Text:"G"|Font:StaffItalic|Pos:6
|Note|Dur:4th|Pos:-8|Opts:Lyric=Never
|Note|Dur:4th|Pos:-7|Opts:Lyric=Never
|Note|Dur:4th|Pos:-6|Opts:Lyric=Never
|Note|Dur:4th|Pos:-5|Opts:Lyric=Never
|Bar
|Text|Text:"G#"|Font:StaffItalic|Pos:6
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:-2
|Note|Dur:4th|Pos:-1
!NoteWorthyComposerClip-End