Forum
    • Categories
    • Register
    • Login

    How to control Flex AHDSR Decay time with Velocity?

    Scheduled Pinned Locked Moved General Questions
    24 Posts 6 Posters 126 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.
    • David HealeyD
      David Healey @dannytaurus
      last edited by

      @dannytaurus You could script it, but the lack of modulation slots is a bummer

      HiseSnippet 1097.3oc2W0raaaDDlTVLHRoMHIHnnGWXzCxAFthQp9GDTXYKYEaTKaASGmdKX0xQVKL4trjKUhPQO2Wi9nzGgdtmJZeAxaP6rj5GJKAGYUmFfxCBZmclc937M+rrcnjAQQxPCyhmOH.LL+LKmABUu58nbgwQMLLenUKZjBBIoh1eP.MJBbMLMW4kZAlExaj779c2m5QELXhHCiKjbFbL2mqlHscsui640j5Bmy8ync0ZGwjh5ROYLhmUrJaDPYWQuDNgpUKmkwgzndFlOyxF1t5Vtc1g0Yyp1Uqv1oZkcJ6tMsJzkAksc2oZmp6vJukg48NvkqjgNJpBhvCceo6.mdx2JRcvE7HdGOPuv1vA8bpXi583dtsGEbhLLLsZOITsRZn5oVs3t7wxmDxdTxFjIVjMnYl6lfj8s.RlYfT9TH8XKGVHOPMYGMddf0QBjA6RQtIKTR00H2aMspKQMDpM7oWAMCwEisnzlkKuNA+YsWTrHxOQJRSO3c6cXCmyNPzG7jAfM4aIIoMabInZIci8n3aXoU0JRRzjLV0UW6EciELEWJHRwIREbpnzZE+whE7jLpGoOdVsPri7t9zt.shwUCJgtuPwBy55Mh.0dJUHuSrBJMm8a.L5f0IUJiOjulX+7sHOizGOtepH45Hoa2Tnbs8zQmPomGDN2s0owg2jgkDw9cfv0I8odwvXEQZa5bg6sX4BrTxJihRwQBt5z.X35lROWMGq++rYNFCYa7eu5nFTEUmLMTFpW.Dp3Z3X1.5ikuooVErZ.QWojAXA7L4cXF+HVOaYftAwvMv3wT4d57KQDRrYafbKpMJei0FKJDerUath0a9XL2bvHFo9XfwgcT9bqC51EXpI.LuUyueYaer3t+got+AVNbAjTHm37uHYM40z9.4kf.B0AO6aXDvusni.BV3Q.mxTn6OOjJhBjQScvNfO+boPGElH7UQX+K3GNSylYkWWRCm6Vue2l3K4bswgphCSRK1yWFKTSkFrxz7P9Eqzc5JhL5Om964+DLx4tor5SXkuYtLXrvHL5v8C7fQyDRv3Sv9YcowdpwSJlBksjBYPOofyxx5mA3flKuDByh849BgijvKuLQxSqcF3AzrYveUsiwLOZHFmfkLVb6ugvb4quzJEtDc0H4eCukew3sOv7oLv9QiZMMdx9vVSy6tEejYvCQTm8rRtYwPA+xE+7uWyINRMogXsJU9qcuNq+qg0tNem5niA7kXVw0iC6mQ6+X2DmNizgtIqbxpq9m2c4R2ISTW4+2STOSFq3hKaQwTr2gexvIw9N3fLFfdWH.O7vsLyoGFkttrdc5jLgaxh+FeFtosds4vMsGs4+I9vmxBkugkd2Ucej6mHAeuEIeIVA7SBw0Daij6ylkK8woPugwl9nlwvmurFVYYMr5xZ32rrFt4xZ3VKqga+gMTeIg8hUR+zRSCiVsOH4C.LMOPPwr7jJBi+An1zRAK
      
      dannytaurusD 1 Reply Last reply Reply Quote 1
      • dannytaurusD
        dannytaurus @David Healey
        last edited by

        @David-Healey Great, thanks. I didn't realise it was okay to set attributes like that in the noteOn callback. Proper noob! 😂

        Meat Beats: https://meatbeats.com
        Klippr Video: https://klippr.video

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @dannytaurus
          last edited by

          @dannytaurus Yeah it's fine, but I wouldn't do it from the Interface script in a real project. That script should be deferred. Add another script (midi processor) for this kind of thing.

          dannytaurusD 1 Reply Last reply Reply Quote 1
          • dannytaurusD
            dannytaurus @David Healey
            last edited by dannytaurus

            @David-Healey So in general, you defer the main interface script and not use the noteOn/Off/etc callbacks at all? And put all MIDI stuff in separate, non-deferred MIDI processors?

            Still wrapping may head around the way scripts are compiled at export.

            Meat Beats: https://meatbeats.com
            Klippr Video: https://klippr.video

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @dannytaurus
              last edited by

              @dannytaurus said in How to control Flex AHDSR Decay time with Velocity?:

              not use the noteOn/Off/etc callbacks at all?

              I use them when I have something on the UI that is affected by note events, such as keyswitches to change articulation and updating that visually on the UI.

              Interface script for non-realtime.
              Separate processors for individual realtime tasks.

              If you always defer your Interface script by default, which I think is a good habit, HISE will give you an error if you accidentality try to do any realtime stuff in it.

              1 Reply Last reply Reply Quote 1
              • Oli UllmannO
                Oli Ullmann @dannytaurus
                last edited by

                @dannytaurus
                You could create a velocity modulator in the GlobalModulatorContainer and give the UI button that controls your envelope a matrixTargetId. Then you can do it via the modulation system.

                dannytaurusD 1 Reply Last reply Reply Quote 1
                • dannytaurusD
                  dannytaurus @Oli Ullmann
                  last edited by

                  @Oli-Ullmann Thanks. I looked at the GlobalModulationContainer. I haven't used one yet so might be a time to try it, however I ended up getting what I needed with a simple TableEnvelope. It gives me great control over the curves.

                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

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

                    You could script it, but the lack of modulation slots is a bummer

                    Yeah I missed that. I'll check if I can add them in easily. Should I make the sustain modulation dynamic so that you can modulate a voice while it's playing? The AHDSR has only static modulation but I found it a bit limiting for the sustain parameter.

                    @Oli Ullmann you mentioned in another thread that there are UI performance issues with the Flex AHDSR envelope. Can you make a minimal snippet? Ideally this should prevent you from using it.

                    David HealeyD LindonL Oli UllmannO 3 Replies Last reply Reply Quote 1
                    • David HealeyD
                      David Healey @Christoph Hart
                      last edited by

                      @Christoph-Hart said in How to control Flex AHDSR Decay time with Velocity?:

                      Should I make the sustain modulation dynamic so that you can modulate a voice while it's playing?

                      Yes

                      1 Reply Last reply Reply Quote 1
                      • LindonL
                        Lindon @Christoph Hart
                        last edited by

                        @Christoph-Hart said in How to control Flex AHDSR Decay time with Velocity?:

                        Should I make the sustain modulation dynamic so that you can modulate a voice while it's playing?

                        No, better to think about doing MSEG envelopes....

                        HISE Development for hire.
                        www.channelrobot.com

                        HISEnbergH David HealeyD 2 Replies Last reply Reply Quote 0
                        • Oli UllmannO
                          Oli Ullmann @Christoph Hart
                          last edited by Oli Ullmann

                          @Christoph-Hart
                          Puh, I have this problem in a fairly extensive project, in which I have now removed all FlexEnvelope floating tiles and replaced them with my own panels. But I'm trying to replicate the problem.

                          1 Reply Last reply Reply Quote 0
                          • HISEnbergH
                            HISEnberg @Lindon
                            last edited by

                            @Lindon said in How to control Flex AHDSR Decay time with Velocity?:

                            No, better to think about doing MSEG envelopes....

                            Actually this project seems to offer a pretty simple to use MSEG envelope. It's MIT licesne. Not really sure about the complexities of integrating it into HISE, especially regarding the modulation structure, but could be a fun experiment to combine with the ExternFloatingTile tutorial.

                            Likewise it just uses JUCE's strokePath to draw the envelope so with a little elbow grease you may be able to convert this all to a panel in HISEscript...

                            ex.gif

                            Sonic Architect && Software Mercenary

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @Lindon
                              last edited by

                              @Lindon said in How to control Flex AHDSR Decay time with Velocity?:

                              @Christoph-Hart said in How to control Flex AHDSR Decay time with Velocity?:

                              Should I make the sustain modulation dynamic so that you can modulate a voice while it's playing?

                              No, better to think about doing MSEG envelopes....

                              MSEG = Kontakt style flex envelope?

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

                                @HISEnberg that looks pretty much like the table envelope we already have, no?

                                David HealeyD HISEnbergH 2 Replies Last reply Reply Quote 2
                                • David HealeyD
                                  David Healey @Christoph Hart
                                  last edited by

                                  @Christoph-Hart The main thing about the flex envelope in Kontakt that differentiates it from HISE's table envelope, is you have a sustain segment that can loop. Maybe we need a new table envelope with three tables, the middle one being a looping sustain...

                                  1 Reply Last reply Reply Quote 3
                                  • HISEnbergH
                                    HISEnberg @Christoph Hart
                                    last edited by

                                    @Christoph-Hart you know what... it basically is except the mouse controls are slightly different (more intuitive I find):

                                    Double-click anywhere along the envelope to add a new control point, splitting one segment into two.
                                    Double-click an existing control point to delete it, joining two segments into one.
                                    Drag control points up, down, left or right.
                                    Drag any segment of the graph up or down to change the curvature of that segment.
                                    

                                    I thought more was taking place in the "segmenting" portion but it functions like the current HISE table for all intents and purposes:
                                    https://github.com/getdunne/juce-MultiStepEnvelopeGenerator/blob/master/Source/SegmentGenerator.cpp

                                    Sonic Architect && Software Mercenary

                                    dannytaurusD David HealeyD 2 Replies Last reply Reply Quote 1
                                    • dannytaurusD
                                      dannytaurus @HISEnberg
                                      last edited by

                                      @HISEnberg The only thing missing from that is resetting the curvature. How is that done?

                                      Meat Beats: https://meatbeats.com
                                      Klippr Video: https://klippr.video

                                      HISEnbergH 1 Reply Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey @HISEnberg
                                        last edited by

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • HISEnbergH
                                          HISEnberg @dannytaurus
                                          last edited by HISEnberg

                                          @David-Healey single click controls either the control point or curvature of the segment.

                                          @dannytaurus no, I don't think it has a curvature reset. If you add a point and delete it, it resets to linear.

                                          The codebase for this looks simple enough to follow though, I think it would be pretty rudimentary to customize it to behave like Kontakt's MSEG envelope and add custom mouse callbacks to it. I could try it myself but I would I wouldn't know how to integrate it with HISE's modulation structure or HISE's Master Clock (DAW-syncing).

                                          Sonic Architect && Software Mercenary

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

                                            @HISEnberg I've added a few customization options to the mouse behaviour for HISE tables last month, this should all be doable.

                                            HISEnbergH LindonL 2 Replies Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            32

                                            Online

                                            2.1k

                                            Users

                                            13.2k

                                            Topics

                                            114.7k

                                            Posts