private static ListElement ConvertPSoundSlotList(IReadOnlyDictionary <string, ICollection <Articulation> > slotTable) { var listOfPSoundSlot = new ListElement(); foreach (var pair in slotTable) { var slotName = pair.Key; // PSoundSlot // PSoundSlot.name var pSoundSlot = ConvertPSoundSlot(slotName); // PSoundSlot -> PSlotMidiAction -> POutputEvent var listOfPOutputEvent = ConvertPOutputEventList(pair.Value); // PSoundSlot -> PSlotMidiAction pSoundSlot.Obj.Add(PSlotMidiAction.New(listOfPOutputEvent)); // PSoundSlot.sv var slotVisualList = ConvertSlotVisualList(pair.Value); pSoundSlot.Member.Add(PSoundSlot.Sv(slotVisualList)); // PSoundSlot.color pSoundSlot.Int.Add(new IntElement("color", 0)); // Aggregate listOfPSoundSlot.Obj.Add(pSoundSlot); } return(listOfPSoundSlot); }
private static ObjectElement ConvertPSoundSlot(string slotName) { // PSoundSlot // PSoundSlot.name var pSoundSlot = PSoundSlot.New(slotName); // PSoundSlot.PSlotThruTrigger pSoundSlot.Obj.Add(PSlotThruTrigger.New()); return(pSoundSlot); }