Skip to content

kyawnyeinphyo/guitar_chord_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');
  }
}