Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/invisiblewrench/flutter_virtual_piano
https://github.com/invisiblewrench/flutter_virtual_piano
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/invisiblewrench/flutter_virtual_piano
- Owner: InvisibleWrench
- License: bsd-3-clause
- Created: 2022-04-04T13:10:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T12:43:16.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T10:38:32.881Z (2 months ago)
- Language: C++
- Size: 211 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A virtual piano for flutter, that renders the keys of a piano and with support for interaction and highlighting.
## Features
Keys are based on MIDI note values so middle C (4) is 63.
Key callback are `onNoteReleased`, `onNotePressed` and `onNotePressSlide`.
`onNoteReleased` and `onNotePressSlide` has two arguments, the relevant note and the vertical position of the touch/slide on the key. The latter can be used for simulating variable velocity or polyphonic aftertouch.## Usage
```dart
VirtualPiano(
noteRange: const RangeValues(21, 108),
highlightedNoteSets: const [
HighlightedNoteSet({44, 55, 77, 32}, Colors.green),
],
onNotePressed: (note, pos) {
// Play note
},
)
```