foreach ($clip->Items as $item) { $o = new NWC2ClipItem($item); // // If this is a non-grace chord and is not preceded by a grace note, // and it is larger than an 8th note in duration, then add a grace note arpeggio if (($o->GetObjType() == "Chord") && !isset($o->Opts["Dur"]["Grace"]) && (count(array_intersect(array_keys($o->Opts["Dur"]),array("Whole","Half","4th"))) > 0) && !isset($priorNoteObj->Opts["Dur"]["Grace"])) { $chordnotes = $o->GetTaggedOpt("Pos"); $chorddur = $o->GetTaggedOpt("Dur");