Saving annotated frames filename with different name while being written

when using MuSymbol('export_utils.exportMarkedFrames') to save the annotated frames, can we control the name, so that untill the annotated frames are being written we call them ending with .download and once done strips the .downlaod from filename ?


Hi @supercool,
Unfortunately, exportMarkedFrames does not support any sort of callback, however, if you check out the implementation for that function, it is fairly minimal, you could reimplement the changes you like in a new version of the function:

As of today, it looks like this:

246     \: exportMarkedFrames (ExternalProcess; string filepat, string conversion="defa    ult")
247     {
248         use io;
249         osstream timestr;
250         let frames = markedFrames();
252         for_index (i; frames)
253         {
254             let f = frames[i];
255             if (i > 0) print(timestr, ",");
256             print(timestr, "%d" % f);
257         }
259         let temp = makeTempSession(conversion);
261         string[] args =
262         {
263             temp,
264             "-o", filepat,
265             "-t", string(timestr)
266         };
268         return rvio("Export Annotated Frames", args, removeSession(temp));

The remove session gets a callback, so that runs after the export is complete. If you build your function that does your post-export renaming, it would work well.