Example #1
0
        internal void GetChirpsInInterlude2AndVerse3(TrkDef furies1, TrkDef furies2, Clytemnestra clytemnestra, TrkDef wind1, Palette chirpsPalette)
        {
            int[] chirpIndices   = { 4, 8, 2, 6, 10, 0 };
            int[] transpositions = { 2, 1, 3, 0, 4, 5 };
            //double[] velocityfactors = { 0.3, 0.31, 0.32, 0.34, 0.35, 0.36, 0.37, 0.39, 0.4, 0.42, 0.43, 0.45 };
            double[] velocityfactors = { 0.32, 0.34, 0.36, 0.38, 0.40, 0.42 };
            int[]    msPositions     =
            {
                this[112].MsPosition + 200,
                this[129].MsPosition + 500,
                clytemnestra[118].MsPosition,
                clytemnestra[138].MsPosition + 250,
                clytemnestra[151].MsPosition,
                furies2[57].MsPosition
            };
            for (int i = 5; i >= 0; --i)
            {
                MidiChordDef cheep = chirpsPalette.MidiChordDef(chirpIndices[i]);
                cheep.MsPosition = msPositions[i];
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(25, 30, 31, clytemnestra[65].MsPosition);
            AlignObjectAtIndex(140, 141, 142, clytemnestra[119].MsPosition);
            AlignObjectAtIndex(142, 143, 144, clytemnestra[140].MsPosition);
            AlignObjectAtIndex(144, 145, 146, clytemnestra[152].MsPosition);
            AlignObjectAtIndex(146, 147, 148, furies1[23].MsPosition);

            AgglomerateRestOrChordAt(114);
        }
Example #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);
        }
Example #3
0
        internal void AdjustAlignments(Clytemnestra c, TrkDef w2, TrkDef w3)
        {
            Debug.Assert(this[213] is RestDef);
            this[213].MsDuration += this[212].MsDuration;
            RemoveAt(212);
            AgglomerateRests();

            AlignObjectAtIndex(25, 84, 85, c[196].MsPosition);
            AlignObjectAtIndex(84, 85, 89, c[204].MsPosition + 200);
            AlignObjectAtIndex(85, 89, 96, c[215].MsPosition);
            AlignObjectAtIndex(89, 96, 102, c[226].MsPosition);
            AlignObjectAtIndex(102, 106, 117, c[242].MsPosition);
            AlignObjectAtIndex(106, 117, 140, c[268].MsPosition);
            AlignObjectAtIndex(117, 140, 165, w3[61].MsPosition);
            AlignObjectAtIndex(140, 165, 197, w2[65].MsPosition); // was AlignObjectAtIndex(140, 163, 197, wind3[65].MsPosition);
            AlignObjectAtIndex(165, 197, 200, c[269].MsPosition - 200);
            AlignObjectAtIndex(197, 200, 206, c[277].MsPosition);
            AlignObjectAtIndex(200, 206, 211, c[283].MsPosition + 400);
            AlignObjectAtIndex(206, 211, 212, c[286].MsPosition);
            AlignObjectAtIndex(211, 212, Count - 1, c[289].MsPosition);

            // final adjustments for R2M
            AlignObjectAtIndex(11, 12, 13, c[123].MsPosition - 200);
            AlignObjectAtIndex(106, 111, 112, c[254].MsPosition - 100);
        }
Example #4
0
        internal void AdjustAlignments(Clytemnestra c, TrkDef w2, TrkDef w3)
        {
            Debug.Assert(this[213] is RestDef);
            this[213].MsDuration += this[212].MsDuration;
            RemoveAt(212);
            AgglomerateRests();

            AlignObjectAtIndex(25, 84, 85, c[196].MsPosition);
            AlignObjectAtIndex(84, 85, 89, c[204].MsPosition + 200);
            AlignObjectAtIndex(85, 89, 96, c[215].MsPosition);
            AlignObjectAtIndex(89, 96, 102, c[226].MsPosition);
            AlignObjectAtIndex(102, 106, 117, c[242].MsPosition);
            AlignObjectAtIndex(106, 117, 140, c[268].MsPosition);
            AlignObjectAtIndex(117, 140, 165, w3[61].MsPosition);
            AlignObjectAtIndex(140, 165, 197, w2[65].MsPosition); // was AlignObjectAtIndex(140, 163, 197, wind3[65].MsPosition);
            AlignObjectAtIndex(165, 197, 200, c[269].MsPosition - 200);
            AlignObjectAtIndex(197, 200, 206, c[277].MsPosition);
            AlignObjectAtIndex(200, 206, 211, c[283].MsPosition + 400);
            AlignObjectAtIndex(206, 211, 212, c[286].MsPosition);
            AlignObjectAtIndex(211, 212, Count - 1, c[289].MsPosition);

            // final adjustments for R2M
            AlignObjectAtIndex(11, 12, 13, c[123].MsPosition - 200);
            AlignObjectAtIndex(106, 111, 112, c[254].MsPosition - 100);
        }
