Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature: Number formatting for variables #3698

@arikorn

Description

@arikorn

Is this a feature relevant to companion itself, and not a specific module?

  • I believe this to be a feature for companion, and is not specific to a module

Is there an existing issue for this?

  • I have searched for similiar existing issues

Describe the feature

It would be nice to be able to specify a format for numeric variables.

The simplest one would be to specify the number of decimal places: For example: $(module:SomeNumber:2.1) would specify 2 places before and one place after the decimal (other options: .1 or 0.1 to let left float free; -.1 to add space for negative sign; +.1 to always show + or -)

Fanciest would be full prinft-style formatting

This is similar to #3664, which asked specifically about time variables, but more general (and the "simple" solution may not solve that one.)

Usecases

When changing, for example, audio fader settings in increments of 0.5, with text centered, the number jumps back and forth depending on whether it is round ('1.0') or not ('1.5')

Current behavior:

Image

Here's how it should look (done with an awkward expression that would need to be rewritten for each variable!)

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions