Documentation
¶
Index ¶
- func DbToLinear(db float64) float64
- func FaderFloatToInt(level float64) int16
- func GetMidiInputs() []string
- func GetMidiOutputs() []string
- func InitInterp()
- func InitMcu(fMcu chan interface{}, fObs chan interface{}, wg *sync.WaitGroup)
- func IntToFaderFloat(faderVal int16) float64
- func LinearToDb(linear float64) float64
- func MapToRange(value, fromMin, fromMax, toMin, toMax float64) float64
- func ShortenText(input string) string
- type McuState
- func (m *McuState) SendLed(num byte, state bool)
- func (m *McuState) SetAssignMode(number byte)
- func (m *McuState) SetAssignText(text []rune)
- func (m *McuState) SetChannelText(fader byte, text string, lower bool)
- func (m *McuState) SetDisplayText(text string)
- func (m *McuState) SetFaderLevel(fader byte, level float64)
- func (m *McuState) SetFaderTouched(fader byte, touched bool)
- func (m *McuState) SetMeter(fader byte, value float64)
- func (m *McuState) SetMonitorState(fader byte, state string)
- func (m *McuState) SetMuteState(fader byte, state bool)
- func (m *McuState) SetSelectState(fader byte, state bool)
- func (m *McuState) SetTrackEnabledState(track byte, state bool)
- func (m *McuState) SetVPotLed(fader byte, value byte)
- func (m *McuState) UpdateTouch()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DbToLinear ¶
DbToLinear wandelt einen Dezibelwert in einen linearen Faktor um.
func FaderFloatToInt ¶
func InitInterp ¶
func InitInterp()
prepares the interpolation for the mackie fader to obs fader translation
func IntToFaderFloat ¶
func LinearToDb ¶
LinearToDb wandelt einen linearen Faktor in Dezibel um.
func MapToRange ¶
func ShortenText ¶
Types ¶
type McuState ¶
type McuState struct { // TODO: combine FaderLevels []int16 FaderLevelsBuffered []float64 FaderTouch []bool MeterLevels []byte FaderTouchTimeout []time.Time LedStates map[byte]bool VPotLedStates map[byte]byte Text string Display string Assign []rune Debug bool }
McuState stores the current state of the MCU and syncs it with the hardware
func (*McuState) SendLed ¶ added in v0.2.4
SendLed checks if the led state has changed and sends the message to the hardware if it has changed
func (*McuState) SetAssignMode ¶ added in v0.5.0
SetAssignMode sets the assign mode and lights up the assign buttons accordingly
func (*McuState) SetAssignText ¶
SetAssignText sets the two letters above the assign buttons
func (*McuState) SetChannelText ¶
SetChannelText sets the text above the fader channel strip (LCD) the text is automatically shortened to 6 characters
func (*McuState) SetDisplayText ¶ added in v0.4.3
SetDisplayText sets the text on the display (LED)
func (*McuState) SetFaderLevel ¶
SetFaderLevel sets the fader level and sends the value to the hardware fader if it has changed
func (*McuState) SetFaderTouched ¶
SetFaderTouched sets the fader touch state and sends the buffered value if the touch has ended
func (*McuState) SetMeter ¶ added in v0.4.2
SetMeter sets the meter level for a fader, it is sent directly
func (*McuState) SetMonitorState ¶
SetMonitorState sets the monitor state for a fader (rec+solo button)
func (*McuState) SetMuteState ¶
SetMuteState sets the mute state for a fader
func (*McuState) SetSelectState ¶ added in v0.2.9
SetSelectState sets the selected fader and lights up the select buttons accordingly
func (*McuState) SetTrackEnabledState ¶ added in v0.3.0
SetTrackEnabledState sets the enabled state for a single track
func (*McuState) SetVPotLed ¶
SetVPotLed sets the LED state for a VPot value 0 is off, values 1-12 are full left
func (*McuState) UpdateTouch ¶ added in v0.3.6
func (m *McuState) UpdateTouch()
UpdateTouch checks if a simulated fader touch has timed out and sends the buffered value