ear-production-suite
ear-production-suite copied to clipboard
Add warning option to import dialog, use map for parameter ranges,...
…check parameter values at import, show warning if clipped. If accepted this resolves #45
I think this does the right thing, but in the wrong place - by checking for clips right after parsing rather than during automation processing (where the clipping takes place) there's a fair bit of duplication. I think it will also break for any plugin suite other than the EPS that has different parameter ranges. It might also do something odd for things like Azimuth that wrap out of range values rather than clip them as that doesn't need a warning.
I've had a go at adding in the plumbing to make this possible within the parameter/plugin suite system instead. It looks a bit involved but it's really just a small change in a lot of places.
https://github.com/rsjtaylor/ear-production-suite/tree/auto_clip_detect_v2
- In AutomationPoint and the various mapping functions Replace raw double processing with a ParameterValue class that can keep track of info about conversions as well as the actual value (just logs clips atm)
- In the various Automation Element classes, return a ParameterStats struct from parameter application (just counts clips atm)
- Pass an ImportListener pointer to the plugin suite at the start of project creation to enable communication with the dialog box (this might be a bit of a blunt instrument here, all we actually need is a logging function I guess? Potential for breaking the dialog state)
My thinking was that you wouldn't want to duplicate all the validation stuff (hence handling that in the automation elements / Parameter classes and just returning stats) but the sorts of warnings you want to report might vary between plugin suites, so leave the actual reporting up to them.
If that makes sense, could you integrate your changes to the ImportListener stuff and the parameter reporting with the outline in the above branch and check that it works (I've only taken it to the point where it builds)
Hi, i managed to do the integration up to a point where it could theoretically work, but ran into an issue where the clipped member value of the ParameterValue gets lost in AutomationPoint default constructors etc. This looks like it could require lots of changes in different places, so i wanted to check back with you, as i'm not quite sure how to proceed. The issue is that somewhere in the chain from construction of the ParameterValue to the final readout in the pluginsuite AutomationPoints are created, which loose the clipped state, and this happens in a couple of places.
Have now pushed changes we discussed this morning to that other branch
This need reimplementing using the ImportBroadcaster instance that is passed to the PluginSuite class for reporting warnings. See commit https://github.com/ebu/ear-production-suite/commit/c979d10976938e183ccc86c40cc2949d11fc7cdf