So it`s safe to store and recall from a text file then, and copy pasting from a print-out keeps integrity?
Well you can save the base64 encoded CDATA string to a file sure. If you want to actually see the binary data from the plugin you would run it through a base64 decoder. I assume you are ultimately getting at some sort of fxp preset save/loader?
I would be interested in some info here: Can you generate a proper .fxp data from the active_preset_data?
Hmm, kinda might be possible ffx? Depends whatās in the header of a fxp file?
I donāt know. There are 4 identifier bytes and then plugin individual stuff I think. Maybe the header is included in active_preset_data?
Well you can save the base64 encoded CDATA string to a file sure. If you want to actually see the binary data from the plugin you would run it through a base64 decoder. I assume you are ultimately getting at some sort of fxp preset save/loader? Blockquote
Not necessaritly fxp, just for a tool like:
- Right-click ~save current preset as default
- Tool watches for newly loaded devices
- Tool loads saved default
Will be interested on answers to @ffx questions aswell.
Quickly looking, nope ffx Iām pretty certain that the fxp header isnāt stored in the CDATA of that string, but you might still be able to bolt on a quick hacky header to that data?
Hold on a second I feel like this is dĆ©jĆ vu ffx? (And when I had an identity on this forum! A normal member. Unlike now ) ā Working with plugin presets (.fxp/.fxb)
Yay, I hope Taktik will extend āload/save fxp/aupresetā to lua then
Why did you change your old one in anon35304171 btw?
Just one of those things that happens sometimes ffx
Ah, just to mention also that if you do need to decode the CDATA (for whatever reason) Iāve used this function:
function decbase64(data)
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if (x == '=') then return '' end
local r,f='',(b:find(x)-1)
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if (#x ~= 8) then return '' end
local c=0
for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end
return string.char(c)
end))
end
I havenāt written it or anything, so how robust it is etc.
Thanks 4Tey, yet I will wait for Taktik then. I was planning to make a custom fxp/aupreset preset manager tool, if this wonāt be optimized.
The problem here is not that itās dumping non ASCI characters. The preset data is XML, so itās plain ASCII already.
But the pluginās CDATA in the dump can be really huge (several megabytes) and, which really is the problem here, consists of a single line only, which the terminal canāt handle efficiently right now. Iāll check if I can optimize this a bit.
Either way, itās a plain scripting terminal display issue. The preset data is exported just fine.
There are no plans to add fxp or aupreset im/exports.
Ok, good to know,
thanks for looking into this taktik!