Esempio n. 1
0
 public InstrumentNote(Note note)
 {
     Note            = note;
     Selected        = false;
     InSelectedScale = false;
     Sharp           = NoteHelper.ConvertNoteToStringEquivalent(note, true);
 }
Esempio n. 2
0
        public ScaleEntry(Scale scale)
        {
            ScaleLabel               = $"{scale.RootNote}{scale.ModeDefinition.Mode}";
            Scale                    = scale;
            UserReadableLabel_Flat   = GetUserFriendlyLabel(ScaleLabel);
            ColloquialNameLabel_Flat = PentatonicModeHelper.GetScaleColloquialism(scale);
            UserReadableLabelIncludingColloquialism_Flat = !string.IsNullOrWhiteSpace(ColloquialNameLabel_Flat) ? $"{UserReadableLabel_Flat}/{ColloquialNameLabel_Flat}" : $"{UserReadableLabel_Flat}";

            string sharpNote = NoteHelper.ConvertNoteToStringEquivalent(scale.RootNote, true);

            UserReadableLabel_Sharp   = GetUserFriendlyLabel($"{sharpNote}{scale.ModeDefinition.Mode}");
            ColloquialNameLabel_Sharp = PentatonicModeHelper.GetScaleColloquialism(scale, true);
            UserReadableLabelIncludingColloquialism_Sharp = !string.IsNullOrWhiteSpace(ColloquialNameLabel_Sharp) ? $"{UserReadableLabel_Sharp}/{ColloquialNameLabel_Sharp}" : $"{UserReadableLabel_Sharp}";
        }
Esempio n. 3
0
        public static string GetScaleColloquialism(Scale scale, bool convertToSharp = false)
        {
            var pentatonicModeEquivalent = GetModeNameColloquialismModeLabel(scale.ModeDefinition.Mode);

            return(!string.IsNullOrWhiteSpace(pentatonicModeEquivalent) ? $"{NoteHelper.ConvertNoteToStringEquivalent(scale.RootNote, convertToSharp)} {pentatonicModeEquivalent}" : pentatonicModeEquivalent);
        }
        public void NonFlatNotesAreNotConvertedToSharpNotes(KeyifyClassLibrary.Enums.Note note, string expected)
        {
            var actual = NoteHelper.ConvertNoteToStringEquivalent(note, true);

            Assert.Equal(expected, actual);
        }