im using Lua, SWS 2.6.1 with Reaper 5 pre 13. I have also tested this with 5 pre 12, running SWS 2.6.1 and 2.6.2
If i create a new item with reaper.AddMediaItemToTrack() then attempt to run ULT_SetMediaItemNote() on it, nothing seems to happen, no notes are added.
just did a simple test
item = reaper.GetSelectedMediaItem(0, 0)
ran it on a single selected empty item, did nothing. is this function broken in Lua?
GetMediaItemNote works. and also if you do a Set on an item that has notes, instead of just failing and leaving the original notes, it deletes all notes. but it doesnt trigger a UI refresh, so you have to zoom/scroll to see it
Fixed for the next pre-release, thanks for the report.
Note about refresh: your script has to take care of it with UpdateArrange()