Beispiel #1
0
        private static string FriendlyName(NoteName nn)
        {
            var    modifier = nn.HasFlag(NoteName.Sharp) ? "#" : nn.HasFlag(NoteName.Flat) ? "b" : "";
            string letter   = null;

            if (nn.HasFlag(NoteName.A))
            {
                letter = "A";
            }
            else if (nn.HasFlag(NoteName.B))
            {
                letter = "B";
            }
            else if (nn.HasFlag(NoteName.C))
            {
                letter = "C";
            }
            else if (nn.HasFlag(NoteName.D))
            {
                letter = "D";
            }
            else if (nn.HasFlag(NoteName.E))
            {
                letter = "E";
            }
            else if (nn.HasFlag(NoteName.F))
            {
                letter = "F";
            }
            else if (nn.HasFlag(NoteName.G))
            {
                letter = "G";
            }

            return(string.Concat(letter, modifier));
        }