mugbug / fretboard

Song writing toolkit for Flutter ๐ŸŽธ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐ŸŽธ fretboard

Pub style: very good analysis License: MIT

Song writing toolkit for Flutter.

Features

โœ… Easily draw a fretboard layout with some note markers.

๐Ÿšง Show the note symbol with a letter notation.

๐Ÿšง Automatically generate a fretboard drawing based on a given scale name.

Usage

To draw a simple guitar fretboard you can just instantiate the Fretboard widget passing some Size and a matrix that represents how the fretboard should be drawn:

class MyCustomWidget extends StatelessWidget {
  const MyCustomWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Fretboard(
        size: Size(400, 240),
        notesMatrix: [
          ['', 'o', '', '', 'o', ''],
          ['', 'o', '', '', 'o', ''],
          ['', 'o', '', 'o', '', ''],
          ['', 'o', '', '0', '', ''],
          ['', 'o', '', '', 'o', ''],
          ['', '0', '', '', 'o', ''],
        ],
      ),
    );
  }
}

Example Screenshot

Advanced usage

Custom theme

You can change the default theme colors by passing a custom FretboardTheme:

Fretboard(
  size: Size(400, 240),
  theme: FretboardTheme(
    tonicColor: Colors.green,
    noteColor: Colors.pink,
    fretColor: Colors.grey,
    stringColor: Colors.black,
  ),
  notesMatrix: [
    ['', 'o', '', '', 'o', ''],
    ['', 'o', '', '', 'o', ''],
    ['', 'o', '', 'o', '', ''],
    ['', 'o', '', '0', '', ''],
    ['', 'o', '', '', 'o', ''],
    ['', '0', '', '', 'o', ''],
  ],
),

Dart Versions

  • Dart 3 >= 3.0.0

Maintainers

About

Song writing toolkit for Flutter ๐ŸŽธ

License:MIT License


Languages

Language:C++ 41.2%Language:Dart 25.9%Language:CMake 20.1%Language:HTML 9.7%Language:C 1.7%Language:Swift 1.0%Language:Kotlin 0.3%Language:Objective-C 0.1%