/// <summary>
        /// The arguments are all complete to the end of Verse 3
        /// </summary>
        private void GetFuriesInterlude3ToEnd(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4,
            Clytemnestra clytemnestra, Trk wind1, Trk wind2, Trk wind3, List<Palette> palettes,
            Dictionary<string, int> msPositions)
        {
            furies1.GetFinale(palettes, msPositions, _krystals[9]); // _krystals[9] is xk3(12.12.1)-1.krys
            furies1.AdjustAlignments(clytemnestra, wind2, wind3);
            furies1.AdjustVelocities(msPositions);

            msPositions.Add("furies2FinaleStart", furies1[47].MsPositionReTrk);
            msPositions.Add("furies2FinalePart2Start", wind1[54].MsPositionReTrk);
            msPositions.Add("finalBar", furies1[280].MsPositionReTrk);

            furies4.GetFinale(palettes, msPositions, _krystals[9]); // _krystals[9] is xk3(12.12.1)-1.krys
            furies4.AdjustAlignments(furies1, clytemnestra, wind3);
            furies4.AdjustVelocities(msPositions);

            furies2.GetFinale(palettes, msPositions, _krystals[10]); // _krystals[10] is xk4(12.12.1)-1.krys
            furies2.AdjustAlignments(furies1, furies4, clytemnestra);
            furies2.AdjustVelocities(msPositions);

            msPositions.Add("furies3FinaleStart", furies2[66].MsPositionReTrk);

            furies3.GetFinale(palettes, msPositions, _krystals[10]); // _krystals[10] is xk4(12.12.1)-1.krys
            furies3.AdjustAlignments(furies1, furies2, furies4, clytemnestra, wind1);
            furies3.AdjustVelocities(msPositions);

            AdjustPostludePans(furies1, furies2, furies3, furies4, msPositions["postlude"]);
            SetFuriesFinalePitches(furies1, furies2, furies3, furies4, msPositions);
        }
Beispiel #2
0
        /// <summary>
        /// The arguments are all complete to the end of Verse 3
        /// </summary>
        private void GetFuriesInterlude3ToEnd(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4,
                                              Clytemnestra clytemnestra, TrkDef wind1, TrkDef wind2, TrkDef wind3, List <Palette> palettes,
                                              Dictionary <string, int> msPositions)
        {
            furies1.GetFinale(palettes, msPositions, _krystals[9]); // _krystals[9] is xk3(12.12.1)-1.krys
            furies1.AdjustAlignments(clytemnestra, wind2, wind3);
            furies1.AdjustVelocities(msPositions);

            msPositions.Add("furies2FinaleStart", furies1[47].MsPosition);
            msPositions.Add("furies2FinalePart2Start", wind1[54].MsPosition);
            msPositions.Add("finalBar", furies1[280].MsPosition);

            furies4.GetFinale(palettes, msPositions, _krystals[9]); // _krystals[9] is xk3(12.12.1)-1.krys
            furies4.AdjustAlignments(furies1, clytemnestra, wind3);
            furies4.AdjustVelocities(msPositions);

            furies2.GetFinale(palettes, msPositions, _krystals[10]); // _krystals[10] is xk4(12.12.1)-1.krys
            furies2.AdjustAlignments(furies1, furies4, clytemnestra);
            furies2.AdjustVelocities(msPositions);

            msPositions.Add("furies3FinaleStart", furies2[66].MsPosition);

            furies3.GetFinale(palettes, msPositions, _krystals[10]); // _krystals[10] is xk4(12.12.1)-1.krys
            furies3.AdjustAlignments(furies1, furies2, furies4, clytemnestra, wind1);
            furies3.AdjustVelocities(msPositions);

            AdjustPostludePans(furies1, furies2, furies3, furies4, msPositions["postlude"]);
            SetFuriesFinalePitches(furies1, furies2, furies3, furies4, msPositions);
        }
