piano 1.0.3+1 icon indicating copy to clipboard operation
piano: ^1.0.3+1 copied to clipboard

Utilities and widgets for working with piano sheet music learning.

Piano #

A Flutter package that provides:

  • logic for working with musical notes, clefs and octaves;
  • a widget that can render notes on a clef;
  • an interactive piano widget.

Where is it used? #

In "Learn The Notes", a simple sight reading trainer you can find on the iOS App Store here and macOS App Store here.

Example showing musical clef and interactive piano

How do I use it? #

Here's an example app:

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:piano/piano.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
        title: 'Piano Demo',
        home: Center(
          child: InteractivePiano(
            highlightedNotes: [
              NotePosition(note: Note.C, octave: 3)
            ],
            naturalColor: Colors.white,
            accidentalColor: Colors.black,
            keyWidth: 60,
            noteRange: NoteRange.forClefs([
              Clef.Treble,
            ]),
            onNotePositionTapped: (position) {
              // Use an audio library like flutter_midi to play the sound
            },
          ),
        ));
  }
}

More like this #

17
likes
100
pub points
63%
popularity

Publisher

verified publisher iconhandform.net

Utilities and widgets for working with piano sheet music learning.

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

collection, equatable, flutter, freezed_annotation

More

Packages that depend on piano