Example #5
0
        internal void GetBeforeInterlude3(Clytemnestra clytemnestra, TrkDef wind1, TrkDef furies2, Palette cheepsPalette)
        {
            int[]    cheepIndices    = { 4, 8, 2, 6, 10, 0, 1, 3, 5, 7, 9, 11 };
            int[]    transpositions  = { 2, 1, 3, 0, 4, -3, 5, 10, 6, 9, 7, 8 };
            double[] velocityfactors = { 0.32, 0.31, 0.34, 0.3, 0.35, 0.37, 0.36, 0.43, 0.37, 0.42, 0.39, 0.4 };
            int[]    msPositions     =
            {
                furies2[8].MsPosition + 200,
                furies2[12].MsPosition + 100,
                furies2[24].MsPosition + 300,
                furies2[30].MsPosition + 400,
                furies2[40].MsPosition + 500,
                clytemnestra[122].MsPosition,
                clytemnestra[132].MsPosition + 110,
                clytemnestra[141].MsPosition + 220,
                clytemnestra[150].MsPosition + 330,
                clytemnestra[158].MsPosition + 440,
                clytemnestra[164].MsPosition + 550,
                clytemnestra[173].MsPosition,
            };
            for (int i = 0; i < cheepsPalette.Count; ++i)
            {
                MidiChordDef cheep = cheepsPalette.UniqueDurationDef(cheepIndices[i]) as MidiChordDef;
                Debug.Assert(cheep != null);
                cheep.MsPosition  = msPositions[i];
                cheep.MsDuration *= 2;
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(11, 12, 13, clytemnestra[123].MsPosition);
            AlignObjectAtIndex(21, 22, 23, clytemnestra[168].MsPosition);
        }
Example #6
0
        internal void GetBeforeInterlude3(Clytemnestra clytemnestra, TrkDef wind1, TrkDef furies2, Palette cheepsPalette)
        {
            int[] cheepIndices = { 4, 8, 2, 6, 10, 0, 1, 3, 5, 7, 9, 11 };
            int[] transpositions = { 2, 1, 3, 0, 4, -3, 5, 10, 6, 9, 7, 8 };
            double[] velocityfactors = { 0.32, 0.31, 0.34, 0.3, 0.35, 0.37, 0.36, 0.43, 0.37, 0.42, 0.39, 0.4 };
            int[] msPositions =
            {
                furies2[8].MsPosition + 200,
                furies2[12].MsPosition + 100,
                furies2[24].MsPosition + 300,
                furies2[30].MsPosition + 400,
                furies2[40].MsPosition + 500,
                clytemnestra[122].MsPosition,
                clytemnestra[132].MsPosition + 110,
                clytemnestra[141].MsPosition + 220,
                clytemnestra[150].MsPosition + 330,
                clytemnestra[158].MsPosition + 440,
                clytemnestra[164].MsPosition + 550,
                clytemnestra[173].MsPosition,
            };
            for(int i = 0; i < cheepsPalette.Count; ++i)
            {
                MidiChordDef cheep = cheepsPalette.UniqueDurationDef(cheepIndices[i]) as MidiChordDef;
                Debug.Assert(cheep != null);
                cheep.MsPosition = msPositions[i];
                cheep.MsDuration *= 2;
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(11, 12, 13, clytemnestra[123].MsPosition);
            AlignObjectAtIndex(21, 22, 23, clytemnestra[168].MsPosition);
        }
Example #7
0
        /// <summary>
        /// Steals the ticks from furies 3, then agglommerates the remaining rests in furies3...
        /// </summary>
        private void GetFuries2Interlude2(Clytemnestra clytemnestra, TrkDef wind1, TrkDef furies3)
        {
            List <int> furies3TickIndices = new List <int>()
            {
                66, 70, 74, 81, 85, 89, 93,
                96, 100, 104, 109, 113, 117, 122,
                126, 130, 135, 139, 143, 148, 152
            };

            for (int i = 0; i < furies3TickIndices.Count; ++i)
            {
                int          f3Index    = furies3TickIndices[i];
                MidiChordDef ticksChord = furies3[f3Index] as MidiChordDef;
                Debug.Assert(ticksChord != null);
                RestDef ticksRest = new RestDef(ticksChord.MsPosition, ticksChord.MsDuration);
                furies3.Replace(f3Index, ticksRest);
                InsertInRest(ticksChord);
            }

            MidiChordDef lastTicksBeforeVerse3 = (MidiChordDef)((MidiChordDef)this[39]).DeepClone();

            lastTicksBeforeVerse3.MsPosition = furies3[155].MsPosition + furies3[155].MsDuration;
            lastTicksBeforeVerse3.MsDuration = clytemnestra[117].MsPosition - lastTicksBeforeVerse3.MsPosition;
            lastTicksBeforeVerse3.Transpose(10);
            InsertInRest(lastTicksBeforeVerse3);

            furies3.AgglomerateRests();
        }
Example #8
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, 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);
        }
Example #9
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);
        }
Example #10
0
        internal void AdjustAlignments(Furies1 furies1, Clytemnestra clytemnestra, TrkDef wind3)
        {
            AlignObjectAtIndex(42, Count - 1, Count, furies1[280].MsPosition);

            AlignObjectAtIndex(42, 43, 45, furies1[126].MsPosition);
            AlignObjectAtIndex(43, 45, 49, furies1[138].MsPosition);
            AlignObjectAtIndex(45, 49, 59, furies1[165].MsPosition);
            AlignObjectAtIndex(49, 59, 69, furies1[212].MsPosition);

            AlignObjectAtIndex(59, 69, Count - 1, furies1[248].MsPosition);
        }
Example #11
0
		private TrkDef GetWind1(byte midiChannel, TrkDef wind3, TrkDef wind2, Clytemnestra clytemnestra)
        {
            List<IUniqueDef> clytLmdds = clytemnestra.UniqueDefs;
            int rotationMsPosition = clytLmdds[116].MsPosition + 700;

			TrkDef wind1 = GetRotatedWind(midiChannel, wind3, rotationMsPosition);
            wind1.Transpose(0, wind1.Count, 19);
            wind1.StepwiseGliss(0, 25, 12);
            wind1.Transpose(25, wind1.Count, 12);

            wind1.AlignObjectAtIndex(0, 15, 82, wind2[15].MsPosition);
            wind1.AlignObjectAtIndex(15, 25, 82, rotationMsPosition);
            wind1.AlignObjectAtIndex(25, 74, 82, clytLmdds[289].MsPosition);

            return wind1;
        }
Example #12
0
        private Trk GetWind1(int midiChannel, Trk wind3, Trk wind2, Clytemnestra clytemnestra)
        {
            List<IUniqueDef> clytLmdds = clytemnestra.UniqueDefs;
            int rotationMsPosition = clytLmdds[116].MsPositionReTrk + 700;

            Trk wind1 = GetRotatedWind(midiChannel, wind3, rotationMsPosition);
            wind1.Transpose(0, wind1.Count, 19);
            wind1.StepwiseGliss(0, 25, 12);
            wind1.Transpose(25, wind1.Count, 12);

            wind1.AlignObjectAtIndex(0, 15, 82, wind2[15].MsPositionReTrk);
            wind1.AlignObjectAtIndex(15, 25, 82, rotationMsPosition);
            wind1.AlignObjectAtIndex(25, 74, 82, clytLmdds[289].MsPositionReTrk);

            return wind1;
        }
