mikro

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: ISC Imports: 10 Imported by: 0

README

mikro

Go Reference

Go driver for the Native Instruments Maschine Mikro Mk3.

Documentation

Index

Constants

View Source
const (
	Mk3VID = 0x17cc
	Mk3PID = 0x1700
)
View Source
const (
	PadNumber13 Pad = iota
	PadNumber14
	PadNumber15
	PadNumber16

	PadNumber9
	PadNumber10
	PadNumber11
	PadNumber12

	PadNumber5
	PadNumber6
	PadNumber7
	PadNumber8

	PadNumber1
	PadNumber2
	PadNumber3
	PadNumber4

	PadUndo     = PadNumber1
	PadRedo     = PadNumber2
	PadStepUndo = PadNumber3
	PadStepRedo = PadNumber4

	PadQuantize   = PadNumber5
	PadQuantize50 = PadNumber6
	PadNudgeLeft  = PadNumber7
	PadNudgeRight = PadNumber8

	PadClear     = PadNumber9
	PadClearAuto = PadNumber10
	PadCopy      = PadNumber11
	PadPaste     = PadNumber12

	PadSemitoneMinus = PadNumber13
	PadSemitonePlus  = PadNumber14
	PadOctaveMinus   = PadNumber15
	PadOctavePlus    = PadNumber16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button int
const (
	ButtonProject Button = iota
	ButtonFavorites
	ButtonBrowser

	ButtonVolume
	ButtonSwing
	ButtonTempo
	ButtonPlugin
	ButtonSampling

	ButtonArrowLeft
	ButtonArrowRight

	ButtonPitch
	ButtonMod
	ButtonPerform
	ButtonNotes

	ButtonGroup
	ButtonAuto
	ButtonLock
	ButtonNoteRepeat

	ButtonRestart
	ButtonErase
	ButtonTap
	ButtonFollow

	ButtonPlay
	ButtonRec
	ButtonStop
	ButtonShift

	ButtonFixedVel
	ButtonPadMode
	ButtonKeyboard
	ButtonChords
	ButtonStep

	ButtonScene
	ButtonPattern
	ButtonEvents
	ButtonVariation
	ButtonDuplicate
	ButtonSelect
	ButtonSolo
	ButtonMute

	ButtonEncoder
)

func (Button) String

func (i Button) String() string

type ButtonMessage

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

func (*ButtonMessage) EncoderPosition

func (b *ButtonMessage) EncoderPosition() uint8

func (*ButtonMessage) IsButtonPressed

func (b *ButtonMessage) IsButtonPressed(btn Button) bool

func (*ButtonMessage) IsEncoderTouched

func (b *ButtonMessage) IsEncoderTouched() bool

func (*ButtonMessage) PressedButtons

func (b *ButtonMessage) PressedButtons() []Button

func (*ButtonMessage) StripPosition

func (b *ButtonMessage) StripPosition() uint8

func (*ButtonMessage) StripSecondPosition

func (b *ButtonMessage) StripSecondPosition() uint8

type Color

type Color uint8
const (
	ColorOff Color = iota
	ColorRed
	ColorOrange
	ColorLightOrange
	ColorWarmYellow
	ColorYellow
	ColorLime
	ColorGreen
	ColorMint
	ColorCyan
	ColorTurquoise
	ColorBlue
	ColorPlum
	ColorViolet
	ColorPurple
	ColorMagenta
	ColorFuchsia
	ColorWhite
)

func (Color) String

func (i Color) String() string

type ColorLevel

type ColorLevel uint8
const (
	ColorLevelLow ColorLevel = iota
	ColorLevelMedium
	ColorLevelHigh
	ColorLevelFaded
)

func (ColorLevel) String

func (i ColorLevel) String() string

type ColoredLight

type ColoredLight struct {
	Level ColorLevel
	Color Color
}

type Intensity

type Intensity uint8
const (
	IntensityLow Intensity = iota
	IntensityOff
	IntensityMedium
	IntensityHigh
)

func (Intensity) String

func (i Intensity) String() string

type Lights

type Lights struct {
	Buttons [39]Intensity
	Pads    [16]ColoredLight
	Strip   [35]ColoredLight
}

func NewLights

func NewLights() Lights

type Mk3

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

func OpenMk3

func OpenMk3() (*Mk3, error)

func (*Mk3) Close

func (m *Mk3) Close() error

func (*Mk3) Lights

func (m *Mk3) Lights() Lights

func (*Mk3) Run

func (m *Mk3) Run(ctx context.Context) error

func (*Mk3) SetLights

func (m *Mk3) SetLights(lights Lights) error

func (*Mk3) SetOnButtonFunc

func (m *Mk3) SetOnButtonFunc(fn OnButtonFunc)

func (*Mk3) SetOnPadFunc

func (m *Mk3) SetOnPadFunc(fn OnPadPunc)

func (*Mk3) SetScreen

func (m *Mk3) SetScreen(img image.Image) error

type OnButtonFunc

type OnButtonFunc func(msg ButtonMessage)

type OnPadPunc

type OnPadPunc func(msg PadMessage)

type Pad

type Pad uint8

func (Pad) String

func (i Pad) String() string

type PadAction

type PadAction uint8
const (
	PadActionPressed PadAction = iota + 1
	PadActionTouched
	PadActionReleased
)

func (PadAction) String

func (i PadAction) String() string

type PadMessage

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

func (*PadMessage) Action

func (p *PadMessage) Action() PadAction

func (*PadMessage) Pad

func (p *PadMessage) Pad() Pad

func (*PadMessage) Velocity

func (p *PadMessage) Velocity() uint16

Directories

Path Synopsis
api
mk3

Jump to

Keyboard shortcuts

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