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") }; }
public IEnumerable<Chord> GetChords(NoteName name) { if (_chordsDic == null) { LoadChords(); } return _chordsDic[name]; }
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 }; }
private static string GetChordGroupTitle(NoteName noteName) { string note = noteName.IsNatural ? noteName.Name : string.Format("{0}({1})", noteName.Name, noteName.AlternativeName); return note + " Chords"; }
protected bool Equals(NoteName other) { return string.Equals(Name, other.Name); }