[fixed 3.2.2] Console hangs/crashes when dumping some VST presetdata

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?

1 Like

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? :slight_smile:

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 :cry: ) ā†’ Working with plugin presets (.fxp/.fxb)

1 Like

Yay, I hope Taktik will extend ā€œload/save fxp/aupresetā€ to lua then :stuck_out_tongue:

Why did you change your old one in anon35304171 btw?

Just one of those things that happens sometimes ffx :slight_smile:

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.

1 Like

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!