Beispiel #3
0
        internal void AdjustAlignments(Furies1 f1, Furies2 f2, Furies4 f4, Clytemnestra c, Trk wind1)
        {
            AlignObjectAtIndex(147, 150, 158, f1[56].MsPositionReTrk);
            AlignObjectAtIndex(150, 158, 170, f1[61].MsPositionReTrk);
            AlignObjectAtIndex(158, 170, 175, c[174].MsPositionReTrk);
            AlignObjectAtIndex(170, 176, 183, c[184].MsPositionReTrk);
            AlignObjectAtIndex(175, 183, 212, c[196].MsPositionReTrk);
            AlignObjectAtIndex(183, 212, 217, c[242].MsPositionReTrk);
            AlignObjectAtIndex(212, 217, 218, c[254].MsPositionReTrk);
            AlignObjectAtIndex(217, 218, 224, c[259].MsPositionReTrk);
            AlignObjectAtIndex(218, 224, 290, wind1[57].MsPositionReTrk);
            AlignObjectAtIndex(224, 290, 296, f4[49].MsPositionReTrk);
            AlignObjectAtIndex(290, 296, 318, wind1[66].MsPositionReTrk);
            AlignObjectAtIndex(296, 318, 344, f4[53].MsPositionReTrk);
            AlignObjectAtIndex(318, 344, 350, c[283].MsPositionReTrk);
            AlignObjectAtIndex(344, 350, 353, c[287].MsPositionReTrk);
            AlignObjectAtIndex(350, 353, 354, c[288].MsPositionReTrk - 200);
            AlignObjectAtIndex(353, 354, 390, f4[59].MsPositionReTrk);
            AlignObjectAtIndex(354, 390, 401, f4[69].MsPositionReTrk);

            // final adjustments for R2M
            AlignObjectAtIndex(139, 140, 141, c[119].MsPositionReTrk - 200);

            AlignObjectAtIndex(141, 142, 143, c[140].MsPositionReTrk - 100);

            AlignObjectAtIndex(143, 144, 145, c[152].MsPositionReTrk - 200);
            AlignObjectAtIndex(145, 146, 147, c[173].MsPositionReTrk - 200);
            AlignObjectAtIndex(146, 147, 152, f2[64].MsPositionReTrk);

            AlignObjectAtIndex(147, 151, 152, f1[56].MsPositionReTrk - 100);

            AlignObjectAtIndex(152, 159, 160, f1[61].MsPositionReTrk - 100);

            AlignObjectAtIndex(160, 171, 172, c[174].MsPositionReTrk - 600);
            AlignObjectAtIndex(172, 176, 177, c[184].MsPositionReTrk - 200);
            AlignObjectAtIndex(212, 217, 218, c[254].MsPositionReTrk - 200);
            AlignObjectAtIndex(275, 291, 292, f4[49].MsPositionReTrk - 200);

            // example code from furies2
            //AlignObjectAtIndex(58, 85, 100, f1[73].MsPosition);
            //AlignObjectAtIndex(85, 100, 106, c[204].MsPosition);
            //AlignObjectAtIndex(100, 106, 125, c[216].MsPosition);
            //AlignObjectAtIndex(106, 125, 129, c[255].MsPosition);
            //AlignObjectAtIndex(125, 129, 131, f1[115].MsPosition);
            //AlignObjectAtIndex(129, 131, 135, c[268].MsPosition);
            //AlignObjectAtIndex(131, 135, 141, f1[122].MsPosition);
            //AlignObjectAtIndex(135, 141, 157, f1[123].MsPosition);
            //AlignObjectAtIndex(141, 157, 164, f1[138].MsPosition);
            //AlignObjectAtIndex(157, 164, 169, f4[46].MsPosition);
            //AlignObjectAtIndex(164, 169, 214, f4[47].MsPosition);
            //AlignObjectAtIndex(169, 214, 217, c[269].MsPosition);
            //AlignObjectAtIndex(214, 217, 219, c[277].MsPosition);
            //AlignObjectAtIndex(217, 219, 229, c[278].MsPosition);
            //AlignObjectAtIndex(219, 229, 232, c[287].MsPosition);
            //AlignObjectAtIndex(229, 232, 233, c[288].MsPosition);
            //AlignObjectAtIndex(232, 233, 256, c[289].MsPosition);
            //AlignObjectAtIndex(233, 256, this.Count - 2, f1[248].MsPosition);
        }
