guitar_chord_library 0.1.0 copy "guitar_chord_library: ^0.1.0" to clipboard
guitar_chord_library: ^0.1.0 copied to clipboard

A perfect simple chord library for guitar and ukulele. Both flat and sharp note usage are supported.

example/lib/main.dart

// ignore_for_file: avoid_print

import 'package:guitar_chord_library/guitar_chord_library.dart';

void main() {
  final guitar = GuitarChordLibrary.instrument(InstrumentType.guitar);

  // Direct lookup
  final chord = guitar.getChordByName('Am');
  print('Found chord: ${chord?.name}');

  // Transposition
  print('Am transposed +2: ${ChordHelper.transposeChord('Am', semitones: 2)}');

  // Capo helper
  print(
      'G#m with Capo 4: ${ChordHelper.getPlayableChord(originalChord: 'G#m', capoFret: 4)}');

  // Reverse identification
  final identified = guitar.identifyChord([-1, 3, 2, 0, 1, 0]);
  print(
      'Identified [-1, 3, 2, 0, 1, 0]: ${identified.map((c) => c.name).toList()}');

  // ASCII Diagram & Tab
  final firstPos = guitar.getChordPositions('C')!.first;
  print('\nASCII Diagram:\n${firstPos.toAsciiDiagram(title: 'C Major')}');
  print('\nASCII Tab:\n${firstPos.toAsciiTab()}');
}
6
likes
160
points
185
downloads

Documentation

API reference

Publisher

verified publishercoderverse.org

Weekly Downloads

A perfect simple chord library for guitar and ukulele. Both flat and sharp note usage are supported.

Repository (GitHub)
View/report issues

Topics

#guitar #chords #ukulele #music #tab

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on guitar_chord_library