- If you tie a note with an accidental (using the / key) then the second note will have an accidental too if the tie crosses a bar line. No problem if the tie is within the bar, and no problem if the note is programatically split because its duration is too long for the current bar
Here's a little User Tool to fix that:<?php
# rg_AuditTieAccidentals.php ver 1.0 13Mar2012 NWC2 User Tool
# Ref: http://my.noteworthysoftware.com/?topic=8118.0
require_once("lib/nwc2clips.inc");
$PlayContext = new NWC2PlayContext;
$clip = new NWC2Clip('php://stdin');
echo $clip->GetClipHeader(), PHP_EOL;
foreach ($clip->Items as $item) {
$o = new NWC2ClipItem($item, true);
if ($PlayContext->Ties) {
$o_new = clone $o;
foreach (array('Pos', 'Pos2') as $tag) {
$notes = $o->GetTaggedOptAsArray($tag, array());
foreach ($notes as &$pos) {
$npp = new NWC2NotePitchPos($pos);
if ($PlayContext->IsTieReceiver($npp)) {
$npp->Accidental = '';
$pos = $npp->ReconstructClipText();
}
}
if ($notes) $o_new->Opts[$tag] = join(',', $notes);
}
$item = $o_new->ReconstructClipText().PHP_EOL;
}
$PlayContext->UpdateContext($o);
echo $item;
}
echo NWC2_ENDCLIP, PHP_EOL;
?>