private static ListElement ConvertUSlotVisualsList(KeySwitch source) { var listOfUSlotVisuals = new ListElement(); foreach (var i in source.Articulations) { var type = ConvertArticulationType(i.ExtraData.GetValueOrDefault(ExtraDataKeys.ArticulationType, ExtraDataValue.Empty)); var group = ConvertArticulationGroup(i.ExtraData.GetValueOrDefault(ExtraDataKeys.GroupIndex, ExtraDataValue.Empty)); var slotVisual = USlotVisuals.New( i.ArticulationName.Value, i.ArticulationName.Value, 0, type, @group ); listOfUSlotVisuals.Obj.Add(slotVisual); } return(listOfUSlotVisuals); }
private static List <ObjectElement> ConvertSlotVisualList(IEnumerable <Articulation> articulations) { // PSoundSlot.sv var slotVisualList = new List <ObjectElement>(); foreach (var articulation in articulations) { var type = ConvertArticulationType(articulation.ExtraData.GetValueOrDefault(ExtraDataKeys.ArticulationType, ExtraDataValue.Empty)); var group = ConvertArticulationGroup(articulation.ExtraData.GetValueOrDefault(ExtraDataKeys.GroupIndex, ExtraDataValue.Empty)); slotVisualList.Add( USlotVisuals.New( articulation.ArticulationName.Value, articulation.ArticulationName.Value, 0, type, @group ) ); } return(slotVisualList); }