Skip to content

Commit

Permalink
fix bugs in global param setting
Browse files Browse the repository at this point in the history
  • Loading branch information
spacepalette committed Feb 9, 2024
1 parent 3b3873c commit dccbbcd
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.93
7.94
8 changes: 4 additions & 4 deletions data/config/morphs.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"SM01180216670": "C",
"SM01173612418": "D",

"SM01174915280": "A",
"SM01174213460": "B",
"SM2116I110058": "C",
"SM01174814566": "D",
"SM01174915280": "B",
"SM01174213460": "C",
"SM2116I110058": "D",
"SM01174814566": "A",

"SM01173612386": "B",
"SM01174213320": "D",
Expand Down
2 changes: 1 addition & 1 deletion data/config/paramenums.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"volstyle": [ "fixed", "pressure" ],
"shape": [ "line", "triangle", "square", "circle" ],
"morphtype": [ "quadrants", "corners", "A", "B", "C", "D" ],
"midiinput": [ "microKEY2 Air", "" ],
"midiinput": [ "microKEY", "microKEY2 Air", "" ],
"movedir": [ "cursor", "left", "right", "up", "down", "random", "random90", "updown", "leftright" ],
"rotangdir": [ "right", "left", "random" ],
"mirror": [ "none", "vertical", "horizontal", "four" ],
Expand Down
2 changes: 1 addition & 1 deletion data/saved/global/External_Scale On.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"params": {
"global.midisetexternalscale":"true"
"global.midisetexternalscale":"true",
"global.scale":"external"
}
}
1 change: 1 addition & 0 deletions ffgl/source/lib/palette/LayerParams_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ LayerParams_InitializeTypes() {
LayerParams_morphtypeTypes.push_back("C");
LayerParams_morphtypeTypes.push_back("D");

LayerParams_midiinputTypes.push_back("microKEY");
LayerParams_midiinputTypes.push_back("microKEY2 Air");
LayerParams_midiinputTypes.push_back("");

Expand Down
8 changes: 6 additions & 2 deletions kit/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@ func GetParamFloat(nm string) (float64, error) {
return f, nil
}

func SaveGlobalParams() (err error) {
func SaveCurrentGlobalParams() (err error) {
return GlobalParams.Save("global", "_Current")
}

func LoadGlobalParams() (err error) {
paramsMap, err := LoadParamsMapOfCategory("global", "_Current")
return LoadGlobalParamsFrom("_Current")
}

func LoadGlobalParamsFrom(filename string) (err error) {
paramsMap, err := LoadParamsMapOfCategory("global", filename)
if err != nil {
LogIfError(err)
return err
Expand Down
8 changes: 8 additions & 0 deletions kit/engineapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ func ExecuteGlobalApi(api string, apiargs map[string]string) (result string, err
TheAttractManager.SetAttractMode(IsTrueValue(v))
return "", nil

case "load":
fname, ok := apiargs["filename"]
if !ok {
return "", fmt.Errorf("ExecuteGlobalApi: missing filename parameter")
}
err := LoadGlobalParamsFrom(fname)
return "",err

case "set":
name, value, err := GetNameValue(apiargs)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion python/palette_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def loadAndSend(self,category,filename):

if category == "global":
# log("Loading","category","global","filename",filename)
palette.palette_quad_api("load",
palette.palette_global_api("load",
"\"filename\": \"" + filename + "\""
", \"category\": \"" + category + "\"")
elif category == "quad":
Expand Down
Binary file added release/palette_7.94_win_setup.exe
Binary file not shown.

0 comments on commit dccbbcd

Please sign in to comment.