HISE Logo Forum
    • Categories
    • Register
    • Login

    Decrease plugin initialization / load time

    Scheduled Pinned Locked Moved General Questions
    load
    36 Posts 5 Posters 2.0k 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.
    • gorangroovesG
      gorangrooves
      last edited by

      @d-healey How would I go about loading the plugin with no sample maps, then clicking on the a button to recall them and load the samples?

      One approach I am thinking of is saving a present of the currently loaded sample maps. Then, removing all sample maps and saving a preset. On plugin load, the default preset would be the one with no sample maps and user would have to click on a button to apply the preset with sample maps. Is this the best way to go about it?

      Goran Rista
      https://gorangrooves.com

      Handy Drums and Handy Grooves
      https://library.gorangrooves.com

      1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @gorangrooves
        last edited by

        @gorangrooves said in Decrease plugin initialization / load time:

        And there is also an advanced hi-hat with tip and edge, gradually going from tightly closed to completely open.

        So "multiple samplers" isnt the way most instruments achieve this. Basically what you are saying (I think) is that each drum has multiple articulations - and most drum instruments use a single sampler with the articulation assigned to individual notes - you can still manage your note decay/velocity on a note by note basis if you wish - So in the end you only have as many samplers as you have "channels" in your mixer (usually 8 but 12 or 16 wouldn't be a problem..)

        HISE Development for hire.
        www.channelrobot.com

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

          So in the end you only have as many samplers as you have "channels" in your mixer

          Well if you have release samples, you would use another sampler but run them through the same channel as the sustain (or whatever) samples, wouldn't you?

          But I get that it's pretty hard to make generic statements about how many Samplers to use for a particular project, but I can imagine that there's a possibility of using less than 50 samplers but achieve the same effect.

          Would it be the same to load a single sampler with a 12-voice limit as loading 2 samplers with a 6-voice limit?

          That's the real question here :) From a loading time perspective / memory consumption, it doesn't make a big difference whether you have 2x6 or 1x12 samplers, but if you use 12 samplers with one voice you get a worse performance than with 1 sampler.

          Anyways, a good idea is to load a basic sample set at the beginning (maybe purge a few mic positions in the default state), because my guess is that it's the sample loading that takes so much time. That being said, 8 seconds is not super unreasonable for a VST with a high sample count.

          1 Reply Last reply Reply Quote 0
          • gorangroovesG
            gorangrooves @Lindon
            last edited by

            @Lindon I am aware that other drum samplers use a different note for each articulation. Just because others have done something in a particular way, it doesn't mean that is how it needs to be or that it is a good way to be. I find this to be a very impractical and messy way of doing this. I believe that what I designed is an improvement, an elegant, tidy, and logical solution. You could playback a groove, and use the mod wheel, set to cc4, to vary the openness of the hats. When you look at the piano roll, you don't see a mess of notes going all over the place, but just two notes with cc4 controller lane.

            @Christoph-Hart Thank you. After further tweaking, the initial load time (the very first time the plugin is ever initiated) is around 11 sec, while every subsequent time (even after the DAW is restarted) is about 5sec. I am going to experiment with putting hats tip and edge on a single sampler for each articulation and see if I can achieve the same playback. I believe I should be able to and that will allow me to cut 12 samplers out.
            If that cuts the load time to perhaps 3sec, I can forgo the initial loading of empty sample maps. Otherwise, that would be my solution.

            I was wondering, is it possible to have the plugin load an empty set of sample maps (preset #1), wait 0.3sec, then automatically load the full set of samples (preset #2)? Basically, automate the step where a user would have to press the button to load the preset #2 while displaying "loading samples...".

            Goran Rista
            https://gorangrooves.com

            Handy Drums and Handy Grooves
            https://library.gorangrooves.com

            LindonL LightandSoundL 2 Replies Last reply Reply Quote 0
            • LindonL
              Lindon @gorangrooves
              last edited by Lindon

              @gorangrooves said in Decrease plugin initialization / load time:

              @Lindon I am aware that other drum samplers use a different note for each articulation. Just because others have done something in a particular way, it doesn't mean that is how it needs to be or that it is a good way to be. I find this to be a very impractical and messy way of doing this. I believe that what I designed is an improvement, an elegant, tidy, and logical solution. You could playback a groove, and use the mod wheel, set to cc4, to vary the openness of the hats. When you look at the piano roll, you don't see a mess of notes going all over the place, but just two notes with cc4 controller lane.

              Err, you dont see that if you have note-2-articulation maps either. Its an internal re-mapping. I used it all the time in the DrumDrops plug-ins, where you can use a cc value to open/close the hi-hats too.

              Message.setNoteNumber() - is your friend here.

              But hey you may well have an elegant solution, but it seems to be an elegant solution with a loading issue. Just pointing out a way to do this that removes your problem - if its not for you then - sure please feel free to ignore what I say and work out your own solution.

              HISE Development for hire.
              www.channelrobot.com

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

                Message.setNoteNumber() - is your friend here.

                Message.setTransposeAmount is your real friend if you don‘t want to handle the note off manually :)

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

                  @Christoph-Hart said in Decrease plugin initialization / load time:

                  Message.setNoteNumber() - is your friend here.

                  Message.setTransposeAmount is your real friend if you don‘t want to handle the note off manually :)

                  pwnd again...

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 0
                  • gorangroovesG
                    gorangrooves @Lindon
                    last edited by

                    @Lindon If I understand correctly, for the end-user, the experience would be identical as what I have now, but things would just be laid out differently inside the plugin back-end?

                    Goran Rista
                    https://gorangrooves.com

                    Handy Drums and Handy Grooves
                    https://library.gorangrooves.com

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LightandSoundL
                      LightandSound @gorangrooves
                      last edited by LightandSound

                      @gorangrooves Probably possible with the timer callback, just stop the timer after you're done (regarding loading after a short interval)

                      gorangroovesG 1 Reply Last reply Reply Quote 0
                      • gorangroovesG
                        gorangrooves @LightandSound
                        last edited by

                        @LightandSound Thank you.

                        Goran Rista
                        https://gorangrooves.com

                        Handy Drums and Handy Grooves
                        https://library.gorangrooves.com

                        1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @gorangrooves
                          last edited by

                          @gorangrooves said in Decrease plugin initialization / load time:

                          @Lindon If I understand correctly, for the end-user, the experience would be identical as what I have now, but things would just be laid out differently inside the plugin back-end?

                          yes.

                          The user always presses (say) G3 to get Hi-Hat edge, and A3 to get Hi-Hat Bell, and how open or closed the hi-hat is set to depends upon a CC message (say CC 4) - so in your midi track you only ever see the articulation notes (G3 and A3) and a single CC track showing how open/closed the Hi-hat is.

                          In your Hi-Hat Sampler you have your Hi-Hat edge samples mapped say like this:

                          G4 = Hi-Hat Edge Closed
                          G#4 = Hi-Hat Edge 1/4 open
                          A4 = Hi-Hat Edge 1/2 open
                          A#4 = Hi-Hat Edge 3/4 open
                          B4 = Hi-Hat Edge open

                          When the Hi-Hat Sampler gets CC4 it uses the CC value to decide on the current open/closed note it should play if asked to, by looking it up in a table/array.

                          When the Hi-Hat sampler gets a G3 it Transposes it to the correct open/closed note to play.

                          Simple really - The added advantage here is that most of the players with Virtual Kits(Roland or Yamaha) we worked with at DrumDrops wanted to match the CC message to their "playing style" - so we let them edit the CC-to-open/closed table - it was a simple 127 x 127 table with marked off areas for each articulation

                          HISE Development for hire.
                          www.channelrobot.com

                          gorangroovesG 1 Reply Last reply Reply Quote 0
                          • gorangroovesG
                            gorangrooves @Lindon
                            last edited by

                            @Lindon Thanks for the explanation! That's very clever.

                            I did some simple calculations to see if memory usage would be improved if I were to adopt such an approach. I created a new sampler and placed all samples from 12 samplers into it, setting the maximum number of voices to 5, just like the other samplers.

                            Results:
                            The 12 samplers utilize 26.71 MB of memory, while a single sampler with those same samples utilizes 23.44 MB. The saving is negligible 3.27 MB, so for the 24 samplers being converted to 2, would save me maybe 6 MB which wouldn't justify the structural change.
                            I guess this is a good thing, since using additional sampler results only in a slight memory increase while offering extra flexibility.

                            What I am now baffled by is why the total actual memory consumed by the loaded plugin is around 350 MB, while the total amount of memory used by the samplers' buffers is just under 150 MB. Where is this additional 200 MB going to and what for? Any clues @Christoph-Hart ?

                            Goran Rista
                            https://gorangrooves.com

                            Handy Drums and Handy Grooves
                            https://library.gorangrooves.com

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

                              Do you use filmstrip images?

                              gorangroovesG 1 Reply Last reply Reply Quote 0
                              • gorangroovesG
                                gorangrooves @Christoph Hart
                                last edited by

                                @Christoph-Hart I use 3: slider, meter and mute button. They are re-used many times throughout the interface.

                                Goran Rista
                                https://gorangrooves.com

                                Handy Drums and Handy Grooves
                                https://library.gorangrooves.com

                                1 Reply Last reply Reply Quote 0
                                • LindonL
                                  Lindon @gorangrooves
                                  last edited by

                                  @gorangrooves said in Decrease plugin initialization / load time:

                                  @Lindon Thanks for the explanation! That's very clever.

                                  No worries - and its not very clever - its a pretty standard approach I think.

                                  What you shouldnt under estimate - is this user drawn curve for the CC values... every beta tester with an electronic kit wanted it..

                                  HISE Development for hire.
                                  www.channelrobot.com

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

                                    @gorangrooves said in Decrease plugin initialization / load time:

                                    I use 3: slider, meter and mute button. They are re-used many times throughout the interface.

                                    Ah ok, because images are the number 1 memory killer.

                                    350MB doesn't sound unreasonable though. Also you didn't take the actual preload buffers into account, that's a few kilobyte per sample, but it might add up with big sample sets. The streaming buffers are independent from the sample count.

                                    gorangroovesG 1 Reply Last reply Reply Quote 1
                                    • gorangroovesG
                                      gorangrooves @Lindon
                                      last edited by

                                      @Lindon said in Decrease plugin initialization / load time:

                                      What you shouldnt under estimate - is this user drawn curve for the CC values... every beta tester with an electronic kit wanted it..

                                      Is this because some hi-hat controllers are limited to CC4 value of 90, instead of 127, and user can't reach the full range?

                                      If so, this is easily resolved by multiplying the vdrum's CC4 value output by 1.41. I've done that when using/ recording vdrums into Cubase. I use Cubase's midi modulator to achieve this and record the resulting values. That way, what gets recorded is what would get recorded if a vdrum module that supports full dynamic range had been used. I guess I could include something like this in the plugin settings.
                                      I can see this being the only major reason to tweak the curve. I have 6 stages of hats articulations evenly spread across the dynamic range and considering how physically little electronic hi-hat controller has to travel to cross between the stages, I can't imagine someone needing to adjust those crossing points in the plugin. If you want more physical movement on the hi-hat controller to go from one articulation to the next, that is done by physically adjusting the controller.

                                      Goran Rista
                                      https://gorangrooves.com

                                      Handy Drums and Handy Grooves
                                      https://library.gorangrooves.com

                                      LindonL 1 Reply Last reply Reply Quote 0
                                      • gorangroovesG
                                        gorangrooves @Christoph Hart
                                        last edited by

                                        @Christoph-Hart I can't imagine the images are the ones taking up the memory. All up my images take 2.14MB (including the background). The ones that repeat are only 7kb in size. It must be the streaming buffer and pre-load buffer then.
                                        Seems like I have the structure down to the bare bones, so the only way to provide better user experience will be to load an empty plugin, then recall a preset to load things, while displaying the loader.

                                        Goran Rista
                                        https://gorangrooves.com

                                        Handy Drums and Handy Grooves
                                        https://library.gorangrooves.com

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

                                          @gorangrooves

                                          All up my images take 2.14MB (including the background).

                                          All images are uncompressed to bitmap when they are loaded into memory, regardless of what compressed format you have saved them in.

                                          Check the image pool to find out the bitmap size of your images.

                                          560f8c9d-7d15-4980-93ba-c1b490a83061-image.png

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

                                          gorangroovesG 1 Reply Last reply Reply Quote 1
                                          • gorangroovesG
                                            gorangrooves @d.healey
                                            last edited by

                                            @d-healey Thanks, Dave! Yes, those sizes are a different story :)
                                            Does an element that is re-used several times also get re-loaded several times in the memory? So, if a decompressed image is 4MB and there are 20 instances of it, does it end up taking 80MB of memory?

                                            Goran Rista
                                            https://gorangrooves.com

                                            Handy Drums and Handy Grooves
                                            https://library.gorangrooves.com

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

                                            29

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.7k

                                            Posts