Example #13
0
        internal void GetBeforeInterlude3(int firstRestMsDuration, Clytemnestra clytemnestra, TrkDef wind1, List <Palette> palettes)
        {
            GetFlutters(firstRestMsDuration, palettes[2]);

            AddTicks(palettes[4]);

            EndMsPosition = clytemnestra.EndMsPosition;

            #region alignments
            AlignObjectAtIndex(1, 25, 37, clytemnestra[61].MsPosition);
            AlignObjectAtIndex(25, 37, 49, clytemnestra[82].MsPosition);
            AlignObjectAtIndex(37, 49, 61, clytemnestra[98].MsPosition);
            AlignObjectAtIndex(49, 61, 106, wind1[25].MsPosition);
            AlignObjectAtIndex(61, 106, 134, wind1[28].MsPosition);
            AlignObjectAtIndex(106, 134, 136, wind1[30].MsPosition);
            #endregion
        }
Example #14
0
		private TrkDef GetWind2(byte midiChannel, TrkDef wind3, Clytemnestra clytemnestra)
        {
            List<IUniqueDef> clytLmdds = clytemnestra.UniqueDefs;
            int rotationMsPosition = clytLmdds[59].MsPosition + 700;

            TrkDef wind2 = GetRotatedWind(midiChannel, wind3, rotationMsPosition);
            wind2.Transpose(0, wind2.Count, 12);

            wind2.StepwiseGliss(0, 15, 7);
            wind2.Transpose(15, wind2.Count, 7);

            wind2.StepwiseGliss(75, wind2.Count, 12);

            wind2.AlignObjectAtIndex(0, 15, 82, rotationMsPosition);
            wind2.AlignObjectAtIndex(15, 39, 82, clytLmdds[173].MsPosition);
            wind2.AlignObjectAtIndex(39, 57, 82, clytLmdds[268].MsPosition);

            return wind2;
        }
Example #15
0
        private Trk GetWind2(int midiChannel, Trk wind3, Clytemnestra clytemnestra)
        {
            List<IUniqueDef> clytLmdds = clytemnestra.UniqueDefs;
            int rotationMsPosition = clytLmdds[59].MsPositionReTrk + 700;

            Trk wind2 = GetRotatedWind(midiChannel, wind3, rotationMsPosition);
            wind2.Transpose(0, wind2.Count, 12);

            wind2.StepwiseGliss(0, 15, 7);
            wind2.Transpose(15, wind2.Count, 7);

            wind2.StepwiseGliss(75, wind2.Count, 12);

            wind2.AlignObjectAtIndex(0, 15, 82, rotationMsPosition);
            wind2.AlignObjectAtIndex(15, 39, 82, clytLmdds[173].MsPositionReTrk);
            wind2.AlignObjectAtIndex(39, 57, 82, clytLmdds[268].MsPositionReTrk);

            return wind2;
        }
Example #16
0
        private void AddGrowlsToInterlude2AndVerse3(Clytemnestra clytemnestra, Palette growlsPalette)
        {
            int[] growlIndices = { 0, 2, 5, 1 };
            //int[] transpositions = { 0,0,0,0 };
            //double[] velocityfactors = { 1,1,1,1 };
            int[] msPositions =
            {
                this[24].MsPosition + 200,
                this[26].MsPosition + 200,
                this[30].MsPosition + 200,
                this[32].MsPosition + 200,
            };
            int[] msDurations =
            {
                this[24].MsDuration / 2,
                this[26].MsDuration / 2,
                this[30].MsDuration / 2,
                this[32].MsDuration / 2
            };

            for (int i = 3; i >= 0; --i)
            {
                MidiChordDef growl = growlsPalette.UniqueDurationDef(growlIndices[i]) as MidiChordDef;
                Debug.Assert(growl != null);
                growl.MsPosition = msPositions[i];
                growl.MsDuration = msDurations[i];
                //growl.AdjustVelocities(velocityfactors[i]);
                //growl.Transpose(transpositions[i]);
                InsertInRest(growl);
            }

            AgglomerateRestOrChordAt(40);

            AlignObjectAtIndex(34, 35, 36, clytemnestra[140].MsPosition);
            AlignObjectAtIndex(35, 36, 37, clytemnestra[141].MsPosition);
            AlignObjectAtIndex(38, 39, 40, clytemnestra[162].MsPosition);
        }
Example #17
0
        internal void AdjustAlignments(Furies1 f1, Furies4 f4, Clytemnestra c)
        {
            AlignObjectAtIndex(58, 67, 74, f1[56].MsPosition);
            AlignObjectAtIndex(67, 74, 85, f1[61].MsPosition);
            AlignObjectAtIndex(74, 85, 87, f1[73].MsPosition);
            AlignObjectAtIndex(85, 87, 90, c[174].MsPosition);
            AlignObjectAtIndex(87, 90, 91, c[184].MsPosition);
            AlignObjectAtIndex(90, 91, 100, c[185].MsPosition);
            AlignObjectAtIndex(91, 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 - 200);
            AlignObjectAtIndex(232, 233, 256, c[289].MsPosition);
            AlignObjectAtIndex(233, 256, this.Count - 2, f1[248].MsPosition);

            // final adjustments for R2M
            AlignObjectAtIndex(49, 50, 51, c[130].MsPosition - 100);

            AlignObjectAtIndex(78, 92, 93, c[184].MsPosition - 200);
            AlignObjectAtIndex(88, 89, 90, c[177].MsPosition);

            AlignObjectAtIndex(123, 124, 129, c[255].MsPosition);

            AlignObjectAtIndex(131, 158, 159, f1[138].MsPosition - 200);
            AlignObjectAtIndex(166, 168, 181, f4[47].MsPosition);
        }
