Velocity Modulator on Attack Time on Gain
-
@Casmat yeah we replied at the same time lol
for your specific use-case you could either
-
grab the velocity in the NoteOn() function and use that to set the Attack Time programmatically
-
lie to the end user by changing the displayed value of a slider to be the "extra" attack time
edit: you could also do the first option in ScriptNode using a MIDI node to get the Velocity, that would support Polyphony
-
-
@iamlamprey Yup haha! Would I use the Script Voice Start Modulator container under attack time?
-
@Casmat or you can control the gain directly inside the network (you'll have to tweak the individual numbers):
HiseSnippet 1794.3oc2YszTaaEEVxlqAC4YaZZ6p5EcQxLoLRf40zEw.FRXZL3IhPytLWjtXqAo6UU5Z.2Nc51tn+A5l1eDcUW0tqa6Ok7KnzyUOrz0H6XafzjZlgw2mmuy47cdH4l9LSRP.yWQs79c8HJp2.YzkxauYarMUYm5JpeJ5DhCyzl2cKp3adjsNC654PT1nqGNHfXonpV7IhsqVdJkvOu9wafcvTSR5TJJGvrMIOy10lmNayZeksiy1XKx91tY1c0Z6XxnaxbXc.nUDoo3gMOF2hrKVrsBHE0RaYYyY9FbLmDnnN0FLqtFsYmRi1+A1A1GBfDFnqX.WTzzaybrDHVLqxlsscrZlXBBTTTQMSMHEiLH2C0v1xt27oFl6DtPkzSj0dnVPFdEkfmdV3okAd4.I0LPZpHHcWjgousGOcEAdlCsCkS7OBaJ6Zh1qh5eh1jAafxm2EeLYaeXPuC7fk0zdTE3eO7KOpC0jaynUXzcYbxdzG7vY+tYKO62Oak9W5nixcMgX7YNND+bWV3o8G1Ae.si6gD+GU4DrSGRuMBpurMEMXaZVWtYjVmYiL5NTa9ddD5fHBJwlJ3auXm5XNV3HhmC1mGwmaKffZcxI.qNxsTFUmDbLm4A75K3y.1BypiClKSgDwMwK.1.I+lv4PCf3trwUWY7pQEh2E0zla1NeLVHGLBVpqCLFGMdSzVGcDwjmBvoPa+xqmPurh+VQheNjgMkDlgLT32ObbkuFeBoxSHThuv3oOjLi+8nlYzajyLtmIGD+99XZfGKP5hMHt16ynBqP5juH.B9IeyyEdyryuIC6m6Ru9waCJ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E26Miu2mQ.dhhzxCHWv0qdVB8TnsuDfTBsf1+UHYZTchItWRpoQKp0OVFIKbYDzCuHXe3o6dqoWkQIOo+fMxiE0YyN9mPTxr8kjtKza5tRUpz6dNT5qxP5vW5aVj+fS56RyopthTi+stvCYLGjC2mLeqwN6cgAV4OCEXFHOjV+pzXx.9PzRyWcgEVXEsUVo5pU0WTasdV..ziRc+9MqyDxDGeh3hZ5ZP3i1ZqsZ00VQSO1Ga3xX711zViV790oQ4F.gKfvk5QJgwks+uKcmARde0rwbRo4G0le5MgfnU6IUqMZUVG5y+jzp3DoeavXG6hCe+IS1OXyyYc3.knAFh+gJxhtLLfXIyjWURPROFwi0RhxLHTqvAmCehWTWLVMdQ8jEeqHCWroO6UwO8gv.NS3LPHOM7WNsLpgXbEckS52QKdUBuxzT9ptvAWXRO3hS5AqNoGboI8fKOoGbkI8fq9lOn3mxHN6oHpBBLatUTuhpaQwG5D+f5+aXCNUV
-
@iamlamprey bro, here I was trying to piece together how the midi and the ahdsr node would play nice with eachother, you hit me up with a snippet though haha. true legend!!
Of course PMAs are part of the answer, just to wrap my head around it, PMA nodes are just to scale and change the value of the incoming value by a set value?
-
@iamlamprey IT MAKES SENSE NOW!! Man PMAs are insaneeee! Thanks again man, a hise doubloon for a hise hero!
-
@Casmat said in Velocity Modulator on Attack Time on Gain:
just to wrap my head around it, PMA nodes are just to scale and change the value of the incoming value by a set value?
PMA means Parameter Multiply Add
You take the Value (left socket), Multiply it by whatever the Middle slider is, then Add whatever value is on the right slider, they're one of the most important nodes
regular PMA's are scaled to 0-1, unscaled PMA's just output the calculated value directly
-
@iamlamprey Ahhh, definitely would've saved a lot of time using them in the past
Just got one question how would I replace the simple envelope with the scriptnode one to have just one gain envelope?
-
@Casmat yeh i think you could replace it with the Script Voice Start Modulator, you'd have to change the network a bit, I have no experience in using ScriptNode for modulators though so I can't help with that part
-
@iamlamprey thanks!
-
Can't you just use the velocity mod's table to get the desired behaviour?
-
@d-healey the velocity mod table goes from 0 to 100%, my scenario needs it to go higher than 100% modulation, is it possible to do it regardless?
-
I see, so you want the user to set the minimum time?
-
@d-healey yup!
-
@Casmat Do you need to display the AHDSR table to the user?
-
@d-healey we were thinking of doing so
-
@Casmat In that case I would use a "min attack" knob on your UI that is not connected to the AHDSR directly but instead is used as the baseline for a calculation of the final attack which is then passed to the AHDSR's attack knob.
Here's a snippet demonstrating it. I've also added a table to the script so you can adjust the velocity curve. Your UI knob just needs to be connected to the min attack knob in this script.
HiseSnippet 1379.3oc2X8zaaTDEeVmLoX2zTJf37HKNrABk3zlVjpP0o4OMQst0JaZfaQS1cr8nr6LK6NqaMHDW4VuwY9nzOBf3KROyAf2L6506l35531hZHGr77dy689Mu+6zNR5xhikQHqpGLHjgrVD6LPn5sYOJWf1aKj0R3VzXEKhjR5dCBowwLOjk0b2WSvp57Hyeu7t2i5SEtrQjPnCkbW1C4Ab0Hpsa9.tu+NTO1A7fB29lM2yUJ1T5KS.7LGdUTH08DZW1in5qUAirVXaOtRF4nnJVLbm6I8F3zS9TQ58OjGyO1moOz.4.JJkLZydbeu1CeqwHjEt8nW9bou7OA2h6wyoOxC7gFFjQRTzGXUYRPpw4.RVEfz7oP5ZXG2HdnZDGMdtLdOADP5PAWcQnjdWj0KvaJgKHTWOfdBamH3Pt.12Z0UWg.er7c5jHbUbofHEORpXOVXubserV0Z+TMxoY0oyX4oMSjz2mEMV15nazjDzVjDbLKZERepeBK+hvyurOcgoym5l9pKbQoXOAW83PV14cj9dZek96mMBfxbav2dxdaQUTcPIiFbuPVjhqgi0Vr9PVcZHpJdKV7IJYHjWel3Gj4H8R7opxoS55lLFf+nTLTGnDwb0fh0UmibrUmXN1zBwqgayUt8FOFqLFLBdp2EXLqx7J3s6zg4pFAv4w67cyZY3za9kRM+kwNbAyzVzX7O0bl7sz9Lx8YBVj140XBcF+8osyX3T2Y7wtJv7GDQEwgx3RJ1gEvOPJzdgQDeRLzHf886qilEouojFMVVu7t6.OxwJiCUkDYRK1HPlHTkRClqbbX9oqzsbEQg6Ol9jy+tp087SWNynlHuYsw+3LpiPWiw0NuxOWIuedLSsKi2smxdccG7Z0frhXEz9LhvD8Y9POJx2PLYpWuKSkWYaWeic2xYex1YWpQ8QBqN1eyjn9ZAGZFpm2AT3kaW2vo9JDXlg1dCuqFHskPK.HXYupg8ZqCezX8Bn5Dwws3hMTJXHdYk+.g7X654LA8eiFZo0BWTJsYrqGH8zPnttjn9qbrkuzk5S5CFJGjfGv7LNTOcwtE3hgcIzTODbBtP+K6kIeEowZ2d46TcnBnCgaexmSrKAltFvPeV8kIeI4zbRswxFER9hWEav2TcXfR+3fKDwONQwryolJyJY.Aj38uww32ViimzHXqJYnBLuJaJPZEgIlh3PMxkvl.Mxf2hcg7zCu0KLhxUxboJYoLk33y8XQFsbYbdn5TZp4yaNSaBnwdPHzBV2abgWG5eF3Qszlavvu7TtGLpAN7WvgdlBd8oeMsgctlWbpdRF0eKqL0WCTQrZfNZs.VWGhB3dd9rgUy529e+Ove284Mgs9Cc3+.q3PAH+O+3u7mMiS5zgqs.lDDi5v8ChgL5v8BfJMj0GggwNDOVGZhuhDeBzT1mKNg4cfzDczU1ZbXF1cAX8oR81uZJFuD1zZMasoS0lsD1ZIExvdRA2sXp59Lvg0sKKpHhG6yHMdllyTPAawboCNC0rfeJkeaki9iloTdHCfVwKtKLMaz4OqoQc4DdQTSmjXUosYzX1mQiKsex1txVln4L41OG+XsIkZbEb1zFSB04Nu3bO+uwavJ1KMDqoQj2uA6hXSZwEA+5UwYIrWHbrKgypktH3Zm3uJbt+e+qB2Wln3htsnP2Z87tGkD3.+XLWFXcgf4qWKxphd9b54UGNK2gI7LGzCUyX1Pe1JiYigL+OwFAT2H4QtoaEo6s9AFJv6VX9mrUE2Relz3rKUAKJvOx0srpNifqMqBdiYUvaNqBt9rJ3slUAu8rJ3W+5ET+Cc2HQICRKMQnVs21r5pk01B8RmlJBz+BTIh82L
-
@d-healey Ahhh, that looks amazing, just modified the attack line slightly to match my use case! Thanks a lot!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