Documentation ¶
Index ¶
- Constants
- Variables
- func ArchiveLogs() error
- func ArgToFloat(nm string, args map[string]string) float32
- func ArgToInt(nm string, args map[string]string) int
- func BoundAndScaleController(v, vmin, vmax float32, cmin, cmax int) int
- func BoundAndScaleFloat(v, vmin, vmax, outmin, outmax float32) float32
- func ChangeClicksPerSecond(factor float64)
- func CheckAutorestartProcesses()
- func ClearExternalScale()
- func Clicks2Seconds(clk Clicks) float64
- func ConfigDir() string
- func ConfigFilePath(nm string) string
- func CopyDir(src, dest string) error
- func CurrentMilli() int64
- func CurrentMilliOffset() int64
- func CursorToOscMsg(ce CursorEvent) *osc.Message
- func EngineApi(api string, apiargs ...string) (map[string]string, error)
- func EngineRemoteApi(api string, args ...string) (map[string]string, error)
- func EraeBitize7chksum(in []byte) (out []byte, chksum byte)
- func EraeUnbitize7chksum(in []byte) ([]byte, byte)
- func ErrorResponse(err error) string
- func ErrorResult(err string) string
- func ExtractAndRemoveValueOf(valName string, argsmap map[string]string) string
- func FileExists(filepath string) bool
- func Float32bytes(float float32) []byte
- func Float32frombytes(bytes []byte) float32
- func GetArgsXYZ(args map[string]string) (x, y, z float32, err error)
- func GetNameValue(apiargs map[string]string) (name string, value string, err error)
- func GetPaletteVersion() string
- func GetParam(name string) (string, error)
- func GetParamBool(nm string) (bool, error)
- func GetParamFloat(nm string) (float64, error)
- func GetParamInt(nm string) (int, error)
- func GoroutineID() uint64
- func Hostname() string
- func HumanReadableApiOutput(apiOutput map[string]string) string
- func InitEngine()
- func InitLog(logname string)
- func InitLogTypes()
- func InitMisc()
- func InitParams()
- func InitSynths()
- func InitializeClicksPerSecond(clkpersec Clicks)
- func IsLogging(logtype string) bool
- func IsPatchCategory(category string) bool
- func IsPerPatchParam(name string) bool
- func IsRunning(process string) bool
- func IsTrueValue(value string) bool
- func JsonObject(args ...string) string
- func JsonString(args ...string) string
- func KillAllExceptMonitor()
- func KillProcess(exe string)
- func LoadImage(path string) (*image.NRGBA, error)
- func LoadMorphs() error
- func LoadParamDefs() error
- func LoadParamEnums() 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 LogOfType(logtypes string, msg string, keysAndValues ...any)
- func LogWarn(msg string, keysAndValues ...any)
- func MIDIFilePath(nm string) string
- func MapString(amap map[string]string) string
- func MidiToOscMsg(me MidiEvent) *osc.Message
- func MmttApi(api string) (map[string]string, error)
- func MmttRemoteApi(api string) (map[string]string, error)
- func MonitorIsRunning() bool
- func NewClickMsg(click Clicks) string
- func NewExecutableLogWriter(exe string) io.Writer
- func NewSetParamMsg(name string, value string) string
- func OkResult() string
- func PaletteDataPath() string
- func PaletteDir() string
- func ParseBool(s string, name string) (bool, error)
- func ParseFloat32(s string, name string) (float32, error)
- func ParseInt(s string, name string) (int, error)
- func PatchNames() []string
- func ProcessList() []string
- func ReadConfigFile(path string) (map[string]string, error)
- func ReadableSavedFilePath(category string, filename string, suffix string) (string, error)
- func RemoteApiRaw(url string, args string) (map[string]string, error)
- func ResultResponse(resultObj any) string
- func SavedDir() string
- func SavedFileList(category string) ([]string, error)
- func SavedList(apiargs map[string]string) (string, error)
- func SavedMap(wantCategory string) (map[string]string, error)
- func SavedNameSplit(saved string) (string, string)
- func ScheduleAt(atClick Clicks, tag string, value any)
- func SendMail(body string) error
- func SendMailWithAttachment(body, attachfile string) error
- func SetClicksPerSecond(cps Clicks)
- func SetCurrentClick(click Clicks)
- func SetCurrentClickOffset(click Clicks)
- func SetCurrentMilli(milli int64)
- func SetCurrentMilliOffset(milli int64)
- func SetExternalScale(pitch uint8, on bool)
- func SetLogTypeEnabled(dtype string, b bool)
- func SetLogTypes(logtypes string)
- func Spawn(executable string, background bool, stdout io.Writer, stderr io.Writer, ...) error
- func Start()
- func StartDeviceInput()
- func StartPlusUptime(startdate string, uptime float64) string
- func StartRunning(process string) error
- func StartTwitch()
- func String(arg any) string
- func StringMap(params string) (map[string]string, error)
- func SummarizeLog(fname string) error
- func ToBool(arg any) bool
- func TwitchUser() (username string, authtoken string)
- func Uptime() float64
- func WaitTillDone()
- func WritableSavedFilePath(category string, filename string, suffix string) (string, error)
- type ActiveCursor
- type AttractManager
- type Bidule
- type ChanPressure
- type ClickEvent
- type Clicks
- type Cmd
- func (cmd Cmd) ValuesBool(name string, dflt bool) bool
- func (cmd Cmd) ValuesColor(dflt color.RGBA) color.RGBA
- func (cmd Cmd) ValuesFloat(name string, dflt float32) float32
- func (cmd Cmd) ValuesInt(name string, dflt int) int
- func (cmd Cmd) ValuesPos(dflt image.Point) image.Point
- func (cmd Cmd) ValuesRect(dflt image.Rectangle) image.Rectangle
- func (cmd Cmd) ValuesSetPos(pos image.Point)
- func (cmd Cmd) ValuesSetXY(key string, pos image.Point)
- func (cmd Cmd) ValuesSetXY0(pos image.Point)
- func (cmd Cmd) ValuesSetXY1(pos image.Point)
- func (cmd Cmd) ValuesSize(dflt image.Point) image.Point
- func (cmd Cmd) ValuesString(name string, dflt string) string
- func (cmd Cmd) ValuesToString() string
- func (cmd Cmd) ValuesUint8(name string, dflt uint8) uint8
- func (cmd Cmd) ValuesXY(xyname string, dflt image.Point) image.Point
- func (cmd Cmd) ValuesXY0(dflt image.Point) image.Point
- func (cmd Cmd) ValuesXY1(dflt image.Point) image.Point
- func (cmd Cmd) VerifyValues(names ...string) bool
- type Command
- type Controller
- type CursorCallbackFunc
- type CursorEvent
- type CursorHandler
- type CursorManager
- func (cm *CursorManager) AddCursorHandler(name string, handler CursorHandler, sources ...string)
- func (cm *CursorManager) CheckAutoCursorUp()
- func (cm *CursorManager) ClearAllActiveCursors(tag string)
- func (cm *CursorManager) DeleteActiveCursor(gid int)
- func (cm *CursorManager) DeleteActiveCursorIfZLessThan(gid int, threshold float32)
- func (cm *CursorManager) DeleteActiveCursorsForTag(tag string)
- func (cm *CursorManager) ExecuteCursorEvent(ce CursorEvent)
- func (cm *CursorManager) GenerateGesture(tag string, numsteps int, dur time.Duration, pos0 CursorPos, pos1 CursorPos)
- func (cm *CursorManager) GenerateRandomGesture(tag string, numsteps int, dur time.Duration)
- func (cm *CursorManager) LoopCursorEvent(ac *ActiveCursor) *SchedElement
- func (cm *CursorManager) LoopedGidFor(ce CursorEvent, warn bool) int
- func (cm *CursorManager) PlayCursor(tag string, dur time.Duration, pos CursorPos)
- func (cm *CursorManager) UniqueGid() int
- type CursorPos
- type Engine
- func (e *Engine) ExecuteApi(api string, apiargs map[string]string) (result string, err error)
- func (e *Engine) ExecuteApiFromJson(rawjson string) (string, error)
- func (e *Engine) LoadCurrent() (err error)
- func (e *Engine) LoadEngineParams(fname string) (err error)
- func (e *Engine) NewRecordingPath() (string, error)
- func (e *Engine) RecordCursorEvent(event CursorEvent)
- func (e *Engine) RecordMidiEvent(event *MidiEvent)
- func (e *Engine) RecordOscEvent(event *OscEvent)
- func (e *Engine) RecordPlaybackEvent(event PlaybackEvent)
- func (e *Engine) RecordStartEvent()
- func (e *Engine) RecordStopEvent()
- func (e *Engine) RecordingPath(fname string) string
- func (e *Engine) SaveCurrent() (err error)
- func (e *Engine) SayDone()
- func (e *Engine) SendOsc(client *osc.Client, msg *osc.Message)
- func (e *Engine) Set(name string, value string) error
- func (e *Engine) SetAutoTransposeBeats(beats int)
- func (e *Engine) SetTranspose(i int)
- func (e *Engine) Start()
- func (e *Engine) StartHttp(port int)
- func (e *Engine) StartOscListener(port int)
- func (e *Engine) StartPlayback(fname string) error
- func (e *Engine) StartRecording() (string, error)
- func (e *Engine) StopRecording() (string, error)
- func (e *Engine) WaitTillDone()
- type Erae
- func (erae *Erae) EraeApiModeDisable()
- func (erae *Erae) EraeApiModeEnable()
- func (erae *Erae) EraeFingerIndicator(zone, x, y byte)
- func (erae *Erae) EraeWriteSysEx(bytes []byte)
- func (erae *Erae) EraeZoneBoundaryRequest(zone byte)
- func (erae *Erae) EraeZoneClearDisplay(zone byte)
- func (erae *Erae) EraeZoneClearPixel(zone, x, y, r, g, b byte)
- func (erae *Erae) EraeZoneRectangle(zone, x, y, w, h, r, g, b byte)
- func (erae *Erae) Start()
- type Event
- type FileWriter
- type MIDIDeviceEvent
- type MIDIEventHandler
- type MidiEvent
- type NoWriter
- type NoteBytes
- type NoteFull
- type NoteOff
- type NoteOn
- type NoteSystem
- type OscEvent
- type ParamDef
- type ParamDefBool
- type ParamDefFloat
- type ParamDefInt
- type ParamDefString
- type ParamValue
- type ParamValues
- func (params *ParamValues) ApplyValuesFromMap(category string, paramsmap map[string]any, setfunc func(string, string) error)
- func (vals *ParamValues) DoForAllParams(f func(string, ParamValue))
- func (vals *ParamValues) Exists(name string) bool
- func (vals *ParamValues) Get(name string) (string, error)
- func (vals *ParamValues) GetBoolValue(name string) bool
- func (vals *ParamValues) GetFloatValue(name string) float32
- func (vals *ParamValues) GetIntValue(name string) int
- func (vals *ParamValues) GetStringValue(name string, def string) string
- func (vals *ParamValues) JsonValues() string
- func (vals *ParamValues) ParamNames() []string
- func (vals *ParamValues) Save(category string, filename string) error
- func (vals *ParamValues) Set(name, value string) error
- type ParamsMap
- type Patch
- func (patch *Patch) Api(api string, apiargs map[string]string) (string, error)
- func (patch *Patch) ApplyPatchValuesFromQuadMap(paramsmap map[string]any) error
- func (patch *Patch) CursorToQuant(ce CursorEvent) Clicks
- func (patch *Patch) Get(paramName string) string
- func (patch *Patch) GetBool(paramName string) bool
- func (patch *Patch) GetFloat(paramName string) float32
- func (patch *Patch) GetInt(paramName string) int
- func (patch *Patch) Load(category string, filename string) error
- func (patch *Patch) MIDIChannel() uint8
- func (patch *Patch) Name() string
- func (patch *Patch) ParamNames() []string
- func (patch *Patch) RefreshAllIfPortnumMatches(ffglportnum int)
- func (patch *Patch) RefreshAllPatchValues()
- func (patch *Patch) SaveAndAlert(category string, filename string) error
- func (patch *Patch) SaveQuadAndAlert() error
- func (patch *Patch) Set(paramName string, paramValue string) error
- func (patch *Patch) SetDefaultValues()
- func (patch *Patch) Status() string
- func (patch *Patch) Synth() *Synth
- type PatchLogic
- type Phrase
- func (p *Phrase) AdjustTimes(shift Clicks) *Phrase
- func (p *Phrase) Arpeggio() *Phrase
- func (p *Phrase) AtTime(tm Clicks) *Phrase
- func (p *Phrase) Copy() *Phrase
- func (p *Phrase) CopyAndAppend(elem *PhraseElement) *PhraseElement
- func (p *Phrase) CutSound(sound string) *Phrase
- func (p *Phrase) CutTime(fromclick, toclick Clicks) *Phrase
- func (p *Phrase) InsertElement(item *PhraseElement) *Phrase
- func (p *Phrase) InsertNoLock(pe *PhraseElement) *Phrase
- func (p *Phrase) Legato() *Phrase
- func (p *Phrase) Lock()
- func (p *Phrase) LowestPitch(delta int) uint8
- func (p *Phrase) Merge(fromPhrase *Phrase) *Phrase
- func (p *Phrase) NextTime(st Clicks) Clicks
- func (p *Phrase) RLock()
- func (p *Phrase) RUnlock()
- func (p *Phrase) ResetLengthNoLock()
- func (p *Phrase) Step(stepsize Clicks) *Phrase
- func (p *Phrase) Transpose(delta int) *Phrase
- func (p *Phrase) Unlock()
- type PhraseElement
- type PhraseScanner
- type PitchBend
- type PlaybackEvent
- type PortChannel
- 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 ProgramChange
- type QuadPro
- func (quadpro *QuadPro) Api(api string, apiargs map[string]string) (result string, err error)
- func (quadpro *QuadPro) Load(category string, filename string) error
- func (quadpro *QuadPro) PatchForCursorEvent(ce CursorEvent) (patch *Patch, button string)
- func (quadpro *QuadPro) Start()
- func (quadpro *QuadPro) Status(source string) string
- func (quadpro *QuadPro) Stop()
- type RecordingEvent
- type Resolume
- func (r *Resolume) Activate()
- func (r *Resolume) PortAndLayerNumForPatch(patchName string) (portNum, layerNum int)
- func (r *Resolume) ProcessInfo() *ProcessInfo
- func (r *Resolume) SendEffectParam(patchName string, name string, value string)
- func (r *Resolume) TextLayerNum() int
- func (r *Resolume) ToFreeFramePlugin(patchName string, msg *osc.Message)
- type Router
- type Scale
- type SchedElement
- type Scheduler
- func (sched *Scheduler) CountEventsWithTag(tag string) int
- func (sched *Scheduler) DeleteCursorEventsWhoseGidIs(gid int)
- func (sched *Scheduler) DeleteEventsWithTag(tag string)
- func (sched *Scheduler) Format(f fmt.State, c rune)
- func (sched *Scheduler) PendingToString() string
- func (sched *Scheduler) Start()
- func (sched *Scheduler) ToString() string
- type Synth
- func (synth *Synth) Channel() uint8
- func (synth *Synth) ClearNoteDowns()
- func (synth *Synth) SendANO()
- func (synth *Synth) SendBytes(bytes []byte) error
- func (synth *Synth) SendBytesToMidiOutput(bytes []byte)
- func (synth *Synth) SendController(cnum uint8, cval uint8)
- func (synth *Synth) SendNoteToMidiOutput(value any)
- func (synth *Synth) UpdateBankProgram()
- type Token
- type VizColor
Constants ¶
const BidulePort = 3210
const EventAll = EventMidiInput | EventNoteOutput | EventCursor
const EventCursor = 0x04
const EventMidiInput = 0x01
Bits for Events
const EventNoteOutput = 0x02
const PatchNameSeparator = "-"
In a quad file, the parameter names are of the form: {patchName}-{parametername}.
Variables ¶
var BiduleExe = "bidule.exe"
var BugFixWarningCount = 0
var DataDir = "data_omnisphere" // default, override with environment variable
var EighthNote = Clicks(12)
var EngineExe = "palette_engine.exe"
var EngineHttpPort = 3330
var EventClientPort = 6666
var FirstTime = true
var FullDataPath string
var GuiExe = "palette_gui.exe"
var GuiPort = 3943
var HalfNote = Clicks(48)
var KeykitExe = "key.exe"
var LocalAddress = "127.0.0.1"
var LogEnabled = map[string]bool{ "*": false, "advance": false, "api": false, "attract": false, "bidule": false, "config": false, "cursor": false, "drawing": false, "erae": false, "exec": false, "ffgl": false, "freeframe": false, "gensound": false, "genvisual": false, "gesture": false, "go": false, "goroutine": false, "info": false, "patch": false, "process": false, "keykit": false, "layerapi": false, "listeners": false, "load": false, "loop": false, "midi": false, "midicontroller": false, "midiports": false, "mmtt": false, "morph": false, "mouse": false, "nats": false, "note": false, "notify": false, "osc": false, "params": false, "phrase": false, "plugin": false, "quant": false, "saved": false, "realtime": false, "resolume": false, "remote": false, "router": false, "scale": false, "scheduler": false, "task": false, "transpose": false, "value": false, }
var LogMutex sync.Mutex
var MaxClicks = Clicks(math.MaxInt64)
MaxClicks is the high-possible value for Clicks
var MmttExe = "mmtt_kinect.exe"
var MmttHttpPort = 4444
var MonitorExe = "palette_monitor.exe"
var MorphDefs map[string]string
MorphDefs xxx
var NoWriterInstance io.Writer
var OneBeatMutex sync.RWMutex
var OscPort = 3333
var PaletteExe = "palette.exe"
var ParamDefs map[string]ParamDef
ParamDefs is the set of all parameter definitions
var ParamEnums map[string][]string
ParamEnums contains the lists of enumerated values for string parameters
var Patchs = map[string]*Patch{}
var PitchSets = map[string][]uint8{
"stylusrmx": {36, 37, 38, 39, 42, 43, 51, 49},
}
var PointZero image.Point = image.Point{0, 0}
var PortChannels map[PortChannel]*MIDIPortChannelState
var QuarterNote = Clicks(24)
var ResolumeExe = "avenue.exe"
var ResolumeJSON map[string]any
ResolumeJSON is an unmarshalled version of the resolume.json file
var ResolumePort = 7000
var SixteenthNote = Clicks(6)
var Synths map[string]*Synth
var TempoFactor = float64(1.0)
TempoFactor xxx
var TheLog *zap.SugaredLogger
var TheRand *rand.Rand
var ThirtySecondNote = Clicks(3)
var Time0 = time.Time{}
var WholeNote = Clicks(96)
Functions ¶
func ArchiveLogs ¶
func ArchiveLogs() error
func BoundAndScaleController ¶
func BoundAndScaleFloat ¶
func ChangeClicksPerSecond ¶
func ChangeClicksPerSecond(factor float64)
ChangeClicksPerSecond is what you use to change the tempo
func CheckAutorestartProcesses ¶
func CheckAutorestartProcesses()
func ClearExternalScale ¶
func ClearExternalScale()
func Clicks2Seconds ¶
Clicks2Seconds converts Clicks to Time (seconds), relative
func ConfigFilePath ¶
func CurrentMilli ¶
func CurrentMilli() int64
func CurrentMilliOffset ¶
func CurrentMilliOffset() int64
func CursorToOscMsg ¶
func CursorToOscMsg(ce CursorEvent) *osc.Message
func EraeBitize7chksum ¶
7-bitize an array of bytes and get the resulting checksum Algorithm taken from Erae documentation. Return value is the output bytes and checksum
func EraeUnbitize7chksum ¶
7-unbitize an array of bytes and get the incomming checksum Algorithm taken from Erae documentation. Return value is the output bytes and checksum
func ExtractAndRemoveValueOf ¶
ExtractAndRemoveValueOf removes a named value from a map and returns it. If the value doesn't exist, "" is returned.
func FileExists ¶
func Float32bytes ¶
func Float32frombytes ¶
func GetNameValue ¶
func GetPaletteVersion ¶
func GetPaletteVersion() string
func GetParamBool ¶
func GetParamFloat ¶
func GetParamInt ¶
func GoroutineID ¶
func GoroutineID() uint64
func HumanReadableApiOutput ¶
humanReadableApiOutput takes the result of an API invocation and produces what will appear in visible output from a CLI command.
func InitEngine ¶
func InitEngine()
func InitLog ¶
func InitLog(logname string)
InitLog creates a logger to a log file, or stdout if logname is "".
func InitLogTypes ¶
func InitLogTypes()
func InitParams ¶
func InitParams()
func InitSynths ¶
func InitSynths()
func InitializeClicksPerSecond ¶
func InitializeClicksPerSecond(clkpersec Clicks)
InitializeClicksPerSecond initializes
func IsPatchCategory ¶
func IsPerPatchParam ¶
func IsTrueValue ¶
IsTrueValue returns true if the value is some version of true, and false otherwise.
func JsonObject ¶
func JsonString ¶
func KillAllExceptMonitor ¶
func KillAllExceptMonitor()
func LoadParamEnums ¶
func LoadParamEnums() error
LoadParamEnums initializes the list of enumerated parameter values
func LocalPaletteDir ¶
func LocalPaletteDir() string
LocalPaletteDir gets used for local (and changed) things in saved and config
func LogIfError ¶
func MidiToOscMsg ¶
func MonitorIsRunning ¶
func MonitorIsRunning() bool
func NewExecutableLogWriter ¶
func NewSetParamMsg ¶
func PaletteDataPath ¶
func PaletteDataPath() string
func PatchNames ¶
func PatchNames() []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 ResultResponse ¶
ResultResponse returns a JSON 2.0 result response
func SavedFileList ¶
SavedArray returns a list of saved filenames for a particular category.
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 SavedNameSplit ¶
func ScheduleAt ¶
func SendMailWithAttachment ¶
SendMail xxx
func SetClicksPerSecond ¶
func SetClicksPerSecond(cps Clicks)
func SetCurrentClick ¶
func SetCurrentClick(click Clicks)
func SetCurrentClickOffset ¶
func SetCurrentClickOffset(click Clicks)
func SetCurrentMilli ¶
func SetCurrentMilli(milli int64)
func SetCurrentMilliOffset ¶
func SetCurrentMilliOffset(milli int64)
func SetExternalScale ¶
func SetLogTypeEnabled ¶
func SetLogTypes ¶
func SetLogTypes(logtypes string)
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 StartTwitch ¶
func StartTwitch()
func SummarizeLog ¶
func TwitchUser ¶
func WaitTillDone ¶
func WaitTillDone()
Types ¶
type ActiveCursor ¶
type ActiveCursor struct { Current CursorEvent Previous CursorEvent NoteOn *NoteOn NoteOnClick Clicks Patch *Patch Button string // contains filtered or unexported fields }
OscEvent is an OSC message
func NewActiveCursor ¶
func NewActiveCursor(ce CursorEvent) *ActiveCursor
NewActiveCursor - create a new ActiveCursor for a CursorEvent An ActiveCursor can be for a Button or a Patch area.
type AttractManager ¶
type AttractManager struct {
// contains filtered or unexported fields
}
var TheAttractManager *AttractManager
func NewAttractManager ¶
func NewAttractManager() *AttractManager
func (*AttractManager) AttractModeIsOn ¶
func (am *AttractManager) AttractModeIsOn() bool
func (*AttractManager) SetAttractEnabled ¶
func (am *AttractManager) SetAttractEnabled(b bool)
func (*AttractManager) SetAttractMode ¶
func (am *AttractManager) SetAttractMode(onoff bool)
type Bidule ¶
type Bidule struct {
// contains filtered or unexported fields
}
func (*Bidule) ProcessInfo ¶
func (b *Bidule) ProcessInfo() *ProcessInfo
type ChanPressure ¶
func NewChanPressure ¶
func NewChanPressure(channel, pressure uint8) *ChanPressure
func (*ChanPressure) String ¶
func (n *ChanPressure) String() string
type ClickEvent ¶
type Clicks ¶
type Clicks int64
Clicks is a time or duration value. NOTE: A Clicks value can be negative because it's sometimes relative to the starting time of a Phrase. XXX - possiblycould have a type to distinguish Clicks that are XXX - used as absolute time versus Clicks that are step numbers
var OneBeat Clicks
func ClicksPerSecond ¶
func ClicksPerSecond() Clicks
func CurrentClick ¶
func CurrentClick() Clicks
func CurrentClickOffset ¶
func CurrentClickOffset() Clicks
func Seconds2Clicks ¶
Seconds2Clicks converts a Time value (elapsed seconds) to Clicks
type Cmd ¶
func NewSimpleCmd ¶
func (Cmd) ValuesSetPos ¶
func (Cmd) ValuesSetXY0 ¶
func (Cmd) ValuesSetXY1 ¶
func (Cmd) ValuesToString ¶
func (Cmd) VerifyValues ¶
type Controller ¶
func NewController ¶
func NewController(channel, controller, value uint8) *Controller
NewController create a new noteoff
func (*Controller) String ¶
func (n *Controller) String() string
type CursorEvent ¶
type CursorEvent struct { // Named CClick to catch everyone that accesses it CClick Clicks `json:"Click"` Gid int `json:"Gid"` Tag string `json:"Tag"` // Source string Ddu string `json:"Ddu"` // "down", "drag", "up" (sometimes "clear") Pos CursorPos `json:"Pos"` Area float32 `json:"Area"` }
CursorEvent is a single Cursor event. NOTE: it's assumed that we can copy a CursorEvent by copying the value. Do note add pointers to this struct.
func CursorEventFromString ¶
func CursorEventFromString(s string) (ce CursorEvent, err error)
func NewCursorClearEvent ¶
func NewCursorClearEvent() CursorEvent
func NewCursorEvent ¶
func NewCursorEvent(gid int, tag string, ddu string, pos CursorPos) CursorEvent
func (CursorEvent) GetClick ¶
func (ce CursorEvent) GetClick() Clicks
func (CursorEvent) IsAttractGenerated ¶
func (ce CursorEvent) IsAttractGenerated() bool
func (CursorEvent) Marshal ¶
func (ce CursorEvent) Marshal() (bytes []byte, err error)
XXX - can this make use of generics? (across all the Event types)
func (*CursorEvent) SetClick ¶
func (ce *CursorEvent) SetClick(click Clicks)
func (*CursorEvent) Source ¶
func (ce *CursorEvent) Source() string
type CursorHandler ¶
type CursorHandler interface {
// contains filtered or unexported methods
}
type CursorManager ¶
type CursorManager struct { ClickMutex sync.RWMutex GidToLoopedGidMutex sync.RWMutex GidToLoopedGid map[int]int LoopThreshold float32 // contains filtered or unexported fields }
var TheCursorManager *CursorManager
func NewCursorManager ¶
func NewCursorManager() *CursorManager
func (*CursorManager) AddCursorHandler ¶
func (cm *CursorManager) AddCursorHandler(name string, handler CursorHandler, sources ...string)
func (*CursorManager) CheckAutoCursorUp ¶
func (cm *CursorManager) CheckAutoCursorUp()
func (*CursorManager) ClearAllActiveCursors ¶
func (cm *CursorManager) ClearAllActiveCursors(tag string)
func (*CursorManager) DeleteActiveCursor ¶
func (cm *CursorManager) DeleteActiveCursor(gid int)
func (*CursorManager) DeleteActiveCursorIfZLessThan ¶
func (cm *CursorManager) DeleteActiveCursorIfZLessThan(gid int, threshold float32)
DeleteActiveCursorIfZLessThan deletes the ActiveCursor if its Z value is less than threshold.
func (*CursorManager) DeleteActiveCursorsForTag ¶
func (cm *CursorManager) DeleteActiveCursorsForTag(tag string)
func (*CursorManager) ExecuteCursorEvent ¶
func (cm *CursorManager) ExecuteCursorEvent(ce CursorEvent)
func (*CursorManager) GenerateGesture ¶
func (*CursorManager) GenerateRandomGesture ¶
func (cm *CursorManager) GenerateRandomGesture(tag string, numsteps int, dur time.Duration)
func (*CursorManager) LoopCursorEvent ¶
func (cm *CursorManager) LoopCursorEvent(ac *ActiveCursor) *SchedElement
func (*CursorManager) LoopedGidFor ¶
func (cm *CursorManager) LoopedGidFor(ce CursorEvent, warn bool) int
Keep track of names attached to each cursor "down", and use those names on subsequent "drag" and "up" events.
func (*CursorManager) PlayCursor ¶
func (cm *CursorManager) PlayCursor(tag string, dur time.Duration, pos CursorPos)
func (*CursorManager) UniqueGid ¶
func (cm *CursorManager) UniqueGid() int
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
var TheEngine *Engine
func (*Engine) ExecuteApi ¶
ExecuteApi xxx
func (*Engine) ExecuteApiFromJson ¶
handleRawJsonApi takes raw JSON (as a string of the form "{...}"") as an API and returns raw JSON
func (*Engine) LoadCurrent ¶
func (*Engine) LoadEngineParams ¶
func (*Engine) NewRecordingPath ¶
func (*Engine) RecordCursorEvent ¶
func (e *Engine) RecordCursorEvent(event CursorEvent)
func (*Engine) RecordMidiEvent ¶
func (*Engine) RecordOscEvent ¶
func (*Engine) RecordPlaybackEvent ¶
func (e *Engine) RecordPlaybackEvent(event PlaybackEvent)
func (*Engine) RecordStartEvent ¶
func (e *Engine) RecordStartEvent()
func (*Engine) RecordStopEvent ¶
func (e *Engine) RecordStopEvent()
func (*Engine) RecordingPath ¶
func (*Engine) SaveCurrent ¶
func (*Engine) SetAutoTransposeBeats ¶
func (*Engine) SetTranspose ¶
func (*Engine) StartOscListener ¶
func (*Engine) StartPlayback ¶
func (*Engine) StartRecording ¶
func (*Engine) StopRecording ¶
func (*Engine) WaitTillDone ¶
func (e *Engine) WaitTillDone()
type Erae ¶
type Erae struct {
// contains filtered or unexported fields
}
var TheErae *Erae
func (*Erae) EraeApiModeDisable ¶
func (erae *Erae) EraeApiModeDisable()
func (*Erae) EraeApiModeEnable ¶
func (erae *Erae) EraeApiModeEnable()
func (*Erae) EraeFingerIndicator ¶
func (*Erae) EraeWriteSysEx ¶
func (*Erae) EraeZoneBoundaryRequest ¶
func (*Erae) EraeZoneClearDisplay ¶
func (*Erae) EraeZoneClearPixel ¶
func (*Erae) EraeZoneRectangle ¶
type FileWriter ¶
type FileWriter struct {
Exe string
}
type MIDIDeviceEvent ¶
type MIDIDeviceEvent struct { Timestamp int64 // milliseconds Status int64 Data1 int64 Data2 int64 }
MIDIDeviceEvent is a single MIDI event
type MIDIEventHandler ¶
type MIDIEventHandler func(MidiEvent)
type NoteBytes ¶
type NoteBytes struct {
// contains filtered or unexported fields
}
func NewNoteBytes ¶
type NoteFull ¶
type NoteFull struct { // Channel uint8 Synth *Synth Duration Clicks SynthName string Pitch uint8 Velocity uint8 }
NoteFull has a duration, i.e. it's a combination of a NoteOn and NoteOff
type NoteOff ¶
func NewNoteOff ¶
NewNoteOff create a new noteoff
func NewNoteOffFromNoteOn ¶
NewNoteOff create a new NoteOff from a NoteOn
type NoteSystem ¶
type NoteSystem struct {
// contains filtered or unexported fields
}
func NewNoteSystem ¶
func NewNoteSystem(system byte) *NoteSystem
func (*NoteSystem) String ¶
func (n *NoteSystem) String() string
type OscEvent ¶
type ParamDef ¶
type ParamDef struct { TypedParamDef any Category string Init string // contains filtered or unexported fields }
ParamDef is a single parameter definition.
type ParamDefBool ¶
type ParamDefBool struct { }
type ParamDefFloat ¶
type ParamDefFloat struct { Init string // contains filtered or unexported fields }
type ParamDefInt ¶
type ParamDefInt struct {
// contains filtered or unexported fields
}
type ParamDefString ¶
type ParamDefString struct {
// contains filtered or unexported fields
}
type ParamValue ¶
type ParamValue any
ParamValue is a single parameter value which could be any of the param*Value types
type ParamValues ¶
type ParamValues struct {
// contains filtered or unexported fields
}
ParamValues is the set of all parameter values
func NewParamValues ¶
func NewParamValues() *ParamValues
func (*ParamValues) ApplyValuesFromMap ¶
func (params *ParamValues) ApplyValuesFromMap(category string, paramsmap map[string]any, setfunc func(string, string) error)
Currently, no errors are ever returned, but log messages are generated.
func (*ParamValues) DoForAllParams ¶
func (vals *ParamValues) DoForAllParams(f func(string, ParamValue))
func (*ParamValues) Exists ¶
func (vals *ParamValues) Exists(name string) bool
func (*ParamValues) Get ¶
func (vals *ParamValues) Get(name string) (string, error)
returns "" if parameter doesn't exist
func (*ParamValues) GetBoolValue ¶
func (vals *ParamValues) GetBoolValue(name string) bool
func (*ParamValues) GetFloatValue ¶
func (vals *ParamValues) GetFloatValue(name string) float32
func (*ParamValues) GetIntValue ¶
func (vals *ParamValues) GetIntValue(name string) int
func (*ParamValues) GetStringValue ¶
func (vals *ParamValues) GetStringValue(name string, def string) string
func (*ParamValues) JsonValues ¶
func (vals *ParamValues) JsonValues() string
func (*ParamValues) ParamNames ¶
func (vals *ParamValues) ParamNames() []string
func (*ParamValues) Set ¶
func (vals *ParamValues) Set(name, value string) error
type ParamsMap ¶
var CursorSourceToQuadPreset ParamsMap
func LoadParamsMap ¶
func OverrideMap ¶
func OverrideMap() ParamsMap
type Patch ¶
type Patch struct {
// contains filtered or unexported fields
}
func (*Patch) ApplyPatchValuesFromQuadMap ¶
func (*Patch) CursorToQuant ¶
func (patch *Patch) CursorToQuant(ce CursorEvent) Clicks
func (*Patch) MIDIChannel ¶
func (*Patch) ParamNames ¶
func (*Patch) RefreshAllIfPortnumMatches ¶
func (*Patch) RefreshAllPatchValues ¶
func (patch *Patch) RefreshAllPatchValues()
func (*Patch) SaveAndAlert ¶
func (*Patch) SaveQuadAndAlert ¶
type PatchLogic ¶
type PatchLogic struct {
// contains filtered or unexported fields
}
func NewPatchLogic ¶
func NewPatchLogic(patch *Patch) *PatchLogic
type Phrase ¶
type Phrase struct { Source string Destination string Length Clicks // contains filtered or unexported fields }
Phrase is a time-ordered list of *PhraseElements
func (*Phrase) AdjustTimes ¶
AdjustTimes returns a new Phrase shifted by shift Clicks
func (*Phrase) Arpeggio ¶
Arpeggio returns an arpeggiated version of the phrase. One way of describing is that all the notes have been separated and then put back together, back-to-back.
func (*Phrase) AtTime ¶
AtTime returns those notes in the specified phrase that are sounding at the specified time. If a note ends exactly at the specified time, it is not included.
func (*Phrase) CopyAndAppend ¶
func (p *Phrase) CopyAndAppend(elem *PhraseElement) *PhraseElement
CopyAndAppend makes a copy of a Note and appends it to the Phrase
func (*Phrase) InsertElement ¶
func (p *Phrase) InsertElement(item *PhraseElement) *Phrase
InsertNote inserts a note into a Phrase
func (*Phrase) InsertNoLock ¶
func (p *Phrase) InsertNoLock(pe *PhraseElement) *Phrase
InsertNoLock adds a Note to a Phrase
func (*Phrase) Legato ¶
Legato extends the duration of each note to abutt the start of the next note. Doesn't modify the duration of the last note.
func (*Phrase) LowestPitch ¶
LowestPitch returns the lowest pitch in a Phrase
func (*Phrase) Merge ¶
Merge merges a second Phrase into a Phrase NOTE: we get a Write lock on the Phrase, since we're actually changing it.
func (*Phrase) NextTime ¶
NextTime returns the time of the next note AFTER time st. If there are no notes after it, returns -1.
func (*Phrase) ResetLengthNoLock ¶
func (p *Phrase) ResetLengthNoLock()
ResetLengthNoLock sets the length of a Phrase to the end of the lastnote
type PhraseElement ¶
type PhraseElement struct { AtClick Clicks Value any // things like *NoteFull, *NoteOn, *NoteOff, etc }
func (*PhraseElement) Copy ¶
func (pe *PhraseElement) Copy() *PhraseElement
func (*PhraseElement) EndOf ¶
func (pe *PhraseElement) EndOf() Clicks
func (*PhraseElement) IsNote ¶
func (pe *PhraseElement) IsNote() bool
type PhraseScanner ¶
type PhraseScanner struct {
// contains filtered or unexported fields
}
PhraseScanner represents a lexical scanner for phrase constants
func NewPhraseScanner ¶
func NewPhraseScanner(r io.Reader) *PhraseScanner
NewScanner returns a new instance of Scanner.
func (*PhraseScanner) ScanChar ¶
func (s *PhraseScanner) ScanChar() string
func (*PhraseScanner) ScanNumber ¶
func (s *PhraseScanner) ScanNumber() (int, error)
func (*PhraseScanner) ScanWord ¶
func (s *PhraseScanner) ScanWord() (tok Token, lit string)
Scan returns the next token and literal value.
type PitchBend ¶
type PitchBend struct {
// contains filtered or unexported fields
}
func NewPitchBend ¶
type PlaybackEvent ¶
PlaybackEvent is for start/stop
type PortChannel ¶
type PortChannel struct {
// contains filtered or unexported fields
}
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 KeykitProcessInfo ¶
func KeykitProcessInfo() *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 ProgramChange ¶
func NewProgramChange ¶
func NewProgramChange(channel, program uint8) *ProgramChange
func (*ProgramChange) String ¶
func (n *ProgramChange) String() string
type QuadPro ¶
type QuadPro struct {
// contains filtered or unexported fields
}
var TheQuadPro *QuadPro
func NewQuadPro ¶
func NewQuadPro() *QuadPro
func (*QuadPro) PatchForCursorEvent ¶
func (quadpro *QuadPro) PatchForCursorEvent(ce CursorEvent) (patch *Patch, button string)
type RecordingEvent ¶
type Resolume ¶
type Resolume struct {
// contains filtered or unexported fields
}
func TheResolume ¶
func TheResolume() *Resolume
func (*Resolume) PortAndLayerNumForPatch ¶
func (*Resolume) ProcessInfo ¶
func (r *Resolume) ProcessInfo() *ProcessInfo
func (*Resolume) SendEffectParam ¶
func (*Resolume) TextLayerNum ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router takes events and routes them
var TheRouter *Router
func (*Router) HandleMidiEvent ¶
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.
func (*Router) ScheduleCursorEvent ¶
func (r *Router) ScheduleCursorEvent(ce CursorEvent)
type SchedElement ¶
func NewSchedElement ¶
func NewSchedElement(atclick Clicks, tag string, value any) *SchedElement
func SchedElementFromString ¶
func SchedElementFromString(s string) (se *SchedElement, err error)
func (SchedElement) GetClick ¶
func (se SchedElement) GetClick() Clicks
func (*SchedElement) SetClick ¶
func (se *SchedElement) SetClick(click Clicks)
NOTE: a pointer is used so se.SetClick() can modify the value
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
var TheScheduler *Scheduler
func NewScheduler ¶
func NewScheduler() *Scheduler
func (*Scheduler) CountEventsWithTag ¶
func (*Scheduler) DeleteCursorEventsWhoseGidIs ¶
func (*Scheduler) DeleteEventsWithTag ¶
func (*Scheduler) PendingToString ¶
type Synth ¶
type Synth struct {
// contains filtered or unexported fields
}
func (*Synth) ClearNoteDowns ¶
func (synth *Synth) ClearNoteDowns()
func (*Synth) SendBytesToMidiOutput ¶
SendBytesToMidiOutput
func (*Synth) SendController ¶
func (*Synth) SendNoteToMidiOutput ¶
func (*Synth) UpdateBankProgram ¶
func (synth *Synth) UpdateBankProgram()
type VizColor ¶
type VizColor struct {
// contains filtered or unexported fields
}
VizColor xxx
func ColorFromHLS ¶
ColorFromHLS creates a color from hue, luminance, and saturation
func ColorFromRGB ¶
ColorFromRGB creates a VizColor from red, green, blue
Source Files ¶
- attract.go
- bidule.go
- click.go
- color.go
- copy.go
- cursor.go
- devices.go
- engine.go
- engineapi.go
- erae.go
- event.go
- log.go
- logic.go
- midifile.go
- misc.go
- msg.go
- msgs.go
- note.go
- params.go
- patch.go
- phrase.go
- phraseop.go
- player.go
- process.go
- quadpro.go
- resolume.go
- router.go
- saved.go
- scale.go
- scheduler.go
- synth.go
- twitch.go
- unix.go