GetClipHeader()."\n"; foreach ($clip->Items as $item) { $o = new NWC2ClipItem($item,true); if ($o->GetObjType() == "Note" && ($t =& $o->GetTaggedOpt("Pos"))) { // parse the pos option string if (preg_match('/^([\#bnxv]{0,1})(\-{0,1}[0-9]+)([oxXz]{0,1})(\^{0,1})(\!{0,1}[0-9]{0,1})/',$t,$m)) { //modify the note positions while ($m[2]>13) { $m[2]=$m[2]-7; //reduce by 7s until crtieria reached } while ($m[2]<-6) { $m[2]=$m[2]+7; //increase by 7s until crtieria reached } } // end or pregmatch $t=$m; } echo $o->ReconstructClipText()."\n"; unset($o); } echo NWC2_ENDCLIP."\n"; exit ($final_exit_value) ; ?>