示例#1
0
        private void DisplayPartitionHarmonyReport(PartitionReport report)
        {
            var hr = new StringBuilder();

            if (report.ReportList.Count == 0)
            {
                hr.AppendLine($"Your Partion is in Perfect Harmony");
            }
            else
            {
                hr.AppendLine($"Your Partion is not in Harmony.. according to this set of rules:");
                foreach (var detail in report.ReportList)
                {
                    var notes   = detail.Measures[0];
                    var message = hr.Append($"notes [{notes}] ").Append($"n°{detail.Number} ");

                    var nextnotes = "";
                    if (detail.Measures.Length == 2)
                    {
                        notes     = detail.Measures[1];
                        nextnotes = $"==> next notes [{notes}] {GetNotesTypeMessage(notes)}";
                    }
                    var error = ProcessMessage(HarmonyError.HarmonyErrorMessage(detail.ErrorCode), ("{{M-TYPE}}", notes.Type.ToString()));

                    hr.Append($"{GetNotesTypeMessage(detail.Measures[0])} ").AppendLine($"{nextnotes} ==> {error}");
                }
            }
            Console.WriteLine(hr.ToString());
        }
示例#2
0
        private void DisplayPartitionAnalysisReport(PartitionReport report)
        {
            var mr = new StringBuilder()
                     .AppendLine($"Number of accords:              {report.AccordsCount}")
                     .AppendLine($"Number of silences:             {report.SilencesCount}")
                     .AppendLine($"Number of measures with notes:  {report.NotesCount}");

            Console.WriteLine(mr.ToString());
        }