Table Envelope for non-linear pitchFade.
-
Hi,
I'm experimenting with the idea of a non-linear pitch glide. I'm not sure if this is the best approach, but I am trying to use a table envelope to curve the glide time.
The problem is how to get the value of the table envelope in real time so I can use it to dynamically modify the glide time. Do I need a timer?
What is the proper way to get that value?
The snippet below won't be much help to you as it doesn't work as it is, but maybe it will save you some time.
HiseSnippet 1405.3oc6X0saaTDEdVGuswNjRKf.DRHsJBjbZiRiCgBnpp5DmejE0MVYSCbEUS1cr8nr6LK6NqKFDBtDgDOBHtkG.dPPhW.dD5a.blYVu65X6DGSREUp6EVdN+Ly2bly47M61Jj6Phh3gHiRG1OffLdMS69LQ25cwTFpw1HiEME3i8HVATgSWzV8CvQQDWjgwb6IMwnTQj544ObKrGl4PxDgPGwoNjGQ8ohLosp84TOucwtjCo94rdiZMb3r5bOdL.m4LWCEfcNA2g7XrzrBlHiqsiKUvCsEXAIBYTbKtae6t7mwz1eDMhBPUNnJxFlHs3c4dtRDKkhp2k541Zv1NBASZqrfvb5fvaY1j5RSkmELtoRgUlG4iGFEFFdyMD7plGdqkCdiARF4fTQMjtkosSHMPjoQhmELavDjv1XHrmGJZaQE9kBl04fELwp93SH6FBCR8nx8VasUrfeV99kKClEw8Hq53QvgUjRfCiHgUObn0ddTWh0CrFLUcHh5b+.NCFTYIk1k.OxbndbXuI6fR6vNbnJE6AVpbOo4M4twdXHXVYIkNo428tmgCJAoAmbdUlx7nLhU6XlifxY5DYY5WkkK+ckK4wcvdVcjahCfyMXNUaH4bdD1KFrx515kKmn6WtT4RMgkBROUQ1MCEz1TGJ1KQoFXXW2VoK2.6goYmdPjngakkWIakWwp55qXIOL99xofkydLWP1mowZNnKsx5zl0ts1N8hyzh1p+fUab.v5NVUGYxjmagbOORnd9NkZYc630j3XEVr+wjvUfiJHbkZHjLObEh4jqPxW.6nSixYHm0fQE6GPXSprFkj6AUSERPEXpPUKcijZIaYnODQgRlqapN0QJ.m1S5O90ZnTmKpcdwDmUoDI9pxnOkuviKVfQFen45ar5vO81G9o8cj+8ypqjfPOow1Rygp2DjC6l.BjVICTFaS5AcR0sBJYtMI5DAOPs0RJq.fctatuIEb2LnV+zA+MtlOGTabMSUGYeblg+zeUKRPBroeKIeq9n31sofUllV9QHepqKT7winxzfT6p8a07GlgHXvATCEpzgv.bHzfG5IIENu4lBAz1G4RZii8z0aYy3OHOOR2wW+7NQx1GV941vnJ0FKR5Rnc5lio5qp8LpqnapfercMznclANgAMqxSTHYGSTHCJ46NK6.yffU+7wlSydTb5XONaxsoEt2xT0lZ73svXvqrr5JFuIbwKZtS61DGQFXKZt6WdlDuW5PYdMTdOnNheL1KK.BUp.pHZx32OQsUpdqTCpdF2b5Om1aNEL02bxXtoNhbAtoTw+2cSooM+9MG4nI5hWQd4betEzv7008b1g0i3A84UnbPen7HqImwC5xYTm7YGGPDgzNcHgCc+aZ.2CGNw8SRm0bjaGPfa6EQF0HEN19BPekLSSzOkc47KYdPWfXb0yNFWXJSEdmDFFYIj0KMMneWyAQ3Wpf8YxqL2TwqbozaX14Rl8k+.drfx5zDCkpxqJ83XeanAsCAVcFi3Iu+qQA4MU0iWSNVFArILW0f+AdRTVUN1HQY0AJyuEugdKtfoMv2ndA.0F7sUis9BL7BY6Q.lH4AzKX1n8cDvxeXHlEEviFZhsI9zCgqyEkW3Shf2Tk70GHyXxKuNGGNVUO+g6Baxw5iMVDGpR81zmGyDCkp8JVxK4Ksd4PQVZ.Fso9Amhi7MfW9Q8lACjVcVoKmFNxe+mGki7Cp8HHYCG1T8NSyTrn5E9y+LARAMbs9OSJbkmZ8JhfqVhfWDqgO1Ij+TG82CQlmNuRBruYpuPaIylxwVUG8Kg3Cc4dpiyvS0HNt9r53GMqNtwr53GOqNduY0wOYVc7SOeGkjPaFK395RSDpYqcz2h2XGl7J8pJBz+BEB5hT.```
-
@CyberGen
getTableValue()
- You pass it a value between 0 and 1 and it will return the table's value at that positions, between 0 and 1. -
@d-healey but how do I get the "0-1" value? That is what I'm really interested in. Can I get it from the table envelope processor in real time?
local glideRate = Glide.getValue() * Table.getTableValue(???);
-
@CyberGen At what point do you want to get the value?
I haven't looked at your snippet, I'm assuming your glide script is timer based and you want to pull the value when you start the timer running?
-
Oh I just realised what the issue is. You need to get the current value directly from the module's table.
Here's a snippet that demonstrates it (press a key and the current value will be printed to the console)
HiseSnippet 1151.3oc2W81aaSDF+bZ7XIiM1PS.uzpBjRDSQIktAUSnk1j1QDKMQMoEd2zM6KImp8clymyVDBw2.9dw63ix9F.O2ctw1sl1zvFUfegketm+86dtm+bdnf6Rhh3BjUkwKBIHqOzdzBlbVmYXJC0qKx5d18wQRhvwrzdKBwQQDOjk0FOWsfUkxH8yae1dXeLykjtDBcBm5RdAMfJSWcX6um56e.1iLlFjQ5sa2yky5v84w.d1vtIJD6dJdJ4PrRrR1HqasuGUxEijXIIBjYOt2hQy3ulYj+DZD8U9DEQKzHvPlkQclQ88Fd1dMBgrrGlty2vryencepGc45oQf6qY3jpQ1XfUoKCRstFPxJCjJafzCrG4JngxTNJ7bG6dL3.YBFB0YghQVToe2xtCGjfIaDfOkbf.HVpQsmzr4ibfW0eZ0pP3NR5LGKbFiAPtOaNwmGRZ47sN5rfFSIRMmk.n1lZZmkhtY8kBUSYyyYRkoNCLfbc3AgbFPjXGPc.FFeEIwBoJiPTqYisdb8mNIl4JoblCmcHWRFvpUu5OWsR0eopy4YMYRg7TdVv88ASVDaiyzb74tXeGJyi7F.w4iFZfGKD.r8WzkFE5iWP75ojsF.+JUq.9Ih6SZDJnvVyryVFVNA6GSpoMccP7BQXMVbvqHhGAANP3kXERDxmccqUK6x0DwyHHm0iQkCBIIzGv88TYMpuuXtHJ4HSkUlfP.JRcN4cSxI06MDErwssM6XjF7Yq98vRLx5Kr2Z6F4elO.dM4KUetSG4NGSGfPG2qqR7DWBdGPTHQHopMtUWxbnShornhcWRzoRdnV1jLJj0Gbk.7MPgu0uA.ag5iuC930TO4LEwXKDZFgNclTQsIPEdV.ommpR7b48ParKTtBMJ3dw9XY9tGp1jILfC8bkrpxRVDUtHaazqQKklWZKkUEhOvdHU5NqXLVp.LBGRuOvXRi36Zu+jIDWYJ.KaevOttccWc2eOi6ui8HJin6Ioc9mnoc9A7bhyyILhPE7ZcICB+iUcPX3JOHbfqDb+XAlEExixY3Qj.5XnBHJ6hGGAs8I+zQpSyrq2giEEx5sO6.XSVnNivxXgNsX2.dLSlKMXi7mCkWs9S4qHxHeAiEKeCLo9cSY0MXkuUogW3lc2GxiCBSmqow3GCsRmfi8koM1xhx9bFObFmQcydpeDQJnSmRDYwdganckR3Jboq7v1GQ7I3rYved6W.YdXADmHqYr35ewpBOu9LaCbcTUiN23crqZf5GYm61HIMrO+zn2iGZs+0KdnscaiPZXz8ZLkOwR+s5sSm75kXGz6trgRqX1vmljM7ONYn7pkLbE2HakygOKB+eJXeo2.Yi+eeCji3wRJaZeLTeptf5gwAifA+tDv6LFwORcgzRpg2F5lJZyjelml3OgmDlsTzVILacFy+U7Q.1Uveoq42ETUZ2VuBruY5+euhceEsSA+mP.L09ktt4M0ETbq0UwuZcUb60UwGutJ9j0UwudcU7atZEUWpZ2XIOvTZhP8Gtuo4s09LUmbcEA5u.fnJ1GK
-
@d-healey This works to get the current value. Thank you.
However, It doesn't seem to work for the pitchFade. I'm guessing the pitchFade function can't work with a dynamic value within a single fade.
So a non-linear pitch fade is not achievable in HISE?
Maybe there is another way?
This is a far as I got.
HiseSnippet 1452.3oc6X0saaTDEdVmrs0IzRKf.DRHsJBjbnQQdaRCsBUUm3jzZQcST1zBWQ0zcGaOJ6NyxrylVCBAWh3kfqPhGGj3EfG.tnuAvYlY89SrSZpgVEA0WXo4729cNy4uc2Uv8IIIbAxp99CiIHq2v1aHSNn8.Lkg5rIx5h1R7iCINwTo+.zFCiwIIj.jk0L2QIhU8YQ5eO61afCwLeRAID5gbpO4dzHprf5ts9bZX313.x9znRRuZqN9bVadHOEfyL1MQwX+Cv8I2GqDqlMx5baEPkbgmDKIIHqY2fGLza.+ILi7OjlPAnpN3h7.CYHuMOLPgX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exVrCIgPObMJG0ioLx5xY73AbF0ub1wdDof1uOQTYUdZLODKNV+IqqYoAY6QfEGSHiKjFGa9OXTUlkKYmO19ZqVXhadD8xr6KR2C2SNlW6TlZ7dYSSTkTNmoaF+91ihpm4g5IN2Xl+aO2XOdpjx52ECknp0eteZjGzX1m.OcFiDp1w0plZaTy4lpypHfGgEnO7WvuLltpyVYLcGwrrKdIiKNusGLmQ+9EZG7c0mc9BL7Nc2g.SfTWPuhmBsiuDd76KvrjXdREC6Qhn6CqnkTl3CRfW1k706oxXJSuMGKlHqmc6sAmbh53gkoBcp25Q7TlrRp1qmNdVYQzJiFqOBidzn3iLa7sfWnQus+HptS6XxSyrwe8mFe13G05dPxFVzU+dPSUrv8E9KHcLCBLv040CB9+9ffWEOiHruf+Hey27PkmdAMEvuY5Oxac6tpyNti+0Nf25m9He+plZLEu1zp3JSqhqNsJd8oUw0lVE+zoUwa77UTMDZ8TIOxTZhPc2cKy15VawTqtqqHP+MfGoe5n```
-
@CyberGen Yeah the pitch fade it linear, you could try calling it multiple times within a timer and seeing if you can create a curve.
-
@d-healey Bummer. I think this plays a big role in why pretty much all glides sound unnatural and unrealistic, except when you use them for a synth. Humans are not great at doing anything in a perfectly linear fashion. Pitch bends aren’t the exception. Maybe @Christoph-Hart can work something out and add a non-linear pitch fade in the future.
Thanks. -
@CyberGen can't you just assign an lfo in one shot retrigger modes and use a custom shape?
-
@Lindon I thought about that initially, Yes, I suppose it would work when used for simple pitch modulation. But I couldn’t figure out how to turn it into a playable legato/glide script. I mean, if the pitchfade function ultimately only accepts a fixed value for fadeTime, its going to be difficult. I recently just updated my glide portamento script to use object factory and stacks. It’s going to be hard to reinvent that wheel.
-
@CyberGen then I guess I would generate a set of values that aproximate the curve you want over a fixed set of time slots and use a timer to modify the fade time to match these values...
-
@CyberGen If you fade note to note then the fades are so short that the linearness of each one isn't a problem as the overall fade can have a curve. This is what I've been using in my instruments