Example #18
0
        internal void AdjustAlignments(Furies1 f1, Furies4 f4, Clytemnestra c)
        {
            AlignObjectAtIndex(58, 67, 74, f1[56].MsPositionReTrk);
            AlignObjectAtIndex(67, 74, 85, f1[61].MsPositionReTrk);
            AlignObjectAtIndex(74, 85, 87, f1[73].MsPositionReTrk);
            AlignObjectAtIndex(85, 87, 90, c[174].MsPositionReTrk);
            AlignObjectAtIndex(87, 90, 91, c[184].MsPositionReTrk);
            AlignObjectAtIndex(90, 91, 100, c[185].MsPositionReTrk);
            AlignObjectAtIndex(91, 100, 106, c[204].MsPositionReTrk);
            AlignObjectAtIndex(100, 106, 125, c[216].MsPositionReTrk);
            AlignObjectAtIndex(106, 125, 129, c[255].MsPositionReTrk);
            AlignObjectAtIndex(125, 129, 131, f1[115].MsPositionReTrk);
            AlignObjectAtIndex(129, 131, 135, c[268].MsPositionReTrk);
            AlignObjectAtIndex(131, 135, 141, f1[122].MsPositionReTrk);
            AlignObjectAtIndex(135, 141, 157, f1[123].MsPositionReTrk);
            AlignObjectAtIndex(141, 157, 164, f1[138].MsPositionReTrk);
            AlignObjectAtIndex(157, 164, 169, f4[46].MsPositionReTrk);
            AlignObjectAtIndex(164, 169, 214, f4[47].MsPositionReTrk);
            AlignObjectAtIndex(169, 214, 217, c[269].MsPositionReTrk);
            AlignObjectAtIndex(214, 217, 219, c[277].MsPositionReTrk);
            AlignObjectAtIndex(217, 219, 229, c[278].MsPositionReTrk);
            AlignObjectAtIndex(219, 229, 232, c[287].MsPositionReTrk);
            AlignObjectAtIndex(229, 232, 233, c[288].MsPositionReTrk - 200);
            AlignObjectAtIndex(232, 233, 256, c[289].MsPositionReTrk);
            AlignObjectAtIndex(233, 256, this.Count - 2, f1[248].MsPositionReTrk);

            // final adjustments for R2M
            AlignObjectAtIndex(49,50,51, c[130].MsPositionReTrk - 100);

            AlignObjectAtIndex(78, 92, 93, c[184].MsPositionReTrk - 200);
            AlignObjectAtIndex(88, 89, 90, c[177].MsPositionReTrk);

            AlignObjectAtIndex(123, 124, 129, c[255].MsPositionReTrk);

            AlignObjectAtIndex(131, 158, 159, f1[138].MsPositionReTrk - 200);
            AlignObjectAtIndex(166, 168, 181, f4[47].MsPositionReTrk);
        }
