public string CreateDefaultToneMap(MyMMLSequence mml, out List <object> toneSet, out Dictionary <int, int> toneMap) { toneSet = new List <object>(); toneMap = new Dictionary <int, int>(); if ((mml == null) || (Synthesizer == null)) { return("Failed: CreateDefaultToneMap()"); } for (var i = 0; i < mml.ToneData.Count; i++) { object tone = Synthesizer.CreateToneObject(mml.ToneData[i]); //tone = new MySpace.Synthesizer.PM8.ToneParam(); // dummy tone if (tone != null) { toneMap.Add(i, toneSet.Count); toneSet.Add(tone); } else { return("Failed: CreateDefaultToneMap(): toneData[" + mml.ToneName[i] + "] :" + mml.ToneData[i]); } } return(null); }