Beispiel #4
0
 /// <summary>
 /// Note that clef changes must be inserted backwards per voiceDef, so that IUniqueMidiDurationDef
 /// indices are correct. Inserting a clef change changes the indices.
 /// Note also that if a ClefChange is defined here on a UniqueMidiRestDef which has no MidiChordDef
 /// to its right on the staff, the resulting ClefSymbol will be placed immediately before the final barline
 /// on the staff.
 /// ClefChanges which would happen at the beginning of a staff are written as cautionary clefs on the
 /// equivalent staff in the previous system.
 /// A ClefChange defined here on a MidiChordDef or UniqueMidiRestDef which is eventually preceded
 /// by a barline, are placed to the left of the barline.
 /// </summary>
 private void InsertClefChanges(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4)
 {
     furies1.InsertClefChange(24, "t1");  // bar 60
     furies2.InsertClefChange(57, "t1");  // bar 60
     furies3.InsertClefChange(146, "t1"); // bar 60
     furies3.InsertClefChange(131, "b");  // bar 44
     furies3.InsertClefChange(114, "b1"); // bar 43
     furies3.InsertClefChange(112, "b");  // bar 43
     furies4.InsertClefChange(59, "b1");  // bar 104
 }
        private void SetFuriesFinalePitches(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4, 
            Dictionary<string, int> msPositions)
        {
            Dictionary<int, int> msPosTranspositionDict = furies4.SetFinalMelody(_krystals[11], _krystals[12]);
            // _krystals[11] is pk3(7)-1.krys
            // _krystals[12] is pk3(12)-1.krys

            furies1.TransposeToDict(msPosTranspositionDict);
            furies2.TransposeToDict(msPosTranspositionDict);
            furies3.TransposeToDict(msPosTranspositionDict);
        }
        private void AdjustPostludePans(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4, int postludeMsPosition)
        {
            double posDiff = ((double)(furies1.EndMsPosition - postludeMsPosition)) / 4;
            int postludeMsPosition1 = postludeMsPosition + (int)posDiff;
            int postludeMsPosition2 = postludeMsPosition + (int)(posDiff * 2);
            int postludeMsPosition3 = postludeMsPosition + (int)(posDiff * 3);

            furies1.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies2.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies3.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies4.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
        }
Beispiel #7
0
        private void SetFuriesFinalePitches(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4,
                                            Dictionary <string, int> msPositions)
        {
            Dictionary <int, int> msPosTranspositionDict = furies4.SetFinalMelody(_krystals[11], _krystals[12]);

            // _krystals[11] is pk3(7)-1.krys
            // _krystals[12] is pk3(12)-1.krys

            furies1.TransposeToDict(msPosTranspositionDict);
            furies2.TransposeToDict(msPosTranspositionDict);
            furies3.TransposeToDict(msPosTranspositionDict);
        }
Beispiel #8
0
        private void AdjustPostludePans(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4, int postludeMsPosition)
        {
            double posDiff             = ((double)(furies1.EndMsPosition - postludeMsPosition)) / 4;
            int    postludeMsPosition1 = postludeMsPosition + (int)posDiff;
            int    postludeMsPosition2 = postludeMsPosition + (int)(posDiff * 2);
            int    postludeMsPosition3 = postludeMsPosition + (int)(posDiff * 3);

            furies1.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies2.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies3.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
            furies4.AdjustPostludePan(postludeMsPosition, postludeMsPosition1, postludeMsPosition2, postludeMsPosition3);
        }
