Skip to content

Adding Timers to modulators #451

Answered by dnaldoog
puffer3 asked this question in Q&A
Mar 22, 2022 · 9 comments · 40 replies
Discussion options

You must be logged in to vote

This is the complete example saving as json and loading back to json:
EDIT 3/26/2022 v 4-- changed bug in code
EDIT 3/26/2022 v 5-- updated patchTableData to indexed table

(1) SAVE

patchDataTable={
     "portSpeed",
     "progVolume"
}

myMethod = function(--[[ CtrlrModulator --]] mod --[[ number --]], value --[[ number --]], source)
    local t = {}
    for _, v in ipairs(patchDataTable) do
        t[v] = panel:getModulatorByName(v):getModulatorValue()
    end
    json_str = json.encode(t)
    console(json_str)
    --{"portSpeed":48,"progVolume":99} -- for example
end

fileToWrite:replaceWithText(json_str, true, true)

(2) LOAD

Once you've loaded the json string {"portSpeed":48,"progVolum…

Replies: 9 comments 40 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@damiensellier
Comment options

Comment options

You must be logged in to vote
5 replies
@Godlike-Productions
Comment options

@puffer3
Comment options

@Godlike-Productions
Comment options

@puffer3
Comment options

@puffer3
Comment options

Comment options

You must be logged in to vote
3 replies
@damiensellier
Comment options

@puffer3
Comment options

@DRBAUS
Comment options

Comment options

You must be logged in to vote
2 replies
@puffer3
Comment options

@damiensellier
Comment options

Comment options

You must be logged in to vote
8 replies
@puffer3
Comment options

@dnaldoog
Comment options

@damiensellier
Comment options

@dnaldoog
Comment options

@damiensellier
Comment options

Comment options

You must be logged in to vote
3 replies
@damiensellier
Comment options

@puffer3
Comment options

@dnaldoog
Comment options

Comment options

You must be logged in to vote
2 replies
@dnaldoog
Comment options

@puffer3
Comment options

Comment options

You must be logged in to vote
16 replies
@puffer3
Comment options

@dnaldoog
Comment options

@puffer3
Comment options

@dnaldoog
Comment options

@damiensellier
Comment options

Answer selected by puffer3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants