View Single Post
Old 02-01-2022, 05:30 AM  
Meo-Ada Mespotine
Human being with feelings
Meo-Ada Mespotine's Avatar
Join Date: May 2017
Location: Leipzig
Posts: 6,015

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:

-- create 500MB test-metadata
-- kilobyte
for i=1, 1024 do A=A..string.char(math.random(255)) end

-- megabyte
for i=1, 1024 do B=B..A end


-- 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
I've tested it on the 2901-dev-release, but I suppose, it's present in this release as well.
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here: - Donate, if you wish

Last edited by Meo-Ada Mespotine; 02-01-2022 at 07:30 AM.
Meo-Ada Mespotine is offline   Reply With Quote