Beispiel #9
0
        internal void AdjustAlignments(Furies1 f1, Furies2 f2, Furies4 f4, Clytemnestra c, TrkDef wind1)
        {
            AlignObjectAtIndex(147, 150, 158, f1[56].MsPosition);
            AlignObjectAtIndex(150, 158, 170, f1[61].MsPosition);
            AlignObjectAtIndex(158, 170, 175, c[174].MsPosition);
            AlignObjectAtIndex(170, 176, 183, c[184].MsPosition);
            AlignObjectAtIndex(175, 183, 212, c[196].MsPosition);
            AlignObjectAtIndex(183, 212, 217, c[242].MsPosition);
            AlignObjectAtIndex(212, 217, 218, c[254].MsPosition);
            AlignObjectAtIndex(217, 218, 224, c[259].MsPosition);
            AlignObjectAtIndex(218, 224, 290, wind1[57].MsPosition);
            AlignObjectAtIndex(224, 290, 296, f4[49].MsPosition);
            AlignObjectAtIndex(290, 296, 318, wind1[66].MsPosition);
            AlignObjectAtIndex(296, 318, 344, f4[53].MsPosition);
            AlignObjectAtIndex(318, 344, 350, c[283].MsPosition);
            AlignObjectAtIndex(344, 350, 353, c[287].MsPosition);
            AlignObjectAtIndex(350, 353, 354, c[288].MsPosition - 200);
            AlignObjectAtIndex(353, 354, 390, f4[59].MsPosition);
            AlignObjectAtIndex(354, 390, 401, f4[69].MsPosition);

            // final adjustments for R2M
            AlignObjectAtIndex(139, 140, 141, c[119].MsPosition - 200);

            AlignObjectAtIndex(141, 142, 143, c[140].MsPosition - 100);


            AlignObjectAtIndex(143, 144, 145, c[152].MsPosition - 200);
            AlignObjectAtIndex(145, 146, 147, c[173].MsPosition - 200);
            AlignObjectAtIndex(146, 147, 152, f2[64].MsPosition);

            AlignObjectAtIndex(147, 151, 152, f1[56].MsPosition - 100);

            AlignObjectAtIndex(152, 159, 160, f1[61].MsPosition - 100);

            AlignObjectAtIndex(160, 171, 172, c[174].MsPosition - 600);
            AlignObjectAtIndex(172, 176, 177, c[184].MsPosition - 200);
            AlignObjectAtIndex(212, 217, 218, c[254].MsPosition - 200);
            AlignObjectAtIndex(275, 291, 292, f4[49].MsPosition - 200);



            // example code from furies2
            //AlignObjectAtIndex(58, 85, 100, f1[73].MsPosition);
            //AlignObjectAtIndex(85, 100, 106, c[204].MsPosition);
            //AlignObjectAtIndex(100, 106, 125, c[216].MsPosition);
            //AlignObjectAtIndex(106, 125, 129, c[255].MsPosition);
            //AlignObjectAtIndex(125, 129, 131, f1[115].MsPosition);
            //AlignObjectAtIndex(129, 131, 135, c[268].MsPosition);
            //AlignObjectAtIndex(131, 135, 141, f1[122].MsPosition);
            //AlignObjectAtIndex(135, 141, 157, f1[123].MsPosition);
            //AlignObjectAtIndex(141, 157, 164, f1[138].MsPosition);
            //AlignObjectAtIndex(157, 164, 169, f4[46].MsPosition);
            //AlignObjectAtIndex(164, 169, 214, f4[47].MsPosition);
            //AlignObjectAtIndex(169, 214, 217, c[269].MsPosition);
            //AlignObjectAtIndex(214, 217, 219, c[277].MsPosition);
            //AlignObjectAtIndex(217, 219, 229, c[278].MsPosition);
            //AlignObjectAtIndex(219, 229, 232, c[287].MsPosition);
            //AlignObjectAtIndex(229, 232, 233, c[288].MsPosition);
            //AlignObjectAtIndex(232, 233, 256, c[289].MsPosition);
            //AlignObjectAtIndex(233, 256, this.Count - 2, f1[248].MsPosition);
        }
