unset($PlayContext); $PlayContext = new NWC2PlayContext(); $HiddenStaff = false; gzwrite($zout, $l); continue; } if (preg_match('/^\\|StaffProperties\\|/', $l) && preg_match('/\\|Visible:\\s*([Y,N])/', $l, $m)) { $HiddenStaff = $m[1] == "N"; } if ($HiddenStaff) { gzwrite($zout, $l); continue; } $o = new NWC2ClipItemWithPitchPos($l, !$FileMode); if (!$FileMode && $o->IsContextInfo()) { $PlayContext->UpdateContext($o); continue; } if (in_array($o->GetObjType(), $ObjectsWithNotes)) { $stemDir = CalcMainStemDir($o); $ischanged = false; foreach ($AllNotePosTags as $pos_tag) { if (empty($o->PitchPos[$pos_tag])) { continue; } $PitchPos =& $o->PitchPos[$pos_tag]; $tagStemDir = $pos_tag == "Pos" ? $stemDir : ($stemDir + 1) % 2; $weakSideStemPositions = array(); $numNotes = count($PitchPos); $priornpp = false; if ($tagStemDir == STEM_LEFT) {