Welcome to %s forums

BrainModular Users Forum

Login Register

Exposed Min/Max Values - Question/Problem

Create your own modules in C++
Post Reply
sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 21 Oct 2017, 16:41

Hello Good Morning Everyone!

I hope all is well!

So the question and issue I have ran into this morning with the SDK.

Is there a way to Expose the Min/Max and inherit these on the external objects, as well as a separate setting that sets the modules node/internal limits?

Example:

User drags wire from Input A and drops and creates Fader A.
Set Min/Max limits cause the Fader to be -100 to 100
If the User however changes the Fader Min/Max to a greater number such as -1000 to 1000, the Input A will still accept this and recognize the values.


At the moment I'm stuck wanting to allow the full range of numbers, but not cast these limits to my faders when created. I am using the (-FLT/FLT) as my pParamInfo-MinValue/MaxValue

Oh such puzzles to solve...loving it and documenting as I go though.

Sephults Dummy Guide for the HollyHock SDK....coming in the near future....hahaha :lol:

-s
"Every act of creation is first an act of destruction." -Picasso

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 21 Oct 2017, 17:20

min max value do not constrain the incoming values to min max

so it should be ok for your project.

otherwise, if you really don't want the values to be over min max values, use a constrain function and pass all incoming data to it.

"isnan" can help when the result of something you compute is bigger than FLT.
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 21 Oct 2017, 18:00

Okay, I haven't really got the trace/debug stuff down efficiently and consistent so I am not getting to see the internals like I did with scripting at the moment..

I remember with the FastScript I always got hosed because my Min/Max TParameters were limiting my input values.....still in that same mindset.

So good, even though the visuals don't represent the values still are not constrained unless forced to in user-code.
Thanks Oli!

Super Awesome as always...looking forward to your latest module library...definitely excited and been lost in the new loopers...

-s
"Every act of creation is first an act of destruction." -Picasso

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 21 Oct 2017, 18:07

i thought they were constrained as well like scripts, my bad^^

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests