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t6QXguEb3ppD1D8AquGsZ532ykSEPro2lzW7XluKvVOJ.p.ipIxoAj6yGQuUUR9kP47.hGbHtLxzxykfk5TF+REiDdUkgPmRtctbCPdnj5pp.TxlfrZaVV0nhhxMOTFmVN0okw0x60sAEvSNOuG3ASinGyFcLLMaAb8ozahhfQFTqVmNFMZ1pVs5MNr8gMiO+smG8GCfT+rD37Tbcyp0h7UqVG1otgYNvkaGalCakwlsVwVd2vER+bEmEka5n6ZzzbkQyWBk9q1ok9XNU4jsvClP7WSNYMdA11FYvBTZjjqJ8Guau229867bTlCfQnLL9xX5std4o5OD6.eWMbfr8d+HT7BYWi4RvIaEhVntY3buFepZI7YWyqv3tAx80+B8PUthapD9BTnvqrfpq7is9.cHvMV+qh6FueRaYDZgkcK39EWEbcx5pULeoj1xY8omEmg3O+9DojfT6xx1SsLBAQNXta90e+ep7C+0e9rrogOKtwC7I.+7oiOGS3D6Y9IMehs4Sa6mBYa+bBbx2H3.8vYq7Wtf3Z3VWqHiKvsBaiFNv8ZGTHWdq3xyaO.PqwhkX2ydUOE2rZiZ0p01nc6FG1vrtQmkTZMekVQeyEqQe.1bi5ZBc+LpCFzoygM5zFZEF00bniPHm.2VHsqYs5UaG5q5Mqa1rcyZqBZeJCR6hOm5Sk4X7I8xxxRVI+I7tgYKf2E22+R0nVD64UwEPGIDScHg2eYy90F+ebaKGhkm3MVQWfTs4dPnFf9xC+I4aCcAAYcSzayFpbfeh7arrRN6e4yo1FLm5avbZrAyo4FLmVavbZuAy4v0NG0+chWDHENQ2sETL3jntdZmvIv83COHD8e.SUOb9
Edit : error fix
-
@Matt_SF ah, haha, indeed :)
Thank you, I'll see if I can compile this now
-
@Matt_SF ok when I try to compile I get this error:
❌ /Users/zzz/Desktop/HISE_PROJECTS/EQ-1/DspNetworks/Binaries/Source/CLIPMAIN.h:25:53: call to member function 'pow' is ambiguous return Math.sign(input) * Math.pow(Math.atan(Math.pow(Math.abs(input), 1.0 / value)), value);
Any ideas?!
-
@DanH ha that must be my bad, I did it too quickly :
Replace
1.0
by1.0f
in the equation -
@Matt_SF Thanks! Ok, so close but so far it seems... I go through the process of compiling the nodes, but when I go to export Hise wants the expr node wrapped into a compilable network. But I already did that, and compiled that network, and the project is using the compiled node as you can see in the image, so I totally do not understand what I'm doing wrong!
-
@DanH I replied to this error earlier. Stop doing that ! :face_with_tears_of_joy:
It's either you leave the
math.expr
node as it is and compile the whole network :OR
You wrap and compile the node only and disable the network compilation :
Then you can compile the network into DLL.
:) -
@Matt_SF ok I got there eventually
Thanks for the help!
-
If you want a straight up Hard clipper, try something like:
f_hard(x, threshold, ceiling) = (abs(x) >= threshold) ? (min(threshold * sign(x), ceiling)) : x
Can I just stick this into the math.expr node like so?
EDIT: No!
Could someone show me how to add this equation in please?! :folded_hands:
-
@DanH f_hard(x, threshold, ceiling) is the name of the function and it's variables. The result of the function is equal to the output, so consider them to be the same thing.
abs, min and sign are math functions, so you have to use the HISE equivalent. aka Math.abs, Math.min and Math.sign.
x = input
threshold and ceiling are parameters that go from 0.01 - 1.00 -
@Dan-Korneff I have a lot to learn!! Thank you :)
-
@DanH did you get it going yet?
-
@Dan-Korneff Thanks for asking, I haven't had time to have a go yet - next week!
-