private void Transform(TrkDef section, Dictionary <string, int> msPositions, List <int> strandIndices) { List <int> strandDurations = GetStrandDurations(section, strandIndices); int extraTime = 750; int diff = extraTime / section.Count; for (int i = section.Count - 1; i > 0; --i) { if (strandIndices.Contains(i)) { RestDef umrd = new RestDef(section[i].MsPosition, strandDurations[strandIndices.IndexOf(i)] + extraTime); extraTime -= diff; section.Insert(i, umrd); } } section.StartMsPosition = msPositions["furies2FinaleStart"]; //double factor = 10; //section.AdjustMsDurations(factor); section.CreateAccel(0, section.Count, 0.25); //section.RemoveBetweenMsPositions(msPositions["interlude4End"], int.MaxValue); section.RemoveBetweenMsPositions(msPositions["finalWindChord"], int.MaxValue); if (section[section.Count - 1] is RestDef) { //section[section.Count - 1].MsDuration = msPositions["interlude4End"] - section[section.Count - 1].MsPosition; section[section.Count - 1].MsDuration = msPositions["endOfPiece"] - section[section.Count - 1].MsPosition; } }
private TrkDef GetF1FinalePart1(Palette palette, Krystal krystal, List <int> strandIndices, Dictionary <string, int> msPositions) { TrkDef f1FinalePart1 = palette.NewTrkDef(0, krystal); List <int> f1eStrandDurations = GetStrandDurations(f1FinalePart1, strandIndices); int extraTime = 1000; int diff = extraTime / f1FinalePart1.Count; for (int i = f1FinalePart1.Count - 1; i > 0; --i) { if (strandIndices.Contains(i)) { RestDef umrd = new RestDef(f1FinalePart1[i].MsPosition, f1eStrandDurations[strandIndices.IndexOf(i)] + extraTime); extraTime -= diff; f1FinalePart1.Insert(i, umrd); } } f1FinalePart1.StartMsPosition = msPositions["interlude3Bar2"]; f1FinalePart1.RemoveBetweenMsPositions(msPositions["verse4EsCaped"], int.MaxValue); if (f1FinalePart1[f1FinalePart1.Count - 1] is RestDef) { f1FinalePart1[f1FinalePart1.Count - 1].MsDuration = msPositions["verse4EsCaped"] - f1FinalePart1[f1FinalePart1.Count - 1].MsPosition; } return(f1FinalePart1); }
private TrkDef GetF1FinalePart2(Palette f1FinalePalette2, Krystal krystal, List <int> strandIndices, Dictionary <string, int> msPositions) { TrkDef f1FinalePart2 = f1FinalePalette2.NewTrkDef(this.MidiChannel, krystal); List <int> f1eStrandDurations = GetStrandDurations(f1FinalePart2, strandIndices); int extraTime = 500; int diff = extraTime / f1FinalePart2.Count; for (int i = f1FinalePart2.Count - 1; i > 0; --i) { if (strandIndices.Contains(i)) { RestDef umrd = new RestDef(f1FinalePart2[i].MsPosition, f1eStrandDurations[strandIndices.IndexOf(i)] + extraTime); extraTime -= diff; f1FinalePart2.Insert(i, umrd); } } f1FinalePart2.StartMsPosition = msPositions["verse4EsCaped"]; f1FinalePart2.RemoveBetweenMsPositions(msPositions["verse5Calls"], int.MaxValue); if (f1FinalePart2[f1FinalePart2.Count - 1] is RestDef) { f1FinalePart2[f1FinalePart2.Count - 1].MsDuration = msPositions["postlude"] - f1FinalePart2[f1FinalePart2.Count - 1].MsPosition; } return(f1FinalePart2); }
private TrkDef GetF1Postlude(Palette f1PostludePalette, Krystal krystal, List <int> strandIndices, Dictionary <string, int> msPositions) { TrkDef f1p = f1PostludePalette.NewTrkDef(this.MidiChannel, krystal); List <int> f1eStrandDurations = GetStrandDurations(f1p, strandIndices); for (int i = f1p.Count - 1; i > 0; --i) { if (strandIndices.Contains(i)) { RestDef umrd = new RestDef(f1p[i].MsPosition, f1eStrandDurations[strandIndices.IndexOf(i)] / 4); f1p.Insert(i, umrd); } } f1p.StartMsPosition = msPositions["postlude"]; f1p.RemoveBetweenMsPositions(msPositions["endOfPiece"], int.MaxValue); return(f1p); }
private void Transform(TrkDef section, Dictionary<string, int> msPositions, List<int> strandIndices) { List<int> strandDurations = GetStrandDurations(section, strandIndices); int extraTime = 750; int diff = extraTime / section.Count; for(int i = section.Count - 1; i > 0; --i) { if(strandIndices.Contains(i)) { RestDef umrd = new RestDef(section[i].MsPosition, strandDurations[strandIndices.IndexOf(i)] + extraTime); extraTime -= diff; section.Insert(i, umrd); } } section.StartMsPosition = msPositions["furies2FinaleStart"]; //double factor = 10; //section.AdjustMsDurations(factor); section.CreateAccel(0, section.Count, 0.25); //section.RemoveBetweenMsPositions(msPositions["interlude4End"], int.MaxValue); section.RemoveBetweenMsPositions(msPositions["finalWindChord"], int.MaxValue); if(section[section.Count - 1] is RestDef) { //section[section.Count - 1].MsDuration = msPositions["interlude4End"] - section[section.Count - 1].MsPosition; section[section.Count - 1].MsDuration = msPositions["endOfPiece"] - section[section.Count - 1].MsPosition; } }