Esempio n. 1
0
 internal void CalcWeightedScores()
 {
     WeightedScores = new List <clsWeightedScores>(250);
     foreach (clsCompScores min in MinScores)
     {
         clsWeightedScores w = new clsWeightedScores(this, min);
         WeightedScores.Add(w);
     }
 }
Esempio n. 2
0
        private void SelectAlign()
        {
            //* create listci from ListCIArr[0/1]
            ListCI = new List <clsChordInfo>(250); //final chord list
            if (Align == eAlign.Auto)
            {
                //* create listci... from listciarr[0/1/2]
                ListCIBar     = ListCIArr[0];
                ListCIHalfBar = ListCIArr[1];
                ListCIBeat    = ListCIArr[2];
                Bars          = new List <clsBarSubHB>(250);

                //* get bar/halfbar/beat structure
                GetStructure();

                //* calculate minimum unweighted scores
                MinScores = new List <clsCompScores>(250);
                for (int b = 0; b < Bars.Count; b++)
                {
                    clsBarSubHB   bar = Bars[b];
                    clsCompScores min = new clsCompScores(bar);
                    MinScores.Add(min);
                    if (MinScores.Count != b + 1)
                    {
                        LogicError.Throw(eLogicError.X086);
                    }
                }

                //* calculate weighted bar score combinations
                CalcWeightedScores();

                int hbindex = 0, beatindex = 0;
                for (int bar = 0; bar < Bars.Count; bar++)
                {
                    clsWeightedScores w     = WeightedScores[bar];
                    clsChordInfo[]    cibar = w.MaxCombo.SelectAuto(bar);
                    if (DebugChords)
                    {
                        DebugBarScores(ref hbindex, ref beatindex, bar);
                        DebugComboScore(bar, cibar);
                    }
                    ListCI.AddRange(cibar);
                }
            }
            else
            {
                ListCI = ListCIArr[0];
            }
        }