Example #19
0
        private void AddFuries2ChirpsForInterlude2AndVerse3(Clytemnestra clytemnestra, TrkDef wind1, Palette chirpsPalette)
        {
            int[]      chirpIndices    = { 4, 6, 10, 0, 1, 3, 5, 7, 9, 11 };
            int[]      transpositions  = { 2, 0, 4, 11, 5, 10, 6, 9, 7, 8 };
            double[]   velocityfactors = { 0.32, 0.3, 0.35, 0.45, 0.36, 0.43, 0.37, 0.42, 0.39, 0.4 };
            IUniqueDef c3 = chirpsPalette.UniqueDurationDef(chirpIndices[3]);
            IUniqueDef c7 = chirpsPalette.UniqueDurationDef(chirpIndices[7]);

            int[] msPositions =
            {
                this[2].MsPosition,
                this[6].MsPosition,
                this[16].MsPosition,
                this[26].MsPosition,
                this[26].MsPosition + c3.MsDuration,
                clytemnestra[129].MsPosition,
                clytemnestra[143].MsPosition + 110,
                clytemnestra[156].MsPosition + 220,
                clytemnestra[156].MsPosition + 220 + c7.MsDuration,
                clytemnestra[168].MsPosition + 330,
            };
            for (int i = 9; i >= 0; --i)
            {
                MidiChordDef cheep = chirpsPalette.MidiChordDef(chirpIndices[i]);
                cheep.MsPosition = msPositions[i];
                //cheep.MsDuration *= 2;
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(50, 51, 52, clytemnestra[130].MsPosition);
            AlignObjectAtIndex(55, 56, 57, clytemnestra[159].MsPosition);

            AgglomerateRestOrChordAt(31);
        }
Example #20
0
 internal void GetBeforeInterlude3(Clytemnestra clytemnestra, Trk wind1, Trk furies3, List<Palette> _palettes)
 {
     GetFuries2Interlude2(clytemnestra, wind1, furies3);
     AddFuries2ChirpsForInterlude2AndVerse3(clytemnestra, wind1, _palettes[7]);
 }
Example #21
0
        internal void GetChirpsInInterlude2AndVerse3(Trk furies1, Trk furies2, Clytemnestra clytemnestra, Trk wind1, Palette chirpsPalette)
        {
            int[] chirpIndices = { 4, 8, 2, 6, 10, 0 };
            int[] transpositions = { 2, 1, 3, 0, 4, 5 };
            //double[] velocityfactors = { 0.3, 0.31, 0.32, 0.34, 0.35, 0.36, 0.37, 0.39, 0.4, 0.42, 0.43, 0.45 };
            double[] velocityfactors = { 0.32, 0.34, 0.36, 0.38, 0.40, 0.42 };
            int[] msPositions =
            {
                this[112].MsPositionReTrk + 200,
                this[129].MsPositionReTrk + 500,
                clytemnestra[118].MsPositionReTrk,
                clytemnestra[138].MsPositionReTrk + 250,
                clytemnestra[151].MsPositionReTrk,
                furies2[57].MsPositionReTrk
            };
            for(int i = 5; i >=0; --i)
            {
                MidiChordDef cheep = chirpsPalette.MidiChordDef(chirpIndices[i]);
                cheep.MsPositionReTrk = msPositions[i];
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(25, 30, 31, clytemnestra[65].MsPositionReTrk);
            AlignObjectAtIndex(140, 141, 142, clytemnestra[119].MsPositionReTrk);
            AlignObjectAtIndex(142, 143, 144, clytemnestra[140].MsPositionReTrk);
            AlignObjectAtIndex(144, 145, 146, clytemnestra[152].MsPositionReTrk);
            AlignObjectAtIndex(146, 147, 148, furies1[23].MsPositionReTrk);

            AgglomerateRestOrChordAt(114);
        }
Example #22
0
        /// <summary>
        /// Steals the ticks from furies 3, then agglommerates the remaining rests in furies3...
        /// </summary>
        private void GetFuries2Interlude2(Clytemnestra clytemnestra, Trk wind1, Trk furies3)
        {
            List<int> furies3TickIndices = new List<int>()
            {
                66,70,74,81,85,89,93,
                96,100,104,109,113,117,122,
                126,130,135,139,143,148,152
            };
            for(int i = 0; i < furies3TickIndices.Count; ++i)
            {
                int f3Index = furies3TickIndices[i];
                MidiChordDef ticksChord = furies3[f3Index] as MidiChordDef;
                Debug.Assert(ticksChord != null);
                RestDef ticksRest = new RestDef(ticksChord.MsPositionReTrk, ticksChord.MsDuration);
                furies3.Replace(f3Index, ticksRest);
                InsertInRest(ticksChord);
            }

            MidiChordDef lastTicksBeforeVerse3 = (MidiChordDef)((MidiChordDef)this[39]).Clone();
            lastTicksBeforeVerse3.MsPositionReTrk = furies3[155].MsPositionReTrk + furies3[155].MsDuration;
            lastTicksBeforeVerse3.MsDuration = clytemnestra[117].MsPositionReTrk - lastTicksBeforeVerse3.MsPositionReTrk;
            lastTicksBeforeVerse3.Transpose(10);
            InsertInRest(lastTicksBeforeVerse3);

            furies3.AgglomerateRests();
        }
Example #23
0
        /// <summary>
        /// The returned barlineMsPositions contain both the position of bar 1 (0ms) and the position of the final barline.
        /// </summary>
        private List <int> GetBarlineMsPositions(TrkDef fury1, TrkDef fury2, TrkDef fury3, TrkDef fury4, Clytemnestra clytemnestra, TrkDef wind1, TrkDef wind2, TrkDef wind3)
        {
            TrkDef       f1 = fury1;
            TrkDef       f2 = fury2;
            TrkDef       f3 = fury3;
            TrkDef       f4 = fury4;
            Clytemnestra c  = clytemnestra;
            TrkDef       w1 = wind1;
            TrkDef       w2 = wind2;
            TrkDef       w3 = wind3;
            List <int>   barlineMsPositions = new List <int>()
            {
                #region msPositions
                #region intro
                0,
                w3[1].MsPosition,
                w3[3].MsPosition,
                w3[5].MsPosition,
                #endregion
                #region verse 1
                c[1].MsPosition,
                c[3].MsPosition,
                c[8].MsPosition,
                c[12].MsPosition,
                c[15].MsPosition,
                c[18].MsPosition,
                c[22].MsPosition,
                c[27].MsPosition,
                c[34].MsPosition,
                c[38].MsPosition,
                c[41].MsPosition,
                c[47].MsPosition,
                c[49].MsPosition,
                c[50].MsPosition,
                c[54].MsPosition,
                c[58].MsPosition,
                #endregion
                #region interlude after verse 1
                w2[15].MsPosition,
                w2[16].MsPosition,
                w2[18].MsPosition,
                #endregion
                #region verse 2
                c[60].MsPosition,
                c[62].MsPosition,
                c[67].MsPosition,
                c[71].MsPosition,
                c[73].MsPosition,
                c[77].MsPosition,
                c[81].MsPosition,
                c[86].MsPosition,
                c[88].MsPosition,
                c[92].MsPosition,
                c[94].MsPosition,
                c[97].MsPosition,
                c[100].MsPosition,
                c[104].MsPosition,
                c[107].MsPosition,
                c[111].MsPosition,
                c[115].MsPosition,
                #endregion
                #region interlude after verse 2
                w1[25].MsPosition,
                w1[26].MsPosition,
                w1[28].MsPosition,
                w1[30].MsPosition,
                #endregion
                #region verse 3
                c[117].MsPosition,
                c[119].MsPosition,
                c[124].MsPosition,
                c[126].MsPosition,
                c[128].MsPosition,
                c[131].MsPosition,
                c[135].MsPosition,
                c[139].MsPosition,
                c[141].MsPosition,
                c[146].MsPosition,
                c[148].MsPosition,
                c[152].MsPosition,
                c[159].MsPosition,
                c[164].MsPosition,
                c[168].MsPosition,
                c[172].MsPosition,
                #endregion
                #region interlude after verse 3
                w1[38].MsPosition,
                w3[40].MsPosition,
                w3[42].MsPosition,
                w3[44].MsPosition,
                w3[45].MsPosition,
                w3[47].MsPosition,
                #endregion
                #region verse 4, Oft have ye...
                c[174].MsPosition,
                c[177].MsPosition,
                c[183].MsPosition,
                c[185].MsPosition,
                c[192].MsPosition,
                c[196].MsPosition,
                c[204].MsPosition,
                c[206].MsPosition,
                c[214].MsPosition,
                c[219].MsPosition,
                c[221].MsPosition,
                c[225].MsPosition,
                c[227].MsPosition,
                c[229].MsPosition,
                c[233].MsPosition,
                c[236].MsPosition,
                c[242].MsPosition,
                c[252].MsPosition,
                c[257].MsPosition,
                c[259].MsPosition,
                c[263].MsPosition,
                c[267].MsPosition,
                c[268].MsPosition, // new bar 89
                #endregion
                #region interlude after verse 4
                w1[57].MsPosition,
                w3[59].MsPosition,
                f4[45].MsPosition, // was w3[61].MsPosition,
                w3[63].MsPosition,
                w2[65].MsPosition, // was w3[65].MsPosition,
                w1[66].MsPosition, // w3[67].MsPosition,
                w1[68].MsPosition,
                #endregion
                #region verse 5
                c[269].MsPosition,
                c[270].MsPosition,
                c[272].MsPosition,
                c[276].MsPosition,
                c[279].MsPosition,
                c[283].MsPosition,
                c[288].MsPosition,
                #endregion
                #region postlude
                c[289].MsPosition,
                f1[248].MsPosition,
                f1[280].MsPosition, // new bar 105
                #endregion
                // final barline
                w3.EndMsPosition
                #endregion
            };

            Debug.Assert(barlineMsPositions.Count == NumberOfBars + 1); // includes bar 1 (mPos=0) and the final barline.
            return(barlineMsPositions);
        }
Example #24
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;
        }
Example #25
0
        private void AddFuries2ChirpsForInterlude2AndVerse3(Clytemnestra clytemnestra, Trk wind1, Palette chirpsPalette)
        {
            int[] chirpIndices = { 4, 6, 10, 0, 1, 3, 5, 7, 9, 11 };
            int[] transpositions = { 2, 0, 4, 11, 5, 10, 6, 9, 7, 8 };
            double[] velocityfactors = { 0.32, 0.3, 0.35, 0.45, 0.36, 0.43, 0.37, 0.42, 0.39, 0.4 };
            IUniqueDef c3 = chirpsPalette.UniqueDurationDef(chirpIndices[3]);
            IUniqueDef c7 = chirpsPalette.UniqueDurationDef(chirpIndices[7]);
            int[] msPositions =
            {
                this[2].MsPositionReTrk,
                this[6].MsPositionReTrk,
                this[16].MsPositionReTrk,
                this[26].MsPositionReTrk,
                this[26].MsPositionReTrk + c3.MsDuration,
                clytemnestra[129].MsPositionReTrk,
                clytemnestra[143].MsPositionReTrk + 110,
                clytemnestra[156].MsPositionReTrk + 220,
                clytemnestra[156].MsPositionReTrk + 220 + c7.MsDuration,
                clytemnestra[168].MsPositionReTrk + 330,
            };
            for(int i = 9; i >=0 ; --i)
            {
                MidiChordDef cheep = chirpsPalette.MidiChordDef(chirpIndices[i]);
                cheep.MsPositionReTrk = msPositions[i];
                //cheep.MsDuration *= 2;
                cheep.AdjustVelocities(velocityfactors[i]);
                cheep.Transpose(transpositions[i]);
                InsertInRest(cheep);
            }

            AlignObjectAtIndex(50, 51, 52, clytemnestra[130].MsPositionReTrk);
            AlignObjectAtIndex(55, 56, 57, clytemnestra[159].MsPositionReTrk);

            AgglomerateRestOrChordAt(31);
        }
Example #26
0
        internal void AdjustAlignments(Furies1 furies1, Clytemnestra clytemnestra, Trk wind3)
        {
            AlignObjectAtIndex(42, Count-1, Count, furies1[280].MsPositionReTrk);

            AlignObjectAtIndex(42, 43, 45, furies1[126].MsPositionReTrk);
            AlignObjectAtIndex(43, 45, 49, furies1[138].MsPositionReTrk);
            AlignObjectAtIndex(45, 49, 59, furies1[165].MsPositionReTrk);
            AlignObjectAtIndex(49, 59, 69, furies1[212].MsPositionReTrk);

            AlignObjectAtIndex(59, 69, Count-1, furies1[248].MsPositionReTrk);
        }
Example #27
0
 /// <summary>
 /// The returned barlineMsPositions contain both the position of bar 1 (0ms) and the position of the final barline.
 /// </summary>
 private List<int> GetBarlineMsPositions(TrkDef fury1, TrkDef fury2, TrkDef fury3, TrkDef fury4, Clytemnestra clytemnestra, TrkDef wind1, TrkDef wind2, TrkDef wind3)
 {
     TrkDef f1 = fury1;
     TrkDef f2 = fury2;
     TrkDef f3 = fury3;
     TrkDef f4 = fury4;
     Clytemnestra c = clytemnestra;
     TrkDef w1 = wind1;
     TrkDef w2 = wind2;
     TrkDef w3 = wind3;
     List<int> barlineMsPositions = new List<int>()
     {
         #region msPositions
         #region intro
         0,
         w3[1].MsPosition,
         w3[3].MsPosition,
         w3[5].MsPosition,
         #endregion
         #region verse 1
         c[1].MsPosition,
         c[3].MsPosition,
         c[8].MsPosition,
         c[12].MsPosition,
         c[15].MsPosition,
         c[18].MsPosition,
         c[22].MsPosition,
         c[27].MsPosition,
         c[34].MsPosition,
         c[38].MsPosition,
         c[41].MsPosition,
         c[47].MsPosition,
         c[49].MsPosition,
         c[50].MsPosition,
         c[54].MsPosition,
         c[58].MsPosition,
         #endregion
         #region interlude after verse 1
         w2[15].MsPosition,
         w2[16].MsPosition,
         w2[18].MsPosition,
         #endregion
         #region verse 2
         c[60].MsPosition,
         c[62].MsPosition,
         c[67].MsPosition,
         c[71].MsPosition,
         c[73].MsPosition,
         c[77].MsPosition,
         c[81].MsPosition,
         c[86].MsPosition,
         c[88].MsPosition,
         c[92].MsPosition,
         c[94].MsPosition,
         c[97].MsPosition,
         c[100].MsPosition,
         c[104].MsPosition,
         c[107].MsPosition,
         c[111].MsPosition,
         c[115].MsPosition,
         #endregion
         #region interlude after verse 2
         w1[25].MsPosition,
         w1[26].MsPosition,
         w1[28].MsPosition,
         w1[30].MsPosition,
         #endregion
         #region verse 3
         c[117].MsPosition,
         c[119].MsPosition,
         c[124].MsPosition,
         c[126].MsPosition,
         c[128].MsPosition,
         c[131].MsPosition,
         c[135].MsPosition,
         c[139].MsPosition,
         c[141].MsPosition,
         c[146].MsPosition,
         c[148].MsPosition,
         c[152].MsPosition,
         c[159].MsPosition,
         c[164].MsPosition,
         c[168].MsPosition,
         c[172].MsPosition,
         #endregion
         #region interlude after verse 3
         w1[38].MsPosition,
         w3[40].MsPosition,
         w3[42].MsPosition,
         w3[44].MsPosition,
         w3[45].MsPosition,
         w3[47].MsPosition,
         #endregion
         #region verse 4, Oft have ye...
         c[174].MsPosition,
         c[177].MsPosition,
         c[183].MsPosition,
         c[185].MsPosition,
         c[192].MsPosition,
         c[196].MsPosition,
         c[204].MsPosition,
         c[206].MsPosition,
         c[214].MsPosition,
         c[219].MsPosition,
         c[221].MsPosition,
         c[225].MsPosition,
         c[227].MsPosition,
         c[229].MsPosition,
         c[233].MsPosition,
         c[236].MsPosition,
         c[242].MsPosition,
         c[252].MsPosition,
         c[257].MsPosition,
         c[259].MsPosition,
         c[263].MsPosition,
         c[267].MsPosition,
         c[268].MsPosition, // new bar 89
         #endregion
         #region interlude after verse 4
         w1[57].MsPosition,
         w3[59].MsPosition,
         f4[45].MsPosition, // was w3[61].MsPosition,
         w3[63].MsPosition,
         w2[65].MsPosition, // was w3[65].MsPosition,
         w1[66].MsPosition, // w3[67].MsPosition,
         w1[68].MsPosition,
         #endregion
         #region verse 5
         c[269].MsPosition,
         c[270].MsPosition,
         c[272].MsPosition,
         c[276].MsPosition,
         c[279].MsPosition,
         c[283].MsPosition,
         c[288].MsPosition,
         #endregion
         #region postlude
         c[289].MsPosition,
         f1[248].MsPosition,
         f1[280].MsPosition, // new bar 105
         #endregion
         // final barline
         w3.EndMsPosition
         #endregion
     };
     Debug.Assert(barlineMsPositions.Count == NumberOfBars + 1); // includes bar 1 (mPos=0) and the final barline.
     return barlineMsPositions;
 }
Example #28
0
        private void AddGrowlsToInterlude2AndVerse3(Clytemnestra clytemnestra, Palette growlsPalette)
        {
            int[] growlIndices = { 0,2,5,1 };
            //int[] transpositions = { 0,0,0,0 };
            //double[] velocityfactors = { 1,1,1,1 };
            int[] msPositions =
            {
                this[24].MsPositionReTrk + 200,
                this[26].MsPositionReTrk + 200,
                this[30].MsPositionReTrk + 200,
                this[32].MsPositionReTrk + 200,
            };
            int[] msDurations =
            {
                this[24].MsDuration / 2,
                this[26].MsDuration / 2,
                this[30].MsDuration / 2,
                this[32].MsDuration / 2
            };

            for(int i = 3; i >= 0; --i)
            {
                MidiChordDef growl = growlsPalette.UniqueDurationDef(growlIndices[i]) as MidiChordDef;
                Debug.Assert(growl != null);
                growl.MsPositionReTrk = msPositions[i];
                growl.MsDuration = msDurations[i];
                //growl.AdjustVelocities(velocityfactors[i]);
                //growl.Transpose(transpositions[i]);
                InsertInRest(growl);
            }

            AgglomerateRestOrChordAt(40);

            AlignObjectAtIndex(34, 35, 36, clytemnestra[140].MsPositionReTrk);
            AlignObjectAtIndex(35, 36, 37, clytemnestra[141].MsPositionReTrk);
            AlignObjectAtIndex(38, 39, 40, clytemnestra[162].MsPositionReTrk);
        }
Example #29
0
        private void GetSnores(int firstRestMsDuration, Clytemnestra clytemnestra, Trk wind1, Palette snoresPalette)
        {
            List<IUniqueDef> snores = new List<IUniqueDef>();
            int msPosition = 0;

            IUniqueDef firstRest = new RestDef(msPosition, firstRestMsDuration);
            snores.Add(firstRest);
            msPosition += firstRestMsDuration;

            #region prelude + verse1
            int[] transpositions1 = { 0, 0, 0, 0, 0, 1, 0 };
            for(int i = 0; i < 7; ++i)
            {
                IUniqueDef snore = snoresPalette.UniqueDurationDef(i);
                snore.MsPositionReTrk = msPosition;
                msPosition += snore.MsDuration;
                MidiChordDef iumdd = snore as MidiChordDef;
                if(iumdd != null)
                {
                    iumdd.Transpose(transpositions1[i]);
                    iumdd.PitchWheelDeviation = 3;
                }
                snores.Add(snore);

                RestDef rest = new RestDef(msPosition, 2500);
                msPosition += rest.MsDuration;
                snores.Add(rest);
            }
            #endregion

            double factor;
            double msDuration;
            double restDuration;
            int[] transpositions2 = { 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 };
            double[] factors = { 0.93, 0.865, 0.804, 0.748, 0.696, 0.647, 0.602, 0.56, 0.52, 0.484 };
            for(int i = 0; i < 10; ++i)
            {
                IUniqueDef snore = snoresPalette.UniqueDurationDef(i / 2);
                snore.MsPositionReTrk = msPosition;
                factor = factors[i];
                msDuration = snore.MsDuration * factor;
                snore.MsDuration = (int)msDuration;
                msPosition += snore.MsDuration;
                MidiChordDef iumdd = snore as MidiChordDef;
                if(iumdd != null)
                {
                    iumdd.Transpose(transpositions2[i]);
                    iumdd.PitchWheelDeviation = 20;
                }
                //iumdd.MidiVelocity = (byte)((double)snore.MidiVelocity * factor * factor);
                snores.Add(snore);

                restDuration = 2500 / factor;
                RestDef rest = new RestDef(msPosition, (int)restDuration);
                msPosition += rest.MsDuration;
                snores.Add(rest);
            }

            snores[snores.Count - 1].MsDuration = clytemnestra.EndMsPosition - snores[snores.Count - 1].MsPositionReTrk;

            this._uniqueDefs = snores;

            AdjustVelocitiesHairpin(13, Count, 0.25);

            #region alignments before Interlude3
            AlignObjectAtIndex(7, 8, 9, clytemnestra[3].MsPositionReTrk);
            AlignObjectAtIndex(8, 9, 10, clytemnestra[7].MsPositionReTrk);
            AlignObjectAtIndex(9, 10, 11, clytemnestra[16].MsPositionReTrk);
            AlignObjectAtIndex(10, 11, 12, clytemnestra[24].MsPositionReTrk);
            AlignObjectAtIndex(11, 12, 13, clytemnestra[39].MsPositionReTrk);
            AlignObjectAtIndex(12, 13, 14, clytemnestra[42].MsPositionReTrk);
            AlignObjectAtIndex(14, 34, Count, wind1[38].MsPositionReTrk); // rest at start of Interlude3
            #endregion

            RemoveScorePitchWheelCommands(0, 13); // pitchwheeldeviation is 20 for R2M
        }
Example #30
0
 internal void GetBeforeInterlude3(int firstRestMsDuration, Clytemnestra clytemnestra, Trk wind1, List<Palette> palettes)
 {
     GetSnores(firstRestMsDuration, clytemnestra, wind1, palettes[1]);
     AddGrowlsToInterlude2AndVerse3(clytemnestra, palettes[3]);
 }
Example #31
0
        internal void GetBeforeInterlude3(int firstRestMsDuration, Clytemnestra clytemnestra, Trk wind1, List<Palette> palettes)
        {
            GetFlutters(firstRestMsDuration, palettes[2]);

            AddTicks(palettes[4]);

            EndMsPosition = clytemnestra.EndMsPosition;

            #region alignments
            AlignObjectAtIndex(1, 25, 37, clytemnestra[61].MsPositionReTrk);
            AlignObjectAtIndex(25, 37, 49, clytemnestra[82].MsPositionReTrk);
            AlignObjectAtIndex(37, 49, 61, clytemnestra[98].MsPositionReTrk);
            AlignObjectAtIndex(49, 61, 106, wind1[25].MsPositionReTrk);
            AlignObjectAtIndex(61, 106, 134, wind1[28].MsPositionReTrk);
            AlignObjectAtIndex(106, 134, 136, wind1[30].MsPositionReTrk);
            #endregion
        }
Example #32
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);
        }
