Documentation ¶
Index ¶
- Constants
- Variables
- func InitObs(in chan interface{}, out chan interface{}, wg *sync.WaitGroup)
- type Channel
- type ChannelList
- func (l *ChannelList) AddChannel(name string)
- func (l *ChannelList) AddInput(inputName string)
- func (l *ChannelList) ChangeFaderBank(amount int)
- func (l *ChannelList) Clear()
- func (l *ChannelList) GetDelayMS(name string) float64
- func (l *ChannelList) GetMonitorType(name string) string
- func (l *ChannelList) GetPan(name string) float64
- func (l *ChannelList) GetVisible() []Channel
- func (l *ChannelList) GetVisibleName(index byte) string
- func (l *ChannelList) GetVisibleNumber(name string) int
- func (l *ChannelList) RemoveChannel(name string)
- func (l *ChannelList) SetAllInvisible()
- func (l *ChannelList) SetAssignMode(mode byte)
- func (l *ChannelList) SetDelayMS(name string, delay float64)
- func (l *ChannelList) SetMonitorType(name string, mon string)
- func (l *ChannelList) SetMuted(name string, muted bool)
- func (l *ChannelList) SetPan(name string, pan float64)
- func (l *ChannelList) SetSelected(fader byte, selected bool)
- func (l *ChannelList) SetTrack(idx byte, state bool) *Channel
- func (l *ChannelList) SetTracks(name string, tracksEnabled map[string]bool)
- func (l *ChannelList) SetVisible(name string, visible bool)
- func (l *ChannelList) SetVolume(name string, volume float64)
- func (l *ChannelList) SyncMcu()
- func (l *ChannelList) UpdateSpecialInputs() error
- func (l *ChannelList) UpdateVisible()
- type ObsState
- type ObsStates
Constants ¶
const ( ModeDelay byte = iota Mode_2 ModePan Mode_4 Mode_5 Mode_6 )
Variables ¶
var ( OBS_MONITORING_TYPE_NONE string = "OBS_MONITORING_TYPE_NONE" OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT string = "OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT" OBS_MONITORING_TYPE_MONITOR_ONLY string = "OBS_MONITORING_TYPE_MONITOR_ONLY" )
var ExitWithObs bool
var ShowHotkeyNames bool
Functions ¶
Types ¶
type Channel ¶
type Channel struct { Name string Visible bool Muted bool Pan float64 Volume float64 MonitorType string DelayMS float64 Tracks map[string]bool }
one source in obs that can be controlled if visible
type ChannelList ¶
type ChannelList struct { FirstChannel int AssignMode byte SelectedChannel string // contains filtered or unexported fields }
Master list of all channels, has functions to set their state when obs sends new values. It syncs the state with the mcu runloop based on the channel visibility etc. The mcu runloop is responsible for deduping the MIDI messages.
func (*ChannelList) AddChannel ¶
func (l *ChannelList) AddChannel(name string)
add a channel to the list (doesn't check if it has audio)
func (*ChannelList) AddInput ¶
func (l *ChannelList) AddInput(inputName string)
adds an input and gets the basic info (mute state, volume etc) only adds if it has audio tracks
func (*ChannelList) ChangeFaderBank ¶
func (l *ChannelList) ChangeFaderBank(amount int)
change the first channel shown on the mcu
func (*ChannelList) GetDelayMS ¶ added in v0.2.0
func (l *ChannelList) GetDelayMS(name string) float64
get the delay of a channel
func (*ChannelList) GetMonitorType ¶
func (l *ChannelList) GetMonitorType(name string) string
get the monitor type of a channel
func (*ChannelList) GetPan ¶ added in v0.5.0
func (l *ChannelList) GetPan(name string) float64
get the pan state of a channel
func (*ChannelList) GetVisible ¶
func (l *ChannelList) GetVisible() []Channel
create alphabetically sorted list of visible channels
func (*ChannelList) GetVisibleName ¶
func (l *ChannelList) GetVisibleName(index byte) string
get the name of a visible channel by its index on the mcu
func (*ChannelList) GetVisibleNumber ¶
func (l *ChannelList) GetVisibleNumber(name string) int
get the index of a visible channel by its name returns -1 if not found
func (*ChannelList) RemoveChannel ¶
func (l *ChannelList) RemoveChannel(name string)
remove a channel from the list
func (*ChannelList) SetAllInvisible ¶
func (l *ChannelList) SetAllInvisible()
set all channels to invisible (unused)
func (*ChannelList) SetAssignMode ¶ added in v0.5.0
func (l *ChannelList) SetAssignMode(mode byte)
set the assign mode of the mcu (delay or pan on the vpots)
func (*ChannelList) SetDelayMS ¶ added in v0.2.0
func (l *ChannelList) SetDelayMS(name string, delay float64)
set the delay of a channel
func (*ChannelList) SetMonitorType ¶
func (l *ChannelList) SetMonitorType(name string, mon string)
set the monitor type of a channel (rec and solo button) type can be "OBS_MONITORING_TYPE_NONE", "OBS_MONITORING_TYPE_MONITOR_ONLY", "OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT"
func (*ChannelList) SetMuted ¶
func (l *ChannelList) SetMuted(name string, muted bool)
set the mute state of a channel
func (*ChannelList) SetPan ¶
func (l *ChannelList) SetPan(name string, pan float64)
set the pan state of a channel
func (*ChannelList) SetSelected ¶ added in v0.2.9
func (l *ChannelList) SetSelected(fader byte, selected bool)
set the selected channel # on the mcu
func (*ChannelList) SetTrack ¶ added in v0.3.0
func (l *ChannelList) SetTrack(idx byte, state bool) *Channel
set the enabled state of a track of the selected channel
func (*ChannelList) SetTracks ¶
func (l *ChannelList) SetTracks(name string, tracksEnabled map[string]bool)
set the enabled state of all tracks of the channel with the given name
func (*ChannelList) SetVisible ¶
func (l *ChannelList) SetVisible(name string, visible bool)
set the visibility of a channel (if its shown in obs and on the mcu)
func (*ChannelList) SetVolume ¶
func (l *ChannelList) SetVolume(name string, volume float64)
set the volume of a channel
func (*ChannelList) SyncMcu ¶
func (l *ChannelList) SyncMcu()
actual sync with mcu, called from main runloop (sync channel)
func (*ChannelList) UpdateSpecialInputs ¶
func (l *ChannelList) UpdateSpecialInputs() error
TODO: check for changes reads the special inputs from obs on start newly added inputs are detected by the event handler
func (*ChannelList) UpdateVisible ¶
func (l *ChannelList) UpdateVisible()
get all visible channels from obs and set their state locally TODO: other way to get active ones initially?
type ObsStates ¶ added in v0.2.4
type ObsStates struct {
// contains filtered or unexported fields
}
func NewObsStates ¶ added in v0.2.4
func NewObsStates() *ObsStates