Fade out audio on button press



  • I bet it’s simple, but I’m having hard time figuring it out for some reason. I’d like to have a button that when pressed would smoothly move the Simple Gain gain from 0db to -100db over 1 second. How would you approach that? I assume it needs a timer but how do I smoothly change a parameter over time like this?

    Thank you!



  • I’m just bumping it subtly 😉



  • Does it need to be a simple gain module, or do you just want to fade out the signal?

    If you ask me in 2 months, you should use a simple scriptnode patch with a long fade-time (it's trivial to setup), but at the moment, I would recommend using the soon to be deprecated scripting DSP modules:

    HiseSnippet 1164.3oc6WssaabCDkqj2hH0nf1hfh9HgPePBvUQJMosnFs9hrUfQsSD75b4MCJtijH7tja4x0MJA4ao+R8SI+AsC2KVqZV3pHflBDTA8f3PNCOygyMMVq3PbrRSbZb9hHf3baWuERy7gyYBI43CIN2w8TVrAzzLQGrHhEGC9DGm5OxJvowVjzOuc2CXALIGVJhPdlRvgSDgByRoi26WDAAiX9v4hvRm9A6cLWIGpBTIHdp61mDw3WxlAOlYOVMWhymbjuvnzdFlAhINacfxeg2b0uIyN+yDwhIAfcw.hGZnLwiTA9VDa+MY3bQf+3B+NlPbbGujEpmwB208Tgu3Z4KYiOKcC5RMJyGN0tI3MnL75WI7FTA7HkP2VYnCAgxOIfYVEY1mi7MDpUeoNVZ.Yrvrn7y0+ov8ycGKL74Ui2ZUfW7g5ea7l+32x8noSAtYIX2xczK1zW52i.Qm2k6Z55w0hHCd+Vfb67kzQuXvJ.JSLo1uWyEyghMzqXZ5D5OQGprTooGy2+fDiQI6z9HICwle6so8wuco6zpYqlK0ZF50nhmHlnYZAD2KPw76zlqzP6t83Z.c4zmMnS63PkxLG7uvpDna2M0V1E8hAyXlFybwZGctu8h1gdu6Q8AF2HtBsAcJVWgFp7gpzXv1zA86mqDtCM6pDxYTCV0fZTo6GFauPgL.ud5zDI2FJQUxbez58ZUPGtJLRIQdXazECRftsZ95VMo3Gz5SUZNPEFqMm.TPfdjFsAPUZ5q.spUyFuK.6maJ5OS626gzcoC50m9i3u6aIg2jRDEj+LvLr.AK4+tVClivgrffIX0tN+cnaM109UjFhXZ3b03.1hNwrvn.3LjJ2lNIPwuzS7JnayWmi104v6z7MMokLeZ32A1s6vmyjRHHtrAqZ6UMgs9cFkKSBm.5B91ZD6Awpsql4bq0KygmwjkNnRdrTXdRDjudE2sPL1BoDnWJ8ZXtTTEkFNSkXv.tSYFs3kHxebRnG1ahCCycdTlSMhU0z08sqsUp7.oe5h+D+ju4.6Zm7MGTrIIODwl8mCIDNlzb+6jmrmk2RDXhdC27nCRJsVtZN4oGeHyvJLDZSzWh.sQXoYmCgqvNwYEUZ3dHDeoQEkd173RrjyZbsurvEWT7ixEPuSl8+TWOLcLcNhzpVeY5Z5yYWAzGAXcBaqfA2vnD+w5NJQzZOJwS3F75OWyjwQp3ULrGDJNG4f3xBeZLLRC+5Y1dSkkOTwzUt0a2cD5jUpiGyjnSaxsenJQZVooV8MpSxp85Kc9JZqr0+OeSJbqudv8enwbiBL5IrUTORdEDf4YoX7KvDqorj.SgzUCxOUIUQyURAubDvY.VdY1LPWF6U5P6aLXKhkRt6dmAA.qbz7Wu2IXTHSi7Drgbwf0mKto2quxMCtTalI8ii4Rq+QzbouGP4CQevOD2QHiqUWvyZyZikuUpDzuko+CyF3e0EWSGTzc00EGmiDhUDufysz82f7S05b+MPmucCz4AafNObCz461.c99MPme3F0w1LZ+DiJLKUDEL9nzobbbJlHAi5I+EPAHDoi
    


  • @Christoph-Hart so in 2 months official release of hise 4 directly? ^^



  • @yall : 👍 Lol - version 3.0 would be enough for me for now


Log in to reply
 

7
Online

1.2k
Users

3.9k
Topics

34.1k
Posts