GUI features: mute, hold, fold, etc

25 views
Skip to first unread message

d.andrew STEWART

unread,
Nov 22, 2024, 7:05:51 AM11/22/24
to dot_mapper
Hello, Can we still use past features, such as mute, hold, fold, (I can't remember all of them) with the latest version of webmapper?

Joseph Malloch

unread,
Nov 23, 2024, 8:59:12 PM11/23/24
to dot_mapper
Hi Andrew,

The mute/clamp/fold/wrap functionality was removed quite a while ago (for various reasons) but can be replicated using the map expression. What effect are you looking for?

Cheers,
Joe

d.andrew STEWART

unread,
Nov 26, 2024, 10:48:08 AM11/26/24
to dot_mapper
Do you have time to give me an example of each (an example of an expression); then I can probably figure out the math more easily. I use all four: mute, clamp, fold, wrap., especially mute and clamp
What do you think?

Joseph Malloch

unread,
Nov 29, 2024, 3:13:05 PM11/29/24
to dot_m...@googlegroups.com
Hi Andrew – see if the examples below help. If you can share a specific scenario or mapping idea I can probably help...

All the expressions below assume your bounds are already defined, e.g.:

“minVal = -10; maxVal = 10;"

For the “mute” effect you can use a special expression variable named “muted”, e.g.:

Mute below minVal: “muted = x < minVal; y = x;”
Mute above maxVal: “muted = x > maxVal; y = x;”
Mute outside range: “muted = (x < minVal) || (x > maxVal); y = x;”

For the “clamp” effect you can use the functions min(), max() or both, e.g.:

Clamp at minVal: “y = max(minVal, x);”
Clamp at maxVal: “y = min(maxVal, x);”
Clamp at both: “y = max(minVal, min(x, maxVal));”

Fold and wrap are much more complex, especially when combining different effects at different extrema. Here are some of the simpler configurations:

Fold at minVal: y = x > minVal ? x : 2 * minVal - x;”
Fold at maxVal: y = x < maxVal ? x : 2 * maxVal - x;
Fold at both: “a = (x - minVal) % range; y = floor((x - minVal) / range) % 2 ? minVal + a : maxVal - a;"

Wrap at minVal: range = maxVal - minVal; y = x > minVal ? x : minVal + (x - minVal) % range;""
Wrap at maxVal: range = maxVal - minVal; y = x < maxVal ? x : minVal + (x - minVal) % range;""
Wrap at both: “range = maxVal - minVal; y = minVal + (x - minVal) % range;"


--
You received this message because you are subscribed to the Google Groups "dot_mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dot_mapper+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dot_mapper/bfe6ac7d-7eca-4efc-baf5-470069e3e22cn%40googlegroups.com.

d.andrew STEWART

unread,
Dec 1, 2024, 3:42:09 PM12/1/24
to dot_mapper
Thank you .  Will run tests
Reply all
Reply to author
Forward
Message has been deleted
0 new messages