A snippet to choke off or fade a note
-
This is a super non-musical and basic snippet that shows the very beginnings of how to learn to choke off notes. It uses a midi script processor, and does the following:
- Setup a variable container for a last event id value.
- On Note On - Ignore the incoming midi event
- On Note On - Create a new artificial event, and play a note on the synth. It forces the pitch to be midi note 60, and velocity to be 100.
- On Note On - store the new event id into the last event id variable.
- On Note Off - There are two options. The first is to just kill the note altogether using Synth.noteOffByEventId and feeding in our last event id variable. The second option is to add a volume fade by using Synth.addVolumeFade.
HiseSnippet 1237.3oc4W80aaaCDWx1pX1caXcsXXOxGSGxRrb9OBFZRbr6LVchQbZ2dKflhxhKRjZTTNyXX.6i19HruE609MX6njRjThiqqW51CyOjXdGOd+ti286nGHEDZTjPZX137ogTCyO1Z3TtxqsGlwM5crg4SsHdhKoikh3vKFgiXjHiilFhihnNFllUeodil0qYj74su3HrOlSn4hLLdifQnuhEvT4RGbv2w786hcnmyBJr6MOnGQvaK7Ew.npZ0zHDStDOldBVusJVFeKNxyv7qrZ4NhzxcmM10dO681Yy8rs2Z2Qa1rEwYq81Xis2vws0t3s2EL5QcbXJgbnBqnQFl0NR3Lcnm3JdpCdCKhMxmpWXaLD7bp3tBeGcHpkZz1i46L35rUjggo0f7bW0zb2yr5ybX2HOOG9YIJP4VTLAZVoL7pVBd12G7lAjLK.oZoP5IVCIRVnJWiFOO1pGWQktX3dpHTR2qg4ua0V.afqVK.eIsqDVbiAqrcylqhf+778ci4DESvQB9IBE8T9JOuwuzndiesA51pbcmoNsajBeepblp0kFx4Y3J73fQT4pnIX+X5MaDB+x4zGsX4TRZTWXiBdONScZHMa87KJLxRav2dcuiwJr9RISFruPpTwzvw7X5DnkH8Jpt0wznKUhPno3N2ePkivI1GqJWNoa5xT.4iR2g5KJdDSMsXS46QMVy4VisnP7IVCXJh2rwXkYfQHS8g.iYclehUGWWJQkCvZVc+gksMbwc+ml59GaMjwoIDqIN+KRVi9d7DJ5kTNUpSd1ygV8OVTZ0vElV8ThBb+4RLOJTDU5fGRCXmK35rPtvWGADAze5L8sYQ4sEX4LU81WzEBxYZyPrJVlTVbXfHlqJUFTcdr02aqa4NhB6eF7j09PQcWawpYdGSVVXZ7mlIMGc1yhNuxeVwZ80QCop3PDFIoiA5RICCHCoDHO.Mnq7fHXBUhTdTjONRgfUbEhApvQMz1nk1QKrmC5aPMuO1evS8FyERZxQw3DQ.iOFEnyhImYi58ArBSzWikrujybEkD3u2Gnu0GPaIUmPQXNBCTltLBC6mgHL2AE5imBZQbvuHLHCEERIv9nfNMuSxtlP8EDfjoQc3+f8b5U43OoYbM8AoAOLTaUjsdlVFBfbHftnjX.rKOa.Ir6jh.GTJ2j6n8m2rPvMm6whP9Ztfqf1VzOFCmJzZvuN1DttnQSKEe4Nc80SCBd5gdzzLmtRAzbS.cKO4BLDHQr5ZGcKm3j0dljGUX4XpBMQ3GGnuQQNGsVi5o9F637lD4ZJmhNdUTql5GJ70oY0+aF6a8PM1++ii5KwCU+ZLNjED5S6v0MWfDMF+bHpbww9pqkVlEpufKB8DbFoHM+YTkjMdLUVD6yLfNTofeAPtjmcvYTeJtvHqeq6AuBprwRHOQWxbw6+Sqm480WZkBWjtFF8O4d6AYVxCxy0ptPOW6AGuK+S2dXfxY.8HL4pOFJT+YfK4j3fgvqmHT.IbN0WyuXVQyDjttodc5ym3NIK9K3SlRa8ZyLk1Wq7eEeDfIRwEjTlScs7GkHAhadxOottUe8ZjsQBaZw6X8P6KHjxG0cLr0xZ3FKqgatrFt0xZ31Kqg6rrFt661P8KSOLVIBRaYML5OnSxnHSyNb8y6R5NL9a9jRAcA
There is very little that is useful about this snippet, other than showing the very basics of how to intercept a note event and do something with it. It is essentially monophonic and if you played a chord, I doubt it would work properly. This is easily addressable by using an array as our last event storage container, and pushing the new event id over to it.
I just wanted to put this together for myself to look back on, but also for people who are completely new to Hise to have a reference in the future.