HISE Logo Forum
    • Categories
    • Register
    • Login

    Flex AHDSR Sustain: Normalized vs dB Values

    Scheduled Pinned Locked Moved Feature Requests
    3 Posts 2 Posters 68 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bendursoB
      bendurso
      last edited by

      I really like the new Flex AHDSR, but I noticed that its Sustain parameter ranges from 0.0 to 1.0.

      In the previous regular AHDSR, Sustain ranged from -100 dB to 0 dB.

      The issue is that I want to migrate a plugin that used the regular AHDSR to the Flex AHDSR, but the Sustain values don’t match. While I can easily update my preset values with a script, it becomes problematic if users save their own presets.

      Would it be possible for the new Flex AHDSR to use dB for Sustain as before? Or perhaps include a toggle between normalized and dB values?

      bendursoB 1 Reply Last reply Reply Quote 0
      • bendursoB
        bendurso @bendurso
        last edited by

        @bendurso O wait.. I realized there's function called Engine.getGainFactorForDecibels() I can use to convert dB to gain factor.

        Christoph HartC 1 Reply Last reply Reply Quote 1
        • Christoph HartC
          Christoph Hart @bendurso
          last edited by

          @bendurso yes and if you have problems with existing user presets from a previous version, you can add a user preset pre processing step that converts the sustain value when the user preset from an older version is loaded.

          Be aware that the attack and decay times will also not translate 100% between the envelopes too.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          26

          Online

          1.9k

          Users

          12.4k

          Topics

          108.1k

          Posts