UNPKG

piano-chart

Version:

Display notes on a piano keyboard

16 lines (15 loc) 712 B
import { G } from '@svgdotjs/svg.js'; import { INoteValue } from './Note'; import { InstrumentSettings } from './InstrumentSettings'; export declare type KeyEventHandler = (note: INoteValue) => void; export declare class PianoElement { protected container: G; protected onKeyPress: KeyEventHandler; protected onKeyRelease: KeyEventHandler; protected instrumentSettings: InstrumentSettings; constructor(container: G, instrumentSettings: InstrumentSettings, onKeyPress: KeyEventHandler, onKeyRelease: KeyEventHandler); get boxWidth(): number; get boxHeight(): number; move(x: number, y: number): void; setInstrumentSettings(settings: InstrumentSettings): void; }