keyboard

package
v0.0.0-...-2889c3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWantStop = errors.New("want stop")
)

Functions

This section is empty.

Types

type Keyboard

type Keyboard struct {
	// contains filtered or unexported fields
}

func NewKeyboard

func NewKeyboard(ctx context.Context, s synth.Synth, onTick TickFunc, showHelp bool) *Keyboard

func (*Keyboard) Draw

func (g *Keyboard) Draw(screen *ebiten.Image)

func (*Keyboard) KeyCut

func (g *Keyboard) KeyCut(n note.Note)

func (*Keyboard) KeyOff

func (g *Keyboard) KeyOff(n note.Note)

func (*Keyboard) KeyOn

func (g *Keyboard) KeyOn(n note.Note)

func (*Keyboard) Layout

func (g *Keyboard) Layout(outsideWidth, outsideHeight int) (int, int)

func (*Keyboard) SetCurrentOctave

func (g *Keyboard) SetCurrentOctave(o scale.Octave)

func (*Keyboard) Update

func (g *Keyboard) Update() error

type TickFunc

type TickFunc func(g *Keyboard, amt time.Duration) error

Directories

Path Synopsis
resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL