# Fluid.bufscale~ @scale options?

**URL:** <https://discourse.flucoma.org/t/fluid-bufscale-scale-options/1440>\
**Category:** New Ideas\
**Created:** [May 9, 2022, 7:16pm UTC](https://discourse.flucoma.org/t/fluid-bufscale-scale-options/1440 "2022-05-09T19:16:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [May 9, 2022, 7:16pm UTC](https://discourse.flucoma.org/t/fluid-bufscale-scale-options/1440/1 "2022-05-09T19:16:56Z")

</div>

I could have sworn I requested something like this in the past, but [only found a request](https://discourse.flucoma.org/t/clip-or-zmap-flag-attribute-for-fluid-bufscale/793) for `@clipping`, which looks like that now exists!

It would be great to be able to apply `atodb`, `dbtoa`, `ftom`, and `ftom`, and/or having an `@exponential` attribute too (to mirror `scale`/`scale~`) via a `@scale` attribute, which could take any of the above (e.g. `atodb`, `dbtoa`, etc… or if it is given a `float` instead, it interprets that as an exponent to apply.

I find myself wanting to linearize the output of `fluid.bufloudness~` for applying `@weights` specifically, but also for better interfacing with `fluid.bufspectralshape~`s `@power 1 @unit 1` combo or `fluid.bufpitch~`s `@unit 1`.

What I’ve done in older patches is to dump everything out and do this stuff in Max-land, then dump it back in, but that’s obviously fragile and clunky, and like in [the concat thread](https://discourse.flucoma.org/t/concatenation-in-the-select-based-future/1439/6), staying “native” as much as possible is always desirable.

---

<div class="post-metadata">

**Author:** ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)\
**Post date:** [May 9, 2022, 7:28pm UTC](https://discourse.flucoma.org/t/fluid-bufscale-scale-options/1440/2 "2022-05-09T19:28:06Z")

</div>

I can see that being useful but Another Thing To Maintain. The immediate use case is taking loudness and doing dbtoa to get weights quickly.

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [May 9, 2022, 8:26pm UTC](https://discourse.flucoma.org/t/fluid-bufscale-scale-options/1440/3 "2022-05-09T20:26:18Z")

</div>

I would imagine all those bits are general library transforms (my assumption), and a nice QoL improvement.

The loudness weighting is a particularly nice use case as it will actually be loudness weighted, as opposed to db-\> 0. to 1. linear scaling, which is pretty rough/approximate.
