osara icon indicating copy to clipboard operation
osara copied to clipboard

Truncate excess zeros when announcing volume, pan and pixel values

Open cmdfv opened this issue 10 years ago • 1 comments

In OSARA currently, when adjusting the volume of a track to -4 DB for example, OSARA reports "-4.00 db". It would be ideal to have any extra zeros trimmed to cut down on speech chatter, so instead it reports "-4 db". This also occurs when zooming in/out of a project. OSARA might say "150.000 pixels" instead of "150 pixels".

However, if a value has non-zeros, report them. For instance, "-4.05 db" or "-4.11 db"

cmdfv avatar Mar 25 '15 17:03 cmdfv

Hey @RDMurray, could you take a look see into this when you next get time? Seems like the kind of logic you're good with, and the request still seems like it could be a goer.

ScottChesworth avatar Nov 22 '20 00:11 ScottChesworth

There is now a function formatDouble which strips trailing zeros and also avoids reporting scientific notation such as "1E+6 pixels / second". It is currently only used for reporting item pitch and rate but it would be easy to use it for volume, zoom etc.

RDMurray avatar Nov 17 '22 17:11 RDMurray

I thought I'd have a go at fixing the oldest open issue. Please test the build in #812

RDMurray avatar Nov 17 '22 20:11 RDMurray