Example #33
0
 internal void GetBeforeInterlude3(int firstRestMsDuration, Clytemnestra clytemnestra, TrkDef wind1, List <Palette> palettes)
 {
     GetSnores(firstRestMsDuration, clytemnestra, wind1, palettes[1]);
     AddGrowlsToInterlude2AndVerse3(clytemnestra, palettes[3]);
 }
Example #34
0
 internal void GetBeforeInterlude3(Clytemnestra clytemnestra, TrkDef wind1, TrkDef furies3, List <Palette> _palettes)
 {
     GetFuries2Interlude2(clytemnestra, wind1, furies3);
     AddFuries2ChirpsForInterlude2AndVerse3(clytemnestra, wind1, _palettes[7]);
 }
Example #35
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);
        }
Example #36
0
        private void GetSnores(int firstRestMsDuration, Clytemnestra clytemnestra, TrkDef wind1, Palette snoresPalette)
        {
            List <IUniqueDef> snores = new List <IUniqueDef>();
            int msPosition           = 0;

            IUniqueDef firstRest = new RestDef(msPosition, firstRestMsDuration);

            snores.Add(firstRest);
            msPosition += firstRestMsDuration;

            #region prelude + verse1
            int[] transpositions1 = { 0, 0, 0, 0, 0, 1, 0 };
            for (int i = 0; i < 7; ++i)
            {
                IUniqueDef snore = snoresPalette.UniqueDurationDef(i);
                snore.MsPosition = msPosition;
                msPosition      += snore.MsDuration;
                MidiChordDef iumdd = snore as MidiChordDef;
                if (iumdd != null)
                {
                    iumdd.Transpose(transpositions1[i]);
                    iumdd.PitchWheelDeviation = 3;
                }
                snores.Add(snore);

                RestDef rest = new RestDef(msPosition, 2500);
                msPosition += rest.MsDuration;
                snores.Add(rest);
            }
            #endregion

            double   factor;
            double   msDuration;
            double   restDuration;
            int[]    transpositions2 = { 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 };
            double[] factors         = { 0.93, 0.865, 0.804, 0.748, 0.696, 0.647, 0.602, 0.56, 0.52, 0.484 };
            for (int i = 0; i < 10; ++i)
            {
                IUniqueDef snore = snoresPalette.UniqueDurationDef(i / 2);
                snore.MsPosition = msPosition;
                factor           = factors[i];
                msDuration       = snore.MsDuration * factor;
                snore.MsDuration = (int)msDuration;
                msPosition      += snore.MsDuration;
                MidiChordDef iumdd = snore as MidiChordDef;
                if (iumdd != null)
                {
                    iumdd.Transpose(transpositions2[i]);
                    iumdd.PitchWheelDeviation = 20;
                }
                //iumdd.MidiVelocity = (byte)((double)snore.MidiVelocity * factor * factor);
                snores.Add(snore);

                restDuration = 2500 / factor;
                RestDef rest = new RestDef(msPosition, (int)restDuration);
                msPosition += rest.MsDuration;
                snores.Add(rest);
            }

            snores[snores.Count - 1].MsDuration = clytemnestra.EndMsPosition - snores[snores.Count - 1].MsPosition;

            this._uniqueDefs = snores;

            AdjustVelocitiesHairpin(13, Count, 0.25);

            #region alignments before Interlude3
            AlignObjectAtIndex(7, 8, 9, clytemnestra[3].MsPosition);
            AlignObjectAtIndex(8, 9, 10, clytemnestra[7].MsPosition);
            AlignObjectAtIndex(9, 10, 11, clytemnestra[16].MsPosition);
            AlignObjectAtIndex(10, 11, 12, clytemnestra[24].MsPosition);
            AlignObjectAtIndex(11, 12, 13, clytemnestra[39].MsPosition);
            AlignObjectAtIndex(12, 13, 14, clytemnestra[42].MsPosition);
            AlignObjectAtIndex(14, 34, Count, wind1[38].MsPosition); // rest at start of Interlude3
            #endregion

            RemoveScorePitchWheelCommands(0, 13); // pitchwheeldeviation is 20 for R2M
        }