コード例 #1
0
        public IEnumerable<ChordsItemViewModel> GetChords(NoteName name)
        {
            string s = @"IV
            E|---|---|-x-|---|
            B|---|---|---|---|
            G|---|---|-x-|---|
            D|-x-|---|---|---|
            A|---|---|-x-|---|
            E|---|---|---|---|";

            var fingering = Fingering.Parse(s);

            Func<string, ChordsItemViewModel> createChord = str => new ChordsItemViewModel(new Chord
                                                                                           {
                                                                                               RootNote = name,
                                                                                               Name = name.Name + str,
                                                                                               Fingerings = new[]
                                                                                                            {
                                                                                                                fingering
                                                                                                                ,
                                                                                                                fingering
                                                                                                                ,
                                                                                                                fingering
                                                                                                                ,
                                                                                                            }
                                                                                           });
            return new[]
                   {
                       createChord(""), createChord("m"), createChord("7"), createChord("m7"), createChord("9"),
                       createChord("6"), createChord("sus4")
                   };
        }
コード例 #2
0
 public IEnumerable<Chord> GetChords(NoteName name)
 {
     if (_chordsDic == null)
     {
         LoadChords();
     }
     return _chordsDic[name];
 }
コード例 #3
0
        public IEnumerable<Chord> GetChords(NoteName name)
        {
            string s = @"IV
            E|---|---|-x-|---|
            B|---|---|---|---|
            G|---|---|-x-|---|
            D|-x-|---|---|---|
            A|---|---|-x-|---|
            E|---|---|---|---|";

            var fingering = Fingering.Parse(s);
            var chord1 = new Chord
                        {
                            RootNote = name,
                            Name = name.Name,
                            Fingerings = new Fingering[]
                                         {
                                            fingering,
                                            fingering,
                                            fingering,
                                         }
                        };

            var chord2 = new Chord
            {
                RootNote = name,
                Name = name.Name + "m",
                Fingerings = new Fingering[]
                                         {
                                            fingering,
                                            fingering,
                                            fingering,
                                         }
            };

            return new[] { chord1, chord2 };
        }
コード例 #4
0
 private static string GetChordGroupTitle(NoteName noteName)
 {
     string note = noteName.IsNatural ? noteName.Name : string.Format("{0}({1})", noteName.Name, noteName.AlternativeName);
     return note + " Chords";
 }
コード例 #5
0
 protected bool Equals(NoteName other)
 {
     return string.Equals(Name, other.Name);
 }