osara icon indicating copy to clipboard operation
osara copied to clipboard

Report inserting media, including items with adjusted playrate

Open ScottChesworth opened this issue 1 year ago • 7 comments

This makes OSARA report a summary of tracks/items added when using REAPER's "Insert media files" action, it also checks whether any of those newly inserted items have had their playrate adjusted and reports it. I added the playrate adjustment because preferences around it are changing, the defaults for new prefs are a bit heavy-handed IMO, have already seen it catching a couple of users unawares.

ScottChesworth avatar Jun 08 '24 00:06 ScottChesworth

Shout out to @timtam for his help with how to store the item information, and his unending patience every time I forget how to write loops.

ScottChesworth avatar Jun 08 '24 00:06 ScottChesworth

Build succeeded! Build osara pr1104-1476,b88fc86d completed (commit https://github.com/jcsteh/osara/commit/b88fc86d95 by @ScottChesworth) Downloads:

Windows
Mac

AppVeyorBot avatar Jun 08 '24 00:06 AppVeyorBot

Do sighted folks get any immediate indication that this rate adjustment has happened? I'm all for making things more efficient, but I'm not quite following how screen reader users are at a disadvantage here compared to others.

jcsteh avatar Jun 09 '24 08:06 jcsteh

@jcsteh yeah, I thought of that while implementing it but didn't came up with a better solution. I checked if the zero-based index solution would work, but REAPER sorts items based on tracks from top to bottom instead of appending new items to the end, so that unfortunately was out for this solution. I hope that we're talking about a O(1) implementation when mapping the zero-based index to an item id, in which case the loop would still be fast enough to not cause any performance issues at all, but obviously I don't know. We'd optimally need a project with at least a thousand items (preferably more) to see how they perform under heavy load circumstances.

Timtam avatar Jun 09 '24 12:06 Timtam

I just tried it in a project with 5000 items spread over 50 tracks. No noticeable lag pasting or inserting here. That said, we might not need this anyway because it looks like Cockos are gonna do more tweaking of the import options.

ScottChesworth avatar Jun 09 '24 16:06 ScottChesworth

I'd say you're right about an O(1) index lookup, but that's still an O(n) loop. With a sufficiently large n, that could still be a problem. Scott's test suggest that n = 5000 seems to be okay, so that should be fine, though we'd need to watch closely for reports of problems.

I'd still like to know whether sighted users can immediately spot this. Otherwise, this would appear to be a REAPER problem, not something we should try to solve in OSARA. Based on Scott's comment, it seems like Cockos might agree.

jcsteh avatar Jun 09 '24 21:06 jcsteh

With two loops that would be O(2n), which should be just fine with just a few thousand items, but you're right, lets keep this open and wait for Cockos to make their move. I don't think that you actually get a visual indicator when importing items that way, I however don't know if items generally get a visual indicator of sorts if the play rate is anything other than 1.0, but I doubt it.

Timtam avatar Jun 09 '24 21:06 Timtam