Beispiel #10
0
        /// <summary>
        /// See CompositionAlgorithm.DoAlgorithm()
        /// </summary>
        public override List<List<VoiceDef>> DoAlgorithm(List<Krystal> krystals, List<Palette> palettes)
        {
            // Palette indices:
            // Winds use palette 0.
            // Furies use:
            //                       Interlude
            //         Prelude   1    2    3    4   Postlude
            //         ------------------------------------------
            // Furies1    -      -    8   12   16      20
            // Furies2    -      4    7   11   15      19
            // Furies3    -      2    6   10   14      18
            // Furies4    1      3    5    9   13      17
            // All palettes can be accessed here at _paletteDefs[ paletteIndex ].
            // The wind3 is the lowest wind. The winds are numbered from top to bottom in the score.

            _krystals = krystals;
            _palettes = palettes;
            TrkDef wind3 = GetWind3(7,_palettes[0], _krystals[8]);
            Clytemnestra clytemnestra = new Clytemnestra(4, wind3);
            clytemnestra.AdjustVelocities(49, 59, 1.4);
            TrkDef wind2 = GetWind2(6, wind3, clytemnestra);
            TrkDef wind1 = GetWind1(5, wind3, wind2, clytemnestra);
            AdjustFinalWindChordPosition(wind1, wind2, wind3); // "fermata"
            // WindPitchWheelDeviations change approximately per section in Song Six
            AdjustWindPitchWheelDeviations(wind1);
            AdjustWindPitchWheelDeviations(wind2);
            AdjustWindPitchWheelDeviations(wind3);
            AdjustWindVelocities(wind1, wind2, wind3);
            Dictionary<string, int> msPositions = new Dictionary<string, int>();
            msPositions.Add("verse1", clytemnestra[1].MsPosition);
            msPositions.Add("interlude1", wind1[15].MsPosition);
            msPositions.Add("verse2", clytemnestra[60].MsPosition);
            msPositions.Add("interlude2", wind1[25].MsPosition);
            msPositions.Add("verse3", clytemnestra[117].MsPosition);
            msPositions.Add("interlude3", wind1[38].MsPosition);
            msPositions.Add("interlude3Bar2", wind3[40].MsPosition);
            msPositions.Add("verse4", clytemnestra[174].MsPosition);
            msPositions.Add("verse4EsCaped", clytemnestra[236].MsPosition);
            msPositions.Add("interlude4", wind1[57].MsPosition);
            msPositions.Add("interlude4End", wind3[65].MsPosition);
            msPositions.Add("verse5", clytemnestra[269].MsPosition);
            msPositions.Add("verse5Calls", clytemnestra[288].MsPosition);
            msPositions.Add("postlude", clytemnestra[289].MsPosition);
            msPositions.Add("postludeDiminuendo", wind1[80].MsPosition);
            msPositions.Add("finalWindChord", wind1[81].MsPosition);
            msPositions.Add("endOfPiece", wind1.EndMsPosition);
            // other positions are added as the voices are completed (see GetFuriesInterlude3ToEnd() )
            // contouring test code
            //wind1.SetContour(2, new List<int>() { 1, 1, 1 }, 12, 1);
            // Construct the Furies up to Interlude3.
            Furies4 furies4 = new Furies4(3, msPositions["endOfPiece"]);
            furies4.GetBeforeInterlude3(wind3[0].MsDuration / 2, clytemnestra, wind1, _palettes);
            Furies3 furies3 = new Furies3(2, msPositions["endOfPiece"]);
            furies3.GetBeforeInterlude3(msPositions["interlude1"], clytemnestra, wind1, _palettes);
            Furies2 furies2 = new Furies2(1, msPositions["endOfPiece"]);
            furies2.GetBeforeInterlude3(clytemnestra, wind1, furies3, _palettes);
            Furies1 furies1 = new Furies1(0, msPositions["endOfPiece"]);
            furies1.GetBeforeInterlude3(clytemnestra, wind1, furies2, _palettes[8]);
            furies3.GetChirpsInInterlude2AndVerse3(furies1, furies2, clytemnestra, wind1, _palettes[6]);
            GetFuriesInterlude3ToEnd(furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3, _palettes, msPositions);
            // contouring test code
            // fury1.SetContour(1, new List<int>(){2,2,2,2,2}, 1, 6);

            // Add each voiceDef to voiceDefs here, in top to bottom (=channelIndex) order in the score.
            List<VoiceDef> voiceDefs = new List<VoiceDef>() { furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3 };
            Debug.Assert(voiceDefs.Count == MidiChannelIndexPerOutputVoice.Count);
            //********************************************************
            //foreach(VoiceDef voiceDef in voiceDefs)
            //{
            //    voiceDef.SetLyricsToIndex();
            //}
            //********************************************************
            List<int> barlineMsPositions = GetBarlineMsPositions(furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3);
            InsertClefChanges(furies1, furies2, furies3, furies4);
            List<List<VoiceDef>> bars = GetBars(voiceDefs, barlineMsPositions);
            base.SetOutputVoiceChannelsAndMasterVolumes(bars[0]);
            return bars;
        }
