HISE Logo Forum
    • Categories
    • Register
    • Login

    Possible to get Envelope value from...

    Scheduled Pinned Locked Moved Scripting
    11 Posts 2 Posters 350 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.
    • ustkU
      ustk @ulrik
      last edited by ustk

      @ulrik Should be... But what envelope are you talking about and what is 0ms?
      Do you mean like an AHDSR when you play a note? Because in this case, 0ms is a 0 level...
      Make a minimal snippet

      Can't help pressing F5 in the forum...

      ulrikU 1 Reply Last reply Reply Quote 1
      • ulrikU
        ulrik @ustk
        last edited by

        @ustk yes of course, it's 0 at 0ms, stupid me 🤪
        yes I mean an AHDSR.

        But what about at 40ms, would it be possible to get that information from the AHDSR like

        AHDSR.getLevelAt(40);
        

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

        ustkU 1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @ulrik
          last edited by

          @ulrik Not I don't think so... Even using a timer as a workaround would only have the accuracy of the chosen timing...

          Can't help pressing F5 in the forum...

          ulrikU 1 Reply Last reply Reply Quote 1
          • ulrikU
            ulrik @ustk
            last edited by

            @ustk ok, thanks!

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @ulrik
              last edited by

              @ulrik but it depends on the finality you need this value for. Because knowing an ahdsr is not changing regarding to time, you can set your own equations to find out the value based on the parameters (that is what the source code does to calculate the mod value)
              It is a bit of math but doable if you absolutely needs it

              Can't help pressing F5 in the forum...

              ulrikU 1 Reply Last reply Reply Quote 0
              • ulrikU
                ulrik @ustk
                last edited by

                @ustk I'll consider it, math isn't my strongest side 😬

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                ustkU 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @ulrik
                  last edited by ustk

                  @ulrik I'm trying something...
                  Although I detect something weird in the AHDSR Decay. When the A level is greater than the S, no issues.
                  But if it is set lower, then the D time makes a step to reach the S level without respecting the D curve.
                  In short, you go straight from A to S in the case A is lower.
                  Should it be progressive too?

                  Can't help pressing F5 in the forum...

                  ulrikU 1 Reply Last reply Reply Quote 2
                  • ulrikU
                    ulrik @ustk
                    last edited by

                    @ustk Yes I've noticed the thing with Attack Level lower than Sustain, yes progressive if it's not too complicated

                    Hise Develop branch
                    MacOs 15.3.1, Xcode 16.2
                    http://musikboden.se

                    ustkU 1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @ulrik
                      last edited by ustk

                      @ulrik Something else is strange in the Decay
                      100% is a gentle curve and 0% is just a bit more pronounced but definitely not aggressive...
                      Wouldn't it be better to go from falling edge to linear with all curves in between instead?

                      Screenshot 2022-01-08 at 23.51.50.png

                      Also, I remember I've added a release curve knob one day that were doing exactly this, I might find the commit but not sure. Would be nice to get it too so I can work on this if I find some time. I might want to add all of the above at the same time, and why not a preDelay so we have a full DAHDSR that fits "nowadays requirements".

                      The fact is that I can't find where the internalBuffer for the calculateBlock is computed anymore, or maybe it is the state, this has certainly changed lately... @Christoph-Hart any hint on where I could find it? It got too complicated for my level now :)

                      EDIT: alright I found where the computation is, but it seems a bit more complicated, headaches ahead...

                      Can't help pressing F5 in the forum...

                      ulrikU 1 Reply Last reply Reply Quote 1
                      • ulrikU
                        ulrik @ustk
                        last edited by

                        @ustk said in Possible to get Envelope value from...:

                        Wouldn't it be better to go from falling edge to linear with all curves in between instead?

                        Yes it would.

                        Hise Develop branch
                        MacOs 15.3.1, Xcode 16.2
                        http://musikboden.se

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

                        47

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.9k

                        Posts