diff --git a/data_omnisphere/config/paramenums.json b/data_omnisphere/config/paramenums.json index fa751d7d..2ae1617f 100644 --- a/data_omnisphere/config/paramenums.json +++ b/data_omnisphere/config/paramenums.json @@ -12,7 +12,7 @@ "quantstyle": [ "none", "frets", "fixed", "pressure" ], "volstyle": [ "fixed", "pressure" ], "shape": [ "line", "triangle", "square", "circle" ], - "midiinput": [ "" ], + "midiinput": [ "microKEY2 Air", "" ], "movedir": [ "cursor", "left", "right", "up", "down", "random", "random90", "updown", "leftright" ], "rotangdir": [ "right", "left", "random" ], "mirror": [ "none", "vertical", "horizontal", "four" ], diff --git a/data_omnisphere/keykit/liblocal/keylib.k b/data_omnisphere/keykit/liblocal/keylib.k index 32ed7268..db5b39b9 100644 --- a/data_omnisphere/keykit/liblocal/keylib.k +++ b/data_omnisphere/keykit/liblocal/keylib.k @@ -1,8 +1,8 @@ -#library keylocal.k keylocal -#library keylocal.k localprerc -#library keylocal.k localpostrc #library palette.k palette_kill #library palette.k palette_listen #library palette.k palette_listen_task #library palette.k palette_send #library palette.k palette_test +#library keylocal.k keylocal +#library keylocal.k localprerc +#library keylocal.k localpostrc diff --git a/data_omnisphere/keykit/liblocal/keylocal.k b/data_omnisphere/keykit/liblocal/keylocal.k index 215c5df8..54bb5b9b 100644 --- a/data_omnisphere/keykit/liblocal/keylocal.k +++ b/data_omnisphere/keykit/liblocal/keylocal.k @@ -18,7 +18,7 @@ function keylocal() { addpostrc(global(localpostrc)) # Inittask = remotecons(4444) # would start remote console on port 4444 - # Inittask = palette_listen() + Inittask = palette_listen() } function localprerc() { diff --git a/engine/input.go b/engine/input.go deleted file mode 100644 index fc30bf85..00000000 --- a/engine/input.go +++ /dev/null @@ -1,62 +0,0 @@ -package engine - -/* -import ( - "fmt" - - "gitlab.com/gomidi/midi/v2/drivers" -) - -type Input struct { - intype string // "midi", "cursor" - name string // "" - midiInput drivers.In - morph *oneMorph -} - -var AllInputs = make(map[string]*Input) - -func init() { - AllInputs["morph A"] = &Input{ - intype: "cursor", - midiInput: nil, - morph: nil, - } - AllInputs["morph B"] = &Input{ - intype: "cursor", - midiInput: nil, - morph: nil, - } - AllInputs["midi"] = &Input{ - intype: "midi", - midiInput: nil, - morph: nil, - } -} - -func NewInput() *Input { - return &Input{ - intype: "", - name: "", - midiInput: nil, - morph: &oneMorph{}, - } -} - -func GetInput(name string) (*Input, error) { - in, ok := AllInputs[name] - if !ok { - return nil, fmt.Errorf("GetInput: no such input - %s", name) - } else { - return in, nil - } -} - -func NewMorphInput() *Input { - return &Input{ - intype: "morph", - name: "morph A", - } -} - -*/ diff --git a/engine/process.go b/engine/process.go index b9ca90ec..a78c6c6f 100644 --- a/engine/process.go +++ b/engine/process.go @@ -267,7 +267,14 @@ func KeykitProcessInfo() *ProcessInfo { if keyoutput == "" { keyoutput = DefaultKeykitOutput } - os.Setenv("KEYOUTPUT", keyoutput) + os.Setenv("KEYOUT", keyoutput) + + // Allow parameter to override keyoutput + keyallow := TheEngine.Get("engine.keyallow") + if keyallow == "" { + keyallow = "127.0.0.1" + } + os.Setenv("KEYALLOW", keyallow) // Allow parameter to override path to key.exe fullpath := TheEngine.Get("engine.keykit") diff --git a/engine/router.go b/engine/router.go index cab49d26..015f9019 100644 --- a/engine/router.go +++ b/engine/router.go @@ -3,7 +3,6 @@ package engine import ( "encoding/json" "fmt" - "os" "strconv" "strings" "sync" @@ -80,15 +79,17 @@ func NewRouter(cm *CursorManager) *Router { r.midiInputChan = make(chan MidiEvent) // r.recordingOn = false - r.myHostname = os.Getenv("PALETTE_HOSTNAME") - if r.myHostname == "" { - hostname, err := os.Hostname() - if err != nil { - LogError(err) - hostname = "unknown" + /* + r.myHostname = os.Getenv("PALETTE_HOSTNAME") + if r.myHostname == "" { + hostname, err := os.Hostname() + if err != nil { + LogError(err) + hostname = "unknown" + } + r.myHostname = hostname } - r.myHostname = hostname - } + */ // By default, the engine handles Cursor events internally. // However, if publishcursor is set, it ONLY publishes them,