device

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EV_KEY_RELEASE = 0
	EV_KEY_PRESS   = 1
	EV_KEY_REPEAT  = 2
)

Variables

View Source
var KeyToLedName = map[evdev.EvCode]string{}/* 108 elements not displayed */
View Source
var LedNameToKey = map[string]evdev.EvCode{} // filled up with init()

Functions

This section is empty.

Types

type Device

type Device struct {
	InputDevice input.Device
	// contains filtered or unexported fields
}

func NewDevice

func NewDevice(
	inputDevice input.Device, cfg config.DeviceConfig,
	midiEvents chan<- midi.Event, midiIn <-chan midi.Event,
	noLogs bool, openrgbPort int,
	gyroEvents <-chan gyro.Vector,
	sigs chan os.Signal,
) Device

func (*Device) AnalogNoteOff

func (d *Device) AnalogNoteOff(identifier string)

func (*Device) AnalogNoteOn

func (d *Device) AnalogNoteOn(identifier string, note byte, channelOffset byte)

func (*Device) CCLearningOff

func (d *Device) CCLearningOff()

func (*Device) CCLearningOn

func (d *Device) CCLearningOn()

func (*Device) ChannelDown

func (d *Device) ChannelDown()

func (*Device) ChannelReset

func (d *Device) ChannelReset()

func (*Device) ChannelUp

func (d *Device) ChannelUp()

func (*Device) Gyro

func (d *Device) Gyro(ev *input.InputEvent, pressed bool)

func (*Device) MappingDown

func (d *Device) MappingDown()

func (*Device) MappingReset

func (d *Device) MappingReset()

func (*Device) MappingUp

func (d *Device) MappingUp()

func (*Device) Multinote

func (d *Device) Multinote()

func (*Device) NoteOff

func (d *Device) NoteOff(ev *input.InputEvent)

func (*Device) NoteOn

func (d *Device) NoteOn(ev *input.InputEvent)

func (*Device) OctaveDown

func (d *Device) OctaveDown()

func (*Device) OctaveReset

func (d *Device) OctaveReset()

func (*Device) OctaveUp

func (d *Device) OctaveUp()

func (*Device) Panic

func (d *Device) Panic()

func (*Device) ProcessEvents

func (d *Device) ProcessEvents(inputEvents <-chan *input.InputEvent)

func (*Device) SemitoneDown

func (d *Device) SemitoneDown()

func (*Device) SemitoneReset

func (d *Device) SemitoneReset()

func (*Device) SemitoneUp

func (d *Device) SemitoneUp()

func (*Device) State

func (d *Device) State() State

func (*Device) Status

func (d *Device) Status() string

type DeviceLedStrip

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

func NewDeviceLedStrip

func NewDeviceLedStrip(ledStrip LedStrip) DeviceLedStrip

func (*DeviceLedStrip) Value

func (s *DeviceLedStrip) Value(value float64, width float64) map[string]float64

type HyperXAlloyElite2

type HyperXAlloyElite2 struct{}

func (HyperXAlloyElite2) Device

func (h HyperXAlloyElite2) Device() string

func (HyperXAlloyElite2) LEDSequence

func (h HyperXAlloyElite2) LEDSequence() []string

type LedStrip

type LedStrip interface {
	Device() string
	LEDSequence() []string
}

type NoLeds

type NoLeds struct{}

func (NoLeds) Device

func (n NoLeds) Device() string

func (NoLeds) LEDSequence

func (n NoLeds) LEDSequence() []string

type State

type State struct {
	Octave   int8
	Semitone int8
	Channel  uint8
	Notes    int
	Mapping  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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