Hanging notes on guitar portamento
-
Hi guys, I've made this simple note portament for hi velocities in a guitar-like instrument im working on.
Thing is I still not figuring out now to avoid hanging notes on this kind of scripts.
Any help will be highly appreciated :)function onNoteOn() { if (Message.getVelocity() > 125) { const var noteOn = Message.getNoteNumber(); eventId = Message.getEventId(); Synth.addPitchFade(eventId, 0, -1, 0); Synth.addVolumeFade(eventId, 200, -99); Synth.addNoteOn(1,noteOn, 100, 4000); } } function onNoteOff() { Synth.addNoteOff(1, noteOn, 0); }
HiseSnippet 1076.3oc4Ws0baSDEdUbVH1TmRmggm2GclIMiUnEnCCjK1NsdnNwSTHPepyVois2ox6JjVYvSm7GC3g9SfW3+Qegmg8hbjTiFSvyPaxfxCw6Y+NG8cttqFFK7gjDQLxo9Yyi.jycvdy4xIclPYbT+tHmMwCnIRHlXEc37HZRBDfbbp8Xs.m5qiLOuYuCogTtOjKBgNWv7gmxlxj4RGt+2xBCOhF.mwlV.8C1uuuf2QDJRU7oFtMJh5+R5X3XpF1ZXjyGzKfIEwdRpDRPNqenHXt2DwOws3OmkvdQHnW3h7TFxJ9HQXflw5ei5LgEFLbgemfPN3g4QgZ1nvmfGvBXWJOOZ7wlMH4ZTLd3r1xnmaQ50tR54VA8PEX25V1oHgHHMjJKyLc5HaClnblpOWB7Dlbdwz06U5dO7PlzeR07csJ3qJQ8eMeyR9Mw8FMB7k4jcc7Q+v61L8lVp7QXOFGLcjFh7ol0jumNCHOF3PrNn5tjlxe+51TFcsaJOwWpd8mES4IQhjRF1ClxNSv0QjbgeWBbTL7impyxEk2QPiqbq2r2QJmrRc7nxzXS4xASEo7E7+0+YqeaOmZW6bRwgCk6ZJfuhIEq+dXRw+hAYNWs26dXO+XVjLeGM21.ONjE.kKbr.Qq8GN3XXLAlAbY+fupYC6eiR495HDQvOVHgS3s1pYiW0rAQ8vFQZMPYd0r5cFCxygPgup4s0Vjug3t6C2xhJCrpbJQRlQiIbicHeMoftZaeb5zW.ws1R8tqmQixf5YEZQX5N1gFDXFnnqfakoz1j1aStuq5ekAdtHLcJTF4ts0XeziJiLySc21R0sItZXOncaiE0dyEMabwaGZFMpProrsTao3yBqYrhxBjBVnifKiEgg5.PiW0ndiKJsst6r5cxTrE2D81VEgCSgKAppHJWx035UxoxVpQwxB.E79bl7jHH6P2E0CKj3htLLTDTteUTpwcp.VtnJlS1wxI8rk9coRptzOSlBWDDKYZOzoKLSMny1HTG2ERdoTDcy3.0Urq9tV99g3CdRWuSyNH07aRO9LUaWza0TOPvEQSDblewwnmBxX13wPbQ1WoKcfTptCVmz3YkFz2E7oyuhTK3bIaruUxSUcYgEA9DkGeEycofe8W12KMQV5brm85SgPflT5jod9BU5AVVJn10KE7ObqvkUlzDacRh4bya1W5ZyEb0lQtYS16fMkE2Fhq2EmUvdqHvtINqW51PncoemPs+e9cBmJRkL93AT0T7eVMoRceIO00y8AES3bHT8hvNqoOnzttsds8947.yh+R8jsoqdsS1ltK17cx6XJ0OV7be6I95YtaXjn7at4K9qiGnWSbQl6xnzC2dm1nop6U+beec399p3S05r6JnymsB57fUPmGtB574qfNewJnyWtTczeRyAoRwTaqnRvvdlaf43ziSUUxlpdzem0BWeJ
-
I'm not getting any hanging notes, please provide MIDI file that reproduces hanging notes otherwise I'm just sat here mashing the keyboard and annoying my family :)
-
@d-healey just play a chord. 4 or 5 notes (decrease velo to 80 to not get ear-damage :)
-
Do you want it to be monophonic?
-
@d-healey nope! It needs to be polyphonic. Just to trigger a 1 semitone portamento on 120+ velocities to emulate something like the example below.
-
I'd try a different approach. I would have the real note, the one the user triggered, be the final note that is heard. That way you don't have to worry about turning notes off in the on note off callback. I'd play a new note, one semi-tone lower than the note that is played, and pitch fade it up to match the real note. At the same time I would fade in the real note and fade out the new note.
HiseSnippet 1083.3oc4W0zaaaCFlxNbK1qNcEXXm0QafjTqrztVTrkOrcZMVchQTV11oBVoWaSTYRMIJ2YTj+C62w9IrsC4mTurK6xF+PNRNQMvyXMqASvGLe3yK0Ce+hT8i3dPbLOBYU4jog.x5NX2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dqvwtFNsV51fq8Z+Ngx++76DNlmHnrg8Hxt3+jrSk7ZUtxqm6ARkvXPf7EgsJoNbzLtoZr494Le8f+R9jNoiZrU5jNyl7F4cLl3Ewegm4TdUO2U0Hx8MS+E+Uv8TiscP56uHsC2bylnwxKY+BOOk6dCo+oXa1ZIr4KVBa1dIr4AKgMObIr4KWBadz0Zi56a1KQvGaJEk.86nu0kkUGFQlIqy5Q+sASLMy
-
@d-healey wow!!! that's smart.
It's there a way to avoid "pitch glide"? and just jump from -1 semitone to the noteplayed?? cause that's the real behaviour (mine does that but hangs notes)
-
@hisefilo Yeah, just delete the pitch fades
-
@d-healey that's fantastic, will try to emulate the effect. crossed volume fade still being perceived as a pitch glide. This is the closest I can get now
HiseSnippet 1093.3oc4WssaaaCFlx1bM1qNcEXXWyKsAbRsxR6ZwvVN3CsFqNwvJKa6pBVIZahJSpIQ4Nih7Nrmi8HrsKxiTuoWuwCxQxIpoFFnYMXB9Bye98S98ejjCB4tjnHdHvp7IyCH.q6BclyDSZMASYfdsAVaB6iiDjPjQzgyCvQQDOfkUwmpDXUtDP+818ND6iYtjTQ.vobpK44zoTQpzA6+CTe+tXOxIzoYPu698b4rVbedrjOEgMAAX2WgGSNBqfU.Br9rNdTAOzQfEjHfUoC4dyclveMyf+TZD8k9D0.afibgLh6x88TLVIEzZB02avB6NB.rfCR8BEMdguD1m5QuPdp23KzSfR0Hq+vpv0QO6rzq4JSOPF1UxvNII3dw9XwxLSENRlfxWNR0iIHrHpXd1v0+oz89vATg6j74agb3qLP8wluIA+pvNiFQbEojsDr6OeyFo2zPkOG5PYDcEolHekdL5mvyHnmRXjPkS098UTddwe+OV0hxfUtn7XWgb6OIDyhB3QKsvNjozS3LkGIU3OFQ5FR90gpnbV4s33vbm5s60UZj4piCVDGpSWNXJOlsf+m+tZ+8dVEW4XR9MGZlWygRerZNTb0nWNTx5pkX2G53FRCDoyn3yFvw9TOxx4GFffBuyBhFEybUNSDmcDWPNlUqd0JuoZEj7iNBUq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