GetClipHeader()."\n"; foreach ($clip->Items as $item) { $o = new NWC2ClipItem($item); if (($o->GetObjType()=="Note")||($o->GetObjType()=="Chord")) { $opts = $o->GetOpts(); $pos = $opts["Pos"]; if (is_array($pos)) { for ($i=0; $iAccidental=="#") { $n->Accidental="b"; $n->Position++; $pos[$i]=$n->ReconstructClipText(); unset($n); } } } else { $n = new NWC2NotePitchPos($pos); if ($n->Accidental=="#") { $n->Accidental="b"; $n->Position++; $pos=$n->ReconstructClipText(); unset($n); } } $o->Opts["Pos"] = $pos; } elseif ($o->GetObjType()=="RestChord") { $opts = $o->GetOpts(); $pos = $opts["Pos2"]; if (is_array($pos)) { for ($i=0; $iAccidental=="#") { $n->Accidental="b"; $n->Position++; $pos[$i]=$n->ReconstructClipText(); unset($n); } } } else { $n = new NWC2NotePitchPos($pos); if ($n->Accidental=="#") { $n->Accidental="b"; $n->Position++; $pos=$n->ReconstructClipText(); unset($n); } } $o->Opts["Pos2"] = $pos; } else { // just echo the item unchanged } echo $o->ReconstructClipText()."\n"; } echo NWC2_ENDCLIP."\n"; exit(NWC2RC_SUCCESS); // exit(NWC2RC_REPORT); // alternative for debugging ?>