Velocity Controlled Envelopes?
-
Hey everyone!
Currently, my HISE project has three samplers and each of these samplers has a AHDSR Envelope under Gain Modulation to change the AHDSR of the volume. I would like to add a thing where lower velocities played trigger a slightly lower attack time, with 60 ms attack being the lowest velocity. This velocity mod would just be controlling the existing volume envelope attack. Basically whatever the attack is set to, the velocity of the note played would just add a few extra milliseconds to the attack time, such as 60 ms extra attack for the lowest velocity and no extra attack for the highest velocity. Is this possible in the modules itself, or does it require scriptnode. I tried to add a attack modulator to the envelope, but i cant seem to tell the difference. (And there's also one more velocity mod under the gain modulation module for controlling the gain of notes fyi)
HiseSnippet 4547.3oc6c07abbjcuGRV7KQQQKqrYCBBPGgDfQVVTS2yvODTBzPRQZyXSowbnkWiEFZa1SMyzl8z8rc2CEYVrwDaxAeauDD.ey2B1KAAHmxMk7WP.1SIm7o.jSw+Gj7pp6d5p54qtmu3vQM8Aqt97U+du5UupduplBVlpXaaSKgTKcxk0wBoVAU7RCmp6UUQyP3vmKj5mhNoJV7yqaoUopi3tJ11hEzTLLE18x5vG3RBoRM6GQJcpklSf92O9rcUzULTwAIIH7JSMU7mpUSyIH0B4+DMc8CTJgOQqFSoyk+PUSi8L0Ma.T1rnLB0UTOSoB9EJjhMCRH076WRywzpnihC1VH0b6ZV5xhUMeiga4ekls1o5XxGRBEgFxM4CL0KQnXRpB6UUSuTAeDvVPHEpP.dLqKdbOzQZkzZld.trFMCwfZvhGolgm7lki7jXIuLLjWaHoTLjzbtjz6gJpZoU2IHGB8bKzgFNXqxJ.ryRJtkUXF8UP6YBkvvY8ZJmgOvB9nYMRuYlLenX1LYdvSWd4G+3CzzgLD244EOVjTIKScaH8O.XJ1Nhd49WJ9y+pm9AOdY2DOWwxKiLPNTYn0qfc1ubYrpS566k08g1Ob4k5b4kZW4k6b4kCJ+NeLP76abNV2rN1kVWd4xlVho0fux7TQMw+Bwrv+6gO7AK+qVdItxud8F1US2rSNxrTCcEfcl99bE69hOTT6APW9qIfSWZbWpKTqxS5AsE.oKuzie7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H008l78e228+7LvtQOK0BzcbnqurBqygbkc4UfDqs1HM5290rS2WryYKzxuPE2EEb4.ce5G7hjVueiA551uB7aSya292j+yXKAO6994+rFJ5gP2c0papqXMnHeOVdYtHJd7SBbFk30iQHo5tQHqglHM+f9DRzWlej+2FEyOV72MUX9wH+zkFTSNF4D3fYlwHm7FXSKFCb3AybhwvAbRVmPbh9PX+iPdK6HRCOfIZZcUzmc8Sfc2bgUPeZgC5sECBBsZwv296iiEC+f1+0+4NSmVLLT1YJm0CQ2Ne4tRtWcu+o+2AyN+g3J0iQsPi0cIND0HMl2c6mMYQrANok9h49QADJ2yHc2zR4FR+LI7E7OtSeY9133I2ICEHrvv5jlcbqS5lvRv20MBBlzIRJqexlHWCUP45hYONdYjhrlHWO4HBiJKmIxs9P8rjHwQzSa7H+moKhIHd+apOhRMK16JYmJ0L5gOY.+Wb7YP8SrAve5jSswFvO9rjXCHlwFfTKNFcwQTrAzDtojDSjW0ZPCHMVCZfwpQf2zbZqzDxolR+gHJwosSXanIwosINs8FrSa69g47tpSaG5LjaFNvUJwAtS1NvUJwAtIlhjXJRhoH2bLEIwsKItco+cPrzH0AwW8aR+u+uk3f3gsChyk3f3DMUuK4fX4DGDOIIDMLbV7XlfGbGGOlOB+A0IxCGxcJxgxi4seMHNW9lCu65vQyxua3n4jKgdrczr703kPWZZ9RnKG4Kgtb2tD5xLWBc4jKgdxkPe5LdFjShmgjaAVxs.K4VfMdIvne9gYShIg2suH4xIwgvjcbHHmDGBIlPjXBQhIDIWj7jKR9jvEIWdjFm.e+xB+CIwIvPONA1LINARhSf2khSfrIwIPxEIO4hjmbQxStH4SJ92ebPkii9nlhpk4q89AhifGKRSAPBCkZt+dtQ9VTR3b1eaMpoUR60pp9+fB095H2G0IaeTmb8Qc1nOpyl8Qc1pOpy1csND2o68y4CQ6IjPg8cEdSseSg2YE9+YduXhM
-
-
It's working here, you have to play with the modulator to get what you want, use the "UseTable" to find the right spots and "Inverted" depending on what velocity will increase/decrease the attack.
I'm not sure how the modulator calculates the attack though but my guess is Attack time * modulator?
HiseSnippet 1064.3oc4X0jaaaDElzRiqkRhSCPC5VtnKb.RCDUSSKPWDYqehEZjsfoiS2ELd3SVCL0LBjCUqPQA5QpGg1aPOB8HzaP6a3PIR5vnpJXmFipEF782vu2u7MdXnjAQQxPK6ZmNeJXYeWh2bgZb6wTtvpeGK6cICnQJHzwv5f4SoQQfuksckWnYXWqpUxu+74GPCnBFjwxx5LImAujOgqx3Nr02xCB5Q8gS4Sxo8Sa0mIEskAxXDOUHMrlRYWRu.NhpUaKhk81c84JYnmhpfHK6pGH8m6MV98Bi9mwi3mG.ZBWKO7fLr6IC70HV+rU6w7.+gK76HKKaxvrnPEST3SHC397k7yhFebh.mLKxGOr2pH7pT.dtuK3UBjryAopFH8.hGKjOUkIQim6P5KvjyHJF1yCEitV1+FosDUPndxD5kPuPjXoA68rFMdrC9mG8M0GEKXJtT3HEGIUvwh8dT8erds5+TcmqJZznRkoeOgxf.HrTw5Tc3pLbOQ7jygvG6LiFDCKUD8+hA0sWufJy314TTJ5K3pimBozYUEtkjBrRia3SupeGphpyJo7P8lBgJtFN1cfYXItIGUizAhtTImhE4uUBDKcj9wATUw5IcSTp.LdTHIpyThHtZd9lrqVjU8cGOZTZOPod6ZB2GPFxUrwki2sJAuXT6lFuosr2izczHfox.aURuuak8mW6P4gFnbGxqoyfj4nI.4gIzijgSbdAHfPcL0cESR+80cR5z0dR5wLEBgSCohnoxHvM+IeEYMyKqCnhEEU2vpfVZ2qG5d4zamVKX1LOygTQgCCoKbRC3+PF4e77tBJlP7.za7ONhgNqN1kucXXbPD7ZtuZradCyX2LO6Cog9XdgUn.sxZWUje.Sw91b5Wx37suo9By60l+azYU+K9dc9ONdeCd+Hx9G1w6jzYTIO6zULCBvA0E6zFHExoikBdgZfS.UH+hKfBkVk5R6qT3RIsiCmAEaJXz4uEWixK47K+bKCmWBHzxq3gnGmQ+YsRNtkL90vVdwQpByHzXN.nQE556xjX5AVUJXy2IgrlkI2iXbRmjYRe.TiriAr0Img0CL8q2LTdAoyRmv8eFtuJBNklfm7EJyv0A.+77vLH+bHnX5.mhm9NSNij0JR1q85JIstsx6tHGYpD+vdoi6RRZGt9qmt9g58IoMp2JBr6RRmgbaHztxUOq7+9UOW8Gtw0pbt0bIiOkfq50zIIc67ee99DYrhKtX.EWQ.WNkbT7DObuZFfHVHf.7EQr2ReiQCcCMsFNdfvOg3uveoBc0z1oBcWH78x6XBkEJeCybaa82H2IgC52hj++J0HCzzNtVI2.Gsiz3IMrlfai9FFSWS+4X7obaZtA17EafMOcCr4K2.ad1FXyWsA170qzF8EA1OVImXp+QFC6Z1Yv1bwnjVAq+FjIahLE
-
@Casmat
I tried it out and it seemed to work subtractive.
It worked for me by setting the Attack Time to the longest I want it and using the Modulator on that to shorten it.