Beispiel #11
0
 /// <summary>
 /// Note that clef changes must be inserted backwards per voiceDef, so that IUniqueMidiDurationDef
 /// indices are correct. Inserting a clef change changes the indices.
 /// Note also that if a ClefChange is defined here on a UniqueMidiRestDef which has no MidiChordDef
 /// to its right on the staff, the resulting ClefSymbol will be placed immediately before the final barline
 /// on the staff.
 /// ClefChanges which would happen at the beginning of a staff are written as cautionary clefs on the
 /// equivalent staff in the previous system.
 /// A ClefChange defined here on a MidiChordDef or UniqueMidiRestDef which is eventually preceded
 /// by a barline, are placed to the left of the barline. 
 /// </summary>
 private void InsertClefChanges(Furies1 furies1, Furies2 furies2, Furies3 furies3, Furies4 furies4)
 {
     furies1.InsertClefChange(24, "t1"); // bar 60
     furies2.InsertClefChange(57, "t1"); // bar 60
     furies3.InsertClefChange(146, "t1"); // bar 60
     furies3.InsertClefChange(131, "b");  // bar 44
     furies3.InsertClefChange(114, "b1"); // bar 43
     furies3.InsertClefChange(112, "b");  // bar 43
     furies4.InsertClefChange(59, "b1"); // bar 104
 }
