events

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean added in v0.2.0

func Clean(e any) string

func Is added in v0.2.0

func Is[E TEvent](e Event) bool

func IsTrack0Event added in v0.2.0

func IsTrack0Event(e *Event) bool

func IsTrack1Event added in v0.2.0

func IsTrack1Event(e *Event) bool

func VLF

func VLF(r io.ByteReader) ([]byte, error)

func VLQ

func VLQ(r io.ByteReader) (uint32, error)

Types

type Event

type Event struct {
	Event IEvent `json:"event"`
}

func NewEvent added in v0.2.0

func NewEvent(e any, bytes ...byte) *Event

func (Event) Bytes

func (e Event) Bytes() lib.Hex

func (Event) Delta

func (e Event) Delta() uint32

func (Event) Tick

func (e Event) Tick() uint64

func (*Event) UnmarshalBinary added in v0.2.0

func (e *Event) UnmarshalBinary(bytes []byte) error

func (*Event) UnmarshalJSON added in v0.2.0

func (e *Event) UnmarshalJSON(bytes []byte) error

func (*Event) UnmarshalText added in v0.2.0

func (e *Event) UnmarshalText(text []byte) error

type IEvent added in v0.2.0

type IEvent interface {
	Tick() uint64
	Delta() uint32
	Bytes() []byte
}

type TEvent added in v0.2.0

type TEvent interface {
	metaevent.TMetaEvent | midievent.TMidiEvent | sysex.TSysExEvent

	Tick() uint64
	Delta() uint32
	Bytes() []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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