mcu

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbToLinear

func DbToLinear(db float64) float64

DbToLinear wandelt einen Dezibelwert in einen linearen Faktor um.

func FaderFloatToInt

func FaderFloatToInt(level float64) int16

func GetMidiInputs

func GetMidiInputs() []string

get a list of midi inputs

func GetMidiOutputs

func GetMidiOutputs() []string

get a list of midi outputs

func InitInterp

func InitInterp()

prepares the interpolation for the mackie fader to obs fader translation

func InitMcu

func InitMcu(fMcu chan interface{}, fObs chan interface{})

func IntToFaderFloat

func IntToFaderFloat(faderVal int16) float64

func LinearToDb

func LinearToDb(linear float64) float64

LinearToDb wandelt einen linearen Faktor in Dezibel um.

func MapToRange

func MapToRange(value, fromMin, fromMax, toMin, toMax float64) float64

func ShortenText

func ShortenText(input string) string

Types

type McuState

type McuState struct {
	// TODO: combine
	FaderLevels         []int16
	FaderLevelsBuffered []float64
	FaderTouch          []bool
	FaderTouchTimeout   []time.Time
	LedStates           map[byte]bool
	VPotLedStates       map[byte]byte
	Text                string
	Assign              []rune
	Debug               bool
}

func NewMcuState

func NewMcuState() *McuState

func (*McuState) SendLed added in v0.2.4

func (m *McuState) SendLed(num byte, state bool)

func (*McuState) SetAssignText

func (m *McuState) SetAssignText(text []rune)

func (*McuState) SetChannelText

func (m *McuState) SetChannelText(fader byte, text string, lower bool)

func (*McuState) SetFaderLevel

func (m *McuState) SetFaderLevel(fader byte, level float64)

func (*McuState) SetFaderTouched

func (m *McuState) SetFaderTouched(fader byte)

func (*McuState) SetMonitorState

func (m *McuState) SetMonitorState(fader byte, state string)

func (*McuState) SetMuteState

func (m *McuState) SetMuteState(fader byte, state bool)

func (*McuState) SetSelectState added in v0.2.9

func (m *McuState) SetSelectState(fader byte, state bool)

func (*McuState) SetTrackEnabledState added in v0.3.0

func (m *McuState) SetTrackEnabledState(track byte, state bool)

func (*McuState) Update

func (m *McuState) Update()

Jump to

Keyboard shortcuts

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