Beispiel #12
0
        /// <summary>
        /// See CompositionAlgorithm.DoAlgorithm()
        /// </summary>
        public override List <List <VoiceDef> > DoAlgorithm(List <Krystal> krystals, List <Palette> palettes)
        {
            // Palette indices:
            // Winds use palette 0.
            // Furies use:
            //                       Interlude
            //         Prelude   1    2    3    4   Postlude
            //         ------------------------------------------
            // Furies1    -      -    8   12   16      20
            // Furies2    -      4    7   11   15      19
            // Furies3    -      2    6   10   14      18
            // Furies4    1      3    5    9   13      17
            // All palettes can be accessed here at _paletteDefs[ paletteIndex ].
            // The wind3 is the lowest wind. The winds are numbered from top to bottom in the score.

            _krystals = krystals;
            _palettes = palettes;
            TrkDef       wind3        = GetWind3(7, _palettes[0], _krystals[8]);
            Clytemnestra clytemnestra = new Clytemnestra(4, wind3);

            clytemnestra.AdjustVelocities(49, 59, 1.4);
            TrkDef wind2 = GetWind2(6, wind3, clytemnestra);
            TrkDef wind1 = GetWind1(5, wind3, wind2, clytemnestra);

            AdjustFinalWindChordPosition(wind1, wind2, wind3); // "fermata"
            // WindPitchWheelDeviations change approximately per section in Song Six
            AdjustWindPitchWheelDeviations(wind1);
            AdjustWindPitchWheelDeviations(wind2);
            AdjustWindPitchWheelDeviations(wind3);
            AdjustWindVelocities(wind1, wind2, wind3);
            Dictionary <string, int> msPositions = new Dictionary <string, int>();

            msPositions.Add("verse1", clytemnestra[1].MsPosition);
            msPositions.Add("interlude1", wind1[15].MsPosition);
            msPositions.Add("verse2", clytemnestra[60].MsPosition);
            msPositions.Add("interlude2", wind1[25].MsPosition);
            msPositions.Add("verse3", clytemnestra[117].MsPosition);
            msPositions.Add("interlude3", wind1[38].MsPosition);
            msPositions.Add("interlude3Bar2", wind3[40].MsPosition);
            msPositions.Add("verse4", clytemnestra[174].MsPosition);
            msPositions.Add("verse4EsCaped", clytemnestra[236].MsPosition);
            msPositions.Add("interlude4", wind1[57].MsPosition);
            msPositions.Add("interlude4End", wind3[65].MsPosition);
            msPositions.Add("verse5", clytemnestra[269].MsPosition);
            msPositions.Add("verse5Calls", clytemnestra[288].MsPosition);
            msPositions.Add("postlude", clytemnestra[289].MsPosition);
            msPositions.Add("postludeDiminuendo", wind1[80].MsPosition);
            msPositions.Add("finalWindChord", wind1[81].MsPosition);
            msPositions.Add("endOfPiece", wind1.EndMsPosition);
            // other positions are added as the voices are completed (see GetFuriesInterlude3ToEnd() )
            // contouring test code
            //wind1.SetContour(2, new List<int>() { 1, 1, 1 }, 12, 1);
            // Construct the Furies up to Interlude3.
            Furies4 furies4 = new Furies4(3, msPositions["endOfPiece"]);

            furies4.GetBeforeInterlude3(wind3[0].MsDuration / 2, clytemnestra, wind1, _palettes);
            Furies3 furies3 = new Furies3(2, msPositions["endOfPiece"]);

            furies3.GetBeforeInterlude3(msPositions["interlude1"], clytemnestra, wind1, _palettes);
            Furies2 furies2 = new Furies2(1, msPositions["endOfPiece"]);

            furies2.GetBeforeInterlude3(clytemnestra, wind1, furies3, _palettes);
            Furies1 furies1 = new Furies1(0, msPositions["endOfPiece"]);

            furies1.GetBeforeInterlude3(clytemnestra, wind1, furies2, _palettes[8]);
            furies3.GetChirpsInInterlude2AndVerse3(furies1, furies2, clytemnestra, wind1, _palettes[6]);
            GetFuriesInterlude3ToEnd(furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3, _palettes, msPositions);
            // contouring test code
            // fury1.SetContour(1, new List<int>(){2,2,2,2,2}, 1, 6);

            // Add each voiceDef to voiceDefs here, in top to bottom (=channelIndex) order in the score.
            List <VoiceDef> voiceDefs = new List <VoiceDef>()
            {
                furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3
            };

            Debug.Assert(voiceDefs.Count == MidiChannelIndexPerOutputVoice.Count);
            //********************************************************
            //foreach(VoiceDef voiceDef in voiceDefs)
            //{
            //    voiceDef.SetLyricsToIndex();
            //}
            //********************************************************
            List <int> barlineMsPositions = GetBarlineMsPositions(furies1, furies2, furies3, furies4, clytemnestra, wind1, wind2, wind3);

            InsertClefChanges(furies1, furies2, furies3, furies4);
            List <List <VoiceDef> > bars = GetBars(voiceDefs, barlineMsPositions);

            base.SetOutputVoiceChannelsAndMasterVolumes(bars[0]);
            return(bars);
        }