Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.21 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.21 KB

Guitar Chord Library

A perfect, simple chord library for guitar and ukulele. Both flat and sharp note usage are supported. Pull request are always welcome :)

Features

Supported instruments:

  • Guitar
  • Ukulele
/// Default is guitar
GuitarChordLibrary.instrument(InstrumentType.ukulele)

Usage

To use this plugin, add guitar_chord_library as a dependency in your pubspec.yaml file.

void main() {
  /// Your favourite instrument:
  /// InstrumentType.guitar
  /// InstrumentType.ukulele
  Instrument instrument = GuitarChordLibrary.instrument(InstrumentType.guitar);

  /// Instrument string count
  print(instrument.stringCount);

  /// All major keys
  print(instrument.getKeys()); //use sharp
  print(instrument.getKeys(true)); //use flat

  /// All chords by major key
  print(instrument.getChordsByKey('C#')); //use sharp
  print(instrument.getChordsByKey('C#', true)); //use flat

  /// All positions of Cmajor chord
  final chordPostions = instrument.getChordPositions('C', 'major')!;

  for (var position in chordPostions) {
    print(
        'baseFret: ${position.baseFret}\nfrets: ${position.frets}\nfingers: ${position.fingers}\n');
  }
}