I've done some tests with the extension of metadata-length using some testdata of 500MB.
It works good with GetSetProject_String, setting and getting with currently opened projects, so this works perfect.
However, I noticed, two other issues:
1) when I save a project with the user-metadata, it will only store the first ~8k of it and then truncate it.
It should be possible to store the entire user-metadata, imho.
2) when the user-metadata contains a \n in it, it will be replaced with a space. Would it be possible to retain \n in the project-file as well,
maybe storing it as BASE64, like multiline-strings in projextstates? Or does this have possible problematic implications with certain metadata-schemes?
FWIW, I generated the test-metadata with this code, using "ID3:TXXX:TUCH" for the test-metadata:
Code:
-- create 500MB test-metadata
A=""
B=""
C=""
-- kilobyte
for i=1, 1024 do A=A..string.char(math.random(255)) end
-- megabyte
for i=1, 1024 do B=B..A end
A=""
-- 500 megabyte
for i=1, 500 do C=C..B end
-- write and read metadata
A,B=reaper.GetSetProjectInfo_String(0, "RENDER_METADATA", "ID3:TXXX:TUCH|"..C, true)
X,Y=reaper.GetSetProjectInfo_String(0, "RENDER_METADATA", "ID3:TXXX:TUCH|", false)
-- check if strings are identical
F=C==Y
I've tested it on the 2901-dev-release, but I suppose, it's present in this release as well.