Skip to content

Scripting: Don't limit precision of values from GetInfo: #4220

Description

@SteveDaulton

Your idea

Currently, numeric values from GetInfo are rounded to a maximum of 4 decimal places.

While it may be convenient to limit the number of digits when displaying values from "Extra menu > Scriptables II > GetInfo", this (arbitrary) limitation prevents sample accurate editing via (mod-script-pipe) scripting or Nyquist.

This proposal is to return higher precision values when returned from Python / Nyquist scripting commands. Ideally double-precision floating-point format, or at least 32-bit float. (Nyquist uses 32-bit float, while Python's built-in float type has double precision).

Problem to be solved

  • Pasting audio clips based on GetInfo clip positions may cause the destination to overlap another clip due to rounding.
  • The first / last samples of a clip may be missed when applying an effect.
  • Label placements may be off by a few samples if based on GetInfo data.
  • And similar issues

Prior art

No response

Additional context

No response

Activity

  1. added
    Enhancement Request
    on Jan 22, 2023
  2. added
    macros / scripting
    on Jan 23, 2023
  3. moved this from Undecided to Out of scope in Feature Requestson Jan 23, 2023
  4. moved this from Out of scope to Out of scope - technical in Feature Requestson Jan 30, 2023
  5. bwagner commented on Aug 22, 2024

    @bwagner

    I came here from the Audacity Forum.

    The limited precision for timing information from GetInfo makes it unsuitable for tasks that require sample accuracy.

    This limitation to facilitate display of the values mixes information and its representation resulting in an unnecessary kludge.

    I'd like to upvote this request.
    Also, if anyone knows of a workaround, I'd love to hear about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement Requestmacros / scripting

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions