HISE Logo Forum
    • Categories
    • Register
    • Login

    Audio stops when Envelope Decay reaches -61 dBFs – Bug or setting?

    Scheduled Pinned Locked Moved Bug Reports
    18 Posts 4 Posters 758 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.
    • FrankbeatF
      Frankbeat
      last edited by Frankbeat

      Merry Christmas!

      I'm trying to get a smooth amplifier decay on some continuously playing samples. But the AHDSR envelop seems to stop the sound immediately when it reaches about -61 dBFs. Is this a bug or just a setting that can be changed somehow? Is it just something like an Eco-Mode like it was on filters etc?

      Bildschirmfoto 2023-12-24 um 12.57.22.png

      My Release is cranked all up to 20000 ms

      Using HISE from the develop branch (Feb '23)

      1 Reply Last reply Reply Quote 0
      • FrankbeatF
        Frankbeat
        last edited by

        Showing the XML of the envelope revealed there's indeed EcoMode="1.0" but it seems it can't be set to 0. When I change it to 0 in my text editor, it still remains 1.0 with next HISE session.

        Using HISE from the develop branch (Feb '23)

        1 Reply Last reply Reply Quote 0
        • FrankbeatF
          Frankbeat
          last edited by

          BUMP…

          No ideas on this, anyone? Very sad to not have this working. It would be a feature of very use for high quality synthesis.

          Using HISE from the develop branch (Feb '23)

          A 1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by

            It looks like it's hardcoded in the source:

            float AhdsrEnvelope::getAttribute(int parameterIndex) const
            {
            	if (parameterIndex < EnvelopeModulator::Parameters::numParameters)
            	{
            		return EnvelopeModulator::getAttribute(parameterIndex);
            	}
            
            	switch (parameterIndex)
            	{
            	case Attack:		return attack;
            	case AttackLevel:	return Decibels::gainToDecibels(attackLevel);
            	case Hold:			return hold;
            	case Decay:			return decay;
            	case Sustain:		return Decibels::gainToDecibels(sustain);
            	case Release:		return release;
            	case AttackCurve:	return attackCurve;
            	case DecayCurve:	return decayCurve;
            	case EcoMode:		return 1.0f; // not needed anymore...
            	default:		jassertfalse; return -1;
            	}
            }
            

            Dan Korneff - Producer / Mixer / Audio Nerd

            FrankbeatF 1 Reply Last reply Reply Quote 1
            • A
              aaronventure @Frankbeat
              last edited by

              @Frankbeat In the meantime, have you tried the version in ScriptNode?

              FrankbeatF 1 Reply Last reply Reply Quote 1
              • FrankbeatF
                Frankbeat @aaronventure
                last edited by

                @aaronventure I created a Scriptnode Envelope Modulator in the Gain Processor slot and sticked in a simple_ar [poly]… It obviously gets triggered when I press a key but no sound is heard.

                HiseSnippet 1500.3oc2X0raaaDDdojWmX2jzl1bo.4.OzCI.IVR42FzCV1R1IFIxVPx0n2bWStxZgI2kX2kRVsnnOB8bt0Ggds2x6PeQxaP6rbIEIkULbDrSKpMfAmYmg627+P2UJ7nJkPhbVY+IQTjyMv8mv0CaMjv3ncZibtEtCQooRWKqMmDQTJpOxwo5KMLbVYITxOue8MIADtGMmEBcff4QeCKjoy41s4qYAAaS7o6yBKH8SZtimf2RDHhA7TEWGEQ7NgbLcWhQrJXjyxa4yzBYeMQSUHmk1T3Oo+PwXtU9CXJ1QATCQCTe3EYYusHv2fXyynVCYA9cyraEB4f6l6EpZ8B2A2g4ylxO2a7EIG3lqQQ+gSkxvqZI303CAu4.ImBPZIKjtMtumjEoyOwfmOCuCGBNCHfauHTrxhbdGtk.DfqWKjbBcaIPLUg68r50efK7m6+cCh4dZlf6J36Jzz83269q9yqtxp+xptydzfAy8Ly0HEAAT4bO1Dokmmh2iGGdDU9.2QjfX5TAAyurOc4KlO0yZ0EDTv2gyz6EQSoySJZLmH.J0sAO886zlnIlfRJOPtHpTyLvwoMcDjgaCQqfaSUmnEQPN9YhePlivONfnKmNYpgRO.7Gkhgl.EWwzSJViMaN1ReX+Q84VBLWq8BB2ai6xzdCmOdqLG7BdsqZ7lVwdS7VCFP8z4fcI71+v4VddoCk6ZgxWh6qkTRHiebeRXDTRjfmUwoTMtLZhFcgah1URCDD+9repfXuq4lwf+RVl6ezL4p1HTDyKcWoHuGMhRzP3ufNWuYuduTJhilUq2udRxx9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U+jDFBIdRwgd185LAiqmvABC7DqdEbGCsaCznzQ2lMhPgvh8G54YpzeHjBMecdzBnyiW.cdxBnySW.cd1BnyyW.c91yUGy2TsQrVDZmB.L5tksxwYqoUNUQ+CQr9KA
                

                Using HISE from the develop branch (Feb '23)

                1 Reply Last reply Reply Quote 0
                • FrankbeatF
                  Frankbeat @Dan Korneff
                  last edited by

                  @Dan-Korneff You mean, chances are it would help to change that in the source and recompile HISE?

                  Using HISE from the develop branch (Feb '23)

                  Dan KorneffD 1 Reply Last reply Reply Quote 0
                  • Dan KorneffD
                    Dan Korneff @Frankbeat
                    last edited by

                    @Frankbeat Admittedly, I only did a quick search through the source code. There were a couple spots where it appeared to be hard coded, but I don't know it's exact and complete implementation.

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    FrankbeatF 1 Reply Last reply Reply Quote 1
                    • FrankbeatF
                      Frankbeat @Dan Korneff
                      last edited by

                      @Dan-Korneff Okay. But thanks anyway, mate!

                      Using HISE from the develop branch (Feb '23)

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

                        @Frankbeat that‘s the line you need to change:

                        Link Preview Image
                        HISE/hi_dsp_library/dsp_nodes/EnvelopeNodes.cpp at d3f364f5c2832770a8bade634607e0f70b55f9df · christophhart/HISE

                        The open source framework for sample based instruments - HISE/hi_dsp_library/dsp_nodes/EnvelopeNodes.cpp at d3f364f5c2832770a8bade634607e0f70b55f9df · christophhart/HISE

                        favicon

                        GitHub (github.com)

                        FrankbeatF 1 Reply Last reply Reply Quote 1
                        • FrankbeatF
                          Frankbeat @Christoph Hart
                          last edited by

                          @Christoph-Hart Do I have to set that to zero like

                          if (state->current_value == 0.000f)
                          

                          ?

                          Using HISE from the develop branch (Feb '23)

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

                            @Frankbeat no zero will cause the envelope to run indefinitely. Try something in between :)

                            0.001 means -60dB, 0.0005 is -66db 0.00025 is -72 dB etc y

                            FrankbeatF 1 Reply Last reply Reply Quote 1
                            • FrankbeatF
                              Frankbeat @Christoph Hart
                              last edited by

                              @Christoph-Hart Alright, thank you very much!

                              Using HISE from the develop branch (Feb '23)

                              1 Reply Last reply Reply Quote 0
                              • FrankbeatF
                                Frankbeat
                                last edited by

                                Veery nice! Now I have a smooth logarithmic decay stopping at about -100dB.

                                And it was a charme to see how easy HISE can be recompiled. Never thought, I would do such things :beaming_face_with_smiling_eyes:

                                Using HISE from the develop branch (Feb '23)

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

                                  @Frankbeat welcome in the world of the real software developers, all that pain that you had to go through for setup your HISE environment finally pays off :)

                                  A 1 Reply Last reply Reply Quote 2
                                  • A
                                    aaronventure @Christoph Hart
                                    last edited by

                                    @Christoph-Hart since you're handing out welcomes to the big boys' club, can you tell me what your workspace looks like?

                                    How are you working on this thing? Anything out of the ordinary? What do code iterations look like? Are you closing and re-launching the app all the time?

                                    My "big boy" development experience is limited to Unreal and its way of doing C++, where it mostly hot reloading so you can, most of the time, write live code.

                                    Do you have something like that set up for HISE? Is there something JUCE-specific in the workflow?

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

                                      @aaronventure No, I'm doing most of the work with a standard edit & recompile cycle in VS2022+Resharper but I find that to be not too annoying - the debug build takes 10-15 seconds to recompile if I'm working on a code piece that doesn't require recompiling all modules and there are a few convenient helpers to live-edit constant values & colours (the JUCE_LIVE_CONSTANT() stuff). I actually found the delay between writing code and seeing the result quite useful - it forces you to think a bit more about the code you're about to write.

                                      If I'm starting out with new features from scratch (eg. the ML stuff), I usually do it in a small isolated app that compiles faster than HISE and then when it's somewhat ready I move it into the big codebase.

                                      1 Reply Last reply Reply Quote 1
                                      • A
                                        aaronventure
                                        last edited by

                                        Today's

                                        65fb14f - - added HISE_SILENCE_THRESHOLD_DB preprocessor for changing the silence detection threshold for envelope decay values etc.
                                        

                                        seems to be about addressing this.

                                        /** This can be used to change the threshold of what is considered "silence" in HISE.
                                        
                                            This value is used at different places to figure out whether to stop smoothing, stop a decaying envelope curve, etc.
                                         
                                            It tries to use a sensible default here, but you can override this (as a positive value, it will calculate the gain factor by taking the
                                            number as negative dB value and convert it to a gain factor).
                                        */
                                        #ifndef HISE_SILENCE_THRESHOLD_DB
                                        #define HISE_SILENCE_THRESHOLD_DB 60
                                        #endif
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        53

                                        Online

                                        1.7k

                                        Users

                                        11.7k

                                        Topics

                                        101.8k

                                        Posts