Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAutorestartProcesses()
- func ConfigDir() string
- func ConfigFilePath(nm string) string
- func GetPaletteVersion() string
- func Hostname() string
- func HttpApiRaw(url string, args string) (map[string]string, error)
- func InitLog(logname string)
- func IsRunning(process string) bool
- func KillAllExceptMonitor()
- func KillProcess(exe string)
- func LoadImage(path string) (*image.NRGBA, error)
- func LoadMorphs() error
- func LocalPaletteDir() string
- func LogError(err error, keysAndValues ...any)
- func LogFilePath(nm string) string
- func LogIfError(err error, keysAndValues ...any)
- func LogInfo(msg string, keysAndValues ...any)
- func LogWarn(msg string, keysAndValues ...any)
- func MIDIFilePath(nm string) string
- func MonitorIsRunning() bool
- func NewExecutableLogWriter(exe string) io.Writer
- func PaletteDataPath() string
- func PaletteDir() string
- func ProcessList() []string
- func ReadConfigFile(path string) (map[string]string, error)
- func ReadableSavedFilePath(category string, filename string) (string, error)
- func SavedDir() string
- func SavedMap(wantCategory string) (map[string]string, error)
- func SendMail(body string) error
- func SendMailWithAttachment(body, attachfile string) error
- func Spawn(executable string, background bool, stdout io.Writer, stderr io.Writer, ...) error
- func StartDeviceInput()
- func StartPlusUptime(startdate string, uptime float64) string
- func StartRunning(process string) error
- func SummarizeLog(fname string) error
- func WritableSavedFilePath(category string, filename string) (string, error)
- type FileWriter
- type HostWin
- func (h HostWin) Activate()
- func (h HostWin) ActivateAudio()
- func (h HostWin) ArchiveLogs() error
- func (h HostWin) EngineHttpApi(api string, args ...string) (map[string]string, error)
- func (h HostWin) EveryTick()
- func (h HostWin) FileExists(filepath string) bool
- func (h HostWin) FreeframeClientFor(patchName string) *osc.Client
- func (h HostWin) GenerateVisualsFromCursor(ce kit.CursorEvent, patchName string)
- func (h HostWin) GetConfigFileData(filename string) ([]byte, error)
- func (h HostWin) GetSavedData(category string, filename string) (bytes []byte, err error)
- func (h HostWin) HandleIncomingMidiEvent(me kit.MidiEvent)
- func (h HostWin) Init() error
- func (h HostWin) InputEventLock()
- func (h HostWin) InputEventUnlock()
- func (h HostWin) KillProcess(process string) (err error)
- func (h HostWin) LogError(err error, keysAndValues ...any)
- func (h HostWin) LogIfError(err error, keysAndValues ...any)
- func (h HostWin) LogInfo(msg string, keysAndValues ...any)
- func (h HostWin) LogWarn(msg string, keysAndValues ...any)
- func (h HostWin) MmttHttpApi(api string) (map[string]string, error)
- func (h HostWin) PortAndLayerNumForPatch(patchName string) (portNum, layerNum int)
- func (h HostWin) ProcessInfo() *ProcessInfo
- func (h HostWin) ProcessInfoBidule() *ProcessInfo
- func (h HostWin) ResetAudio()
- func (h HostWin) SaveDataInFile(data []byte, category string, filename string) error
- func (h HostWin) SavedFileList(category string) ([]string, error)
- func (h HostWin) SayDone()
- func (h HostWin) SendEffectParam(patchName string, name string, value string)
- func (h HostWin) SendMIDI(output any, bytes []byte) error
- func (h HostWin) SendOsc(client *osc.Client, msg *osc.Message)
- func (h HostWin) SendToOscClients(msg *osc.Message)
- func (h HostWin) SetMidiInput(midiInputName string) error
- func (h HostWin) ShowClip(clipNum int)
- func (h HostWin) ShowText(text string)
- func (h HostWin) Start()
- func (h HostWin) StartHttp(port int)
- func (h HostWin) StartOscListener(port int)
- func (h HostWin) StartRunning(process string) (err error)
- func (h HostWin) TextLayerNum() int
- func (h HostWin) ToFreeFramePlugin(patchName string, msg *osc.Message)
- func (h HostWin) WaitTillDone()
- type MIDIDeviceEvent
- type NoWriter
- type ProcessInfo
- type ProcessManager
- func (pm *ProcessManager) AddBuiltins()
- func (pm *ProcessManager) AddProcess(process string, info *ProcessInfo)
- func (pm *ProcessManager) AddProcessBuiltIn(process string)
- func (pm *ProcessManager) CheckAutorestartProcesses()
- func (pm *ProcessManager) GetProcessInfo(process string) (*ProcessInfo, error)
- func (pm *ProcessManager) IsAvailable(process string) bool
- func (pm *ProcessManager) IsRunning(process string) bool
- func (pm *ProcessManager) KillProcess(process string) (err error)
- func (pm *ProcessManager) ProcessStatus() string
- func (pm *ProcessManager) StartRunning(process string) error
- type Router
Constants ¶
const BidulePort = 3210
Variables ¶
var BiduleExe = "bidule.exe"
var EngineExe = "palette_engine.exe"
var EngineHttpPort = 3330
var EventClientPort = 6666
var FullDataPath string
var GuiExe = "palette_gui.exe"
var GuiPort = 3943
var LocalAddress = "127.0.0.1"
var MmttExe = "mmtt_kinect.exe"
var KeykitExe = "key.exe"
var MmttHttpPort = 4444
var MonitorExe = "palette_monitor.exe"
var MorphDefs map[string]string
MorphDefs xxx
var NoWriterInstance io.Writer
var OscPort = 3333
var PaletteExe = "palette.exe"
var ResolumeExe = "avenue.exe"
var ResolumeJSON map[string]any
ResolumeJSON is an unmarshalled version of the resolume.json file
var ResolumePort = 7000
var TheLog *zap.SugaredLogger
var TheRand *rand.Rand
Functions ¶
func CheckAutorestartProcesses ¶
func CheckAutorestartProcesses()
func ConfigFilePath ¶
func GetPaletteVersion ¶
func GetPaletteVersion() string
func InitLog ¶
func InitLog(logname string)
InitLog creates a logger to a log file, or stdout if logname is "".
func KillAllExceptMonitor ¶
func KillAllExceptMonitor()
func LocalPaletteDir ¶
func LocalPaletteDir() string
LocalPaletteDir gets used for local (and changed) things in saved and config.
func LogFilePath ¶
func LogIfError ¶
func MonitorIsRunning ¶
func MonitorIsRunning() bool
func NewExecutableLogWriter ¶
func PaletteDataPath ¶
func PaletteDataPath() string
func ProcessList ¶
func ProcessList() []string
func ReadConfigFile ¶
ReadConfigFile xxx
func ReadableSavedFilePath ¶
ReadableSavedFilePath returns the full path of a saved file. The value of filename isn't trusted, verify its sanity.
func SavedMap ¶
SavedMap returns a map of saved names to file paths The saved names are of the form "category.name". If wantCategory is "*", all categories are returned
func SendMailWithAttachment ¶
SendMail xxx
func Spawn ¶
func Spawn(executable string, background bool, stdout io.Writer, stderr io.Writer, args ...string) error
Spawn executes something. If background is true, it doesn't block
func StartDeviceInput ¶
func StartDeviceInput()
StartDeviceInput starts anything needed to provide device inputs
func StartPlusUptime ¶
func StartRunning ¶
func SummarizeLog ¶
Types ¶
type FileWriter ¶
type FileWriter struct {
Exe string
}
type HostWin ¶
type HostWin struct {
// contains filtered or unexported fields
}
var TheWinHost *HostWin
func (HostWin) ActivateAudio ¶
func (h HostWin) ActivateAudio()
func (HostWin) ArchiveLogs ¶
func (HostWin) EngineHttpApi ¶
func (HostWin) FileExists ¶
func (HostWin) FreeframeClientFor ¶
func (HostWin) GenerateVisualsFromCursor ¶
func (h HostWin) GenerateVisualsFromCursor(ce kit.CursorEvent, patchName string)
func (HostWin) GetConfigFileData ¶
func (HostWin) GetSavedData ¶
func (HostWin) HandleIncomingMidiEvent ¶
func (HostWin) InputEventLock ¶
func (h HostWin) InputEventLock()
func (HostWin) InputEventUnlock ¶
func (h HostWin) InputEventUnlock()
func (HostWin) KillProcess ¶
func (HostWin) LogIfError ¶
func (HostWin) PortAndLayerNumForPatch ¶
func (HostWin) ProcessInfo ¶
func (h HostWin) ProcessInfo() *ProcessInfo
func (HostWin) ProcessInfoBidule ¶
func (h HostWin) ProcessInfoBidule() *ProcessInfo
func (HostWin) ResetAudio ¶
func (h HostWin) ResetAudio()
func (HostWin) SaveDataInFile ¶
func (HostWin) SavedFileList ¶
SavedArray returns a list of saved filenames for a particular category.
func (HostWin) SendEffectParam ¶
func (HostWin) SendToOscClients ¶
func (HostWin) SetMidiInput ¶
func (HostWin) ShowClip ¶
In text layer, clip 1 is the animated text generator for the preset names, and clips 2,3,... are images for startup and reboot.
func (HostWin) StartOscListener ¶
func (HostWin) StartRunning ¶
func (HostWin) TextLayerNum ¶
func (HostWin) ToFreeFramePlugin ¶
func (HostWin) WaitTillDone ¶
func (h HostWin) WaitTillDone()
type MIDIDeviceEvent ¶
type MIDIDeviceEvent struct { Timestamp int64 // milliseconds Status int64 Data1 int64 Data2 int64 }
MIDIDeviceEvent is a single MIDI event
type ProcessInfo ¶
type ProcessInfo struct { Exe string // just the last part FullPath string Arg string Activate func() Activated bool }
func GuiProcessInfo ¶
func GuiProcessInfo() *ProcessInfo
func MmttProcessInfo ¶
func MmttProcessInfo() *ProcessInfo
func NewProcessInfo ¶
func NewProcessInfo(exe, fullPath, arg string, activate func()) *ProcessInfo
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
var TheProcessManager *ProcessManager
func NewProcessManager ¶
func NewProcessManager() *ProcessManager
func (*ProcessManager) AddBuiltins ¶
func (pm *ProcessManager) AddBuiltins()
func (*ProcessManager) AddProcess ¶
func (pm *ProcessManager) AddProcess(process string, info *ProcessInfo)
func (*ProcessManager) AddProcessBuiltIn ¶
func (pm *ProcessManager) AddProcessBuiltIn(process string)
func (*ProcessManager) CheckAutorestartProcesses ¶
func (pm *ProcessManager) CheckAutorestartProcesses()
CheckAutorestartProcesses will restart processes that were started but are no longer running.
func (*ProcessManager) GetProcessInfo ¶
func (pm *ProcessManager) GetProcessInfo(process string) (*ProcessInfo, error)
func (*ProcessManager) IsAvailable ¶
func (pm *ProcessManager) IsAvailable(process string) bool
func (*ProcessManager) IsRunning ¶
func (pm *ProcessManager) IsRunning(process string) bool
func (*ProcessManager) KillProcess ¶
func (pm *ProcessManager) KillProcess(process string) (err error)
func (*ProcessManager) ProcessStatus ¶
func (pm *ProcessManager) ProcessStatus() string
func (*ProcessManager) StartRunning ¶
func (pm *ProcessManager) StartRunning(process string) error
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router takes events and routes them
var TheRouter *Router
func (*Router) InputListenOnce ¶
func (r *Router) InputListenOnce()
func (*Router) InputListener ¶
func (r *Router) InputListener()
InputListener listens for local device inputs (OSC, MIDI) them in a single select eliminates some need for locking.