HISE Logo Forum
    • Categories
    • Register
    • Login

    How do you Tempo Sync ADSR?

    Scheduled Pinned Locked Moved General Questions
    60 Posts 5 Posters 3.5k 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.
    • ChazroxC
      Chazrox @Delamere
      last edited by

      @Delamere how many samplers are you working with?

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

        @Delamere I haven't used it but I think you can accomplish this with the Transport Handler

        Link Preview Image
        HISE | Docs

        favicon

        (docs.hise.audio)

        Something similar could be done with scriptnode but I would look into the transport handler first.

        D 1 Reply Last reply Reply Quote 0
        • D
          Delamere @Chazrox
          last edited by

          @Chazrox Thanks for the reply.

          I have uploaded a quick diagram of what I am trying to do.

          The idea is:

          Samplers 1-7 will each have a knob to control the amount they're being sent to Send Container 1.

          Send Container 1 will have a Tempo Synced ADSR Envelope to control Samplers 1-7 & a knob to control the amount being sent to Send Container 2.

          Sampler 8 & 9 will each contain a Tempo Synced ADSR Envelope & a knob to control the amount they're each sent to Send Container 2.

          Send Container 2 will then have a Simple Gain knob controlling the volume before the Master Group Input.

          Hope that makes sense, thanks.

          Tempo Synced ADSR Example.jpg

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Delamere
            last edited by

            @Delamere Send containers are only for send effects. You can't route general audio to them or voices and have them processed by envelopes.

            This simple snippet shows that the envelope has no effect - I think the fact we can add them in a Send Container at all is a glitch.

            HiseSnippet 1064.3oc6X0raaaDDdok1TKkzz5hfhdjG5AmhfBQWGaIzC9GYoTgFYKX5j1aAqHWYsvj6xtboaEJ589X0GgBzWD+FzNKorIYDqhDqhKhg0AAsytCmY+l4alQbfT3PCCERjQ8ylDPQFOBaOgqF2dLgwQ8NBY7XbeRnhJMSDc3j.RXH0EYXT4EZAF0phh+b0dGR7HbGZpHD50BlC8kLelJU5f8+dlmWWhK8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7FmjWfnNWd8XIv8lG+Zkqg6qWaZgheohYiw9PUw2neKxYeTyn3VkUwuorJtcYU74kUwcJqh6VVEa9tUT2z5fHkvOgxhP8GzI9svZXzgSfL9X1A5e.T4Et5L
            

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            D 1 Reply Last reply Reply Quote 0
            • D
              Delamere @d.healey
              last edited by

              @d-healey Okay thanks for the reply David.

              So does that mean each sampler will need to have its own Tempo Synced ADSR?

              None of the samplers will contain any individual effects. Is there a way of creating 1 sampler containing 7 different instruments with the option to turn each instrument up or down in volume individually with its own knob?

              Thanks.

              HISEnbergH d.healeyD 2 Replies Last reply Reply Quote 0
              • D
                Delamere @HISEnberg
                last edited by

                @HISEnberg Okay thanks for the reply, I will look at the link you sent.

                Thanks.

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

                  @Delamere You can use the Synthesizer Group to load in several samplers and control them with the same envelope. You can also use a Container for that

                  Link Preview Image
                  HISE | Audio Modules | Syntesiser Group

                  A container for other Sound generators that allows FM and other additional synthesis types.

                  favicon

                  (docs.hise.audio)

                  D 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Delamere
                    last edited by d.healey

                    @Delamere said in How do you Tempo Sync ADSR?:

                    Tempo Synced ADSR?

                    The ADSR only lets you set values in ms, so if you're calculating the time based on the host tempo you can apply it to all the envelopes so they have the same values.

                    @Delamere said in How do you Tempo Sync ADSR?:

                    Is there a way of creating 1 sampler containing 7 different instruments with the option to turn each instrument up or down in volume individually with its own knob?

                    If the instruments are simple you could map each one to a separate group and control the volume separately using setRRGroupVolume()

                    @HISEnberg said in How do you Tempo Sync ADSR?:

                    You can also use a Container for that

                    Are you sure?

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Delamere @HISEnberg
                      last edited by

                      @HISEnberg Thanks that's great and what I needed to do. Only thing is, you can't add a Simple Gain to each Sampler in the Synth Group to control their output volume with a Knob before the Synth Group. If I try to use a Knob to control the Gain of each Sampler it goes straight form 0db to -100db with no in between, it doesn't follow the Knobs Value. Any idea why?

                      Thanks.

                      1 Reply Last reply Reply Quote 0
                      • D
                        Delamere @d.healey
                        last edited by

                        @d-healey Ok thanks, is Tempo Synced ADSR not possible then? Say for example you had a Synth Pad preset & you wanted the attack to be 1/4 tempo and for it to automatically match the tempo of the project you're working on in your DAW so you don't have to use a reverb calculator every time?

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @Delamere
                          last edited by

                          @Delamere Yes it's possible, but you have to convert the project tempo to ms and set the knobs to the value you want.

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          D 1 Reply Last reply Reply Quote 1
                          • D
                            Delamere @d.healey
                            last edited by

                            @d-healey Ok great, how do you convert the project tempo to ms? & does that mean the attack will always be set at that tempo? Would a user not be able to use a knob to change from 1/4 or 1/16 etc?

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @Delamere
                              last edited by

                              @Delamere said in How do you Tempo Sync ADSR?:

                              how do you convert the project tempo to ms?

                              c4a37b89-0904-409e-9075-a5f6ced236ff-image.png

                              As @HISEnberg said above you can use the Transport Handler to get the host tempo.

                              @Delamere said in How do you Tempo Sync ADSR?:

                              Would a user not be able to use a knob to change from 1/4 or 1/16 etc?

                              Yes they can if that's what you want.

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

                              D 1 Reply Last reply Reply Quote 1
                              • D
                                Delamere @d.healey
                                last edited by

                                @d-healey Ok thanks, I just really don't understand it. I just want to be able to have an ADSR Envelope with 4 knobs on the Interface that control the attack, decay, sustain & release. But with the Attack, Decay & Release to be Synced to the tempo of the track in the DAW, instead of ms.

                                d.healeyD 1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @Delamere
                                  last edited by

                                  @Delamere If the knobs are synced to the DAW what will happen when the user moves the knobs on the interface?

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public HISE tutorials

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    Delamere @d.healey
                                    last edited by

                                    @d-healey What I don't understand, is how to sync the knobs to the DAW? I know you said to use the Transport Handler, but I can't understand how to do it.

                                    d.healeyD 1 Reply Last reply Reply Quote 0
                                    • d.healeyD
                                      d.healey @Delamere
                                      last edited by d.healey

                                      @Delamere The link that @HISEnberg provided earlier takes you to the documentation. On that page there is a snippet that you can load into HISE that demonstrates how to use it.

                                      If you can tell me which part you're struggling with I can give more specific info.

                                      Again though, if the knobs are synced to the DAW, what happens when the user moves the knobs manually?

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public HISE tutorials

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        Delamere @d.healey
                                        last edited by

                                        @d-healey I have read the link & opened the snippet but I just don't understand it. I know very little about scripting & I have been building most of the plug-in without it.

                                        Again though, if the knobs are synced to the DAW, what happens when the user moves the knobs manually?

                                        I'm not sure I understand what you mean by this question. I intend for the whole plug-in to be tempo synced to the DAW. If the User moves the knobs manually I want the tempo of the Attack, Decay & Release to change in beats, not ms?

                                        d.healeyD 1 Reply Last reply Reply Quote 1
                                        • d.healeyD
                                          d.healey @Delamere
                                          last edited by d.healey

                                          @Delamere said in How do you Tempo Sync ADSR?:

                                          I'm not sure I understand what you mean by this question. I intend for the whole plug-in to be tempo synced to the DAW. If the User moves the knobs manually I want the tempo of the Attack, Decay & Release to change in beats, not ms?

                                          Ah I get it now, I was misunderstanding the user interaction.

                                          @Delamere said in How do you Tempo Sync ADSR?:

                                          I know very little about scripting & I have been building most of the plug-in without it.

                                          The transport handler provides a callback that will tell your script when the tempo of the DAW has changed. TransportHandler.setOnTempoChange(var sync, var f)

                                          In that callback function you can use the tempo, combined with the value of the knob on the UI (1/4, 1/8, etc.) to calculate the number of milliseconds the attack and release should be.

                                          You can use that calculated value to set the attack and release knobs of the envelopes.

                                          This is probably a bit more complicated than beginner level scripting so I recommend you start with something simpler - my scripting 101 video on YouTube might be a good starting point for you depending on where you are at currently.

                                          Libre Wave - Freedom respecting instruments and effects
                                          My Patreon - HISE tutorials
                                          YouTube Channel - Public HISE tutorials

                                          D 1 Reply Last reply Reply Quote 0
                                          • D
                                            Delamere @d.healey
                                            last edited by

                                            @d-healey Ok thank you for the reply.

                                            I designed the plugins, how I want them to be etc, before joining HISE or learning anything about scripting. The idea is to create Sample Based Instruments from my own instruments that I have recorded & mixed through analog hardware that would have a tempo synced Attack, Decay & Release.

                                            Whenever using other instrument plug-ins I always prefer to use the ones that have this option, like Omnisphere etc. I find having to calculate the ms with a reverb calculator very time consuming and was hoping it would just be simple to change the ADSR from ms to beats.

                                            I don't really have the time at the minute to learn all about Scripting in Hise, what I have already learnt is from previously watching your video you have mentioned on YouTube. Most of what I need to do in order to complete the plugins is possible without scripting, it's just a few things like the Tempo Synced ADSR etc. So I may need to leave it in ms for now & come back to Tempo Syncing at a later date when I have time to learn scripting properly. Either that or it seems to be possible in Scriptnode which looks similar to MAX which I'm familiar with, so I will also look into that.

                                            Thanks.

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

                                            27

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.4k

                                            Posts