HISE Logo Forum
    • Categories
    • Register
    • Login

    Multi Output Tutorial

    Scheduled Pinned Locked Moved Documentation
    11 Posts 3 Posters 190 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.
    • Matt_SFM
      Matt_SF
      last edited by Matt_SF

      Some of us recently discussed how to add multi outputs in a plugin so I offered to make a tutorial.

      Multi Output Plugin Tutorial

      1. Building HISE Multi Output

      In order to do it, you'll have to build a multi-output version of HISE.

      A. In the projucer file, add these two preprocessor definitions:

      NUM_MAX_CHANNELS = XX
      HISE_NUM_PLUGIN_CHANNELS = XX

      'XX' being the number of outputs you need in your plugin, and it must be a multiple of 2, obviously.

      3ca5b3b8-b263-41ce-96b8-7205ab5b93ce-image.png

      I'm using the latest develop build of HISE, but noticed that the NUM_MAX_CHANNELS = XX preprocessor didn't work properly. I don't know if it's a bug or a problem on my end - or I was really tired at that moment...
      I changed the value directly in HISE's source code.
      This can be changed in the file: {HISE_FOLDER}hi_tools\Marcos.h line (49):

      /** Change this value if you need more than 8 stereo channels in HISE routing. Default: 16*/
      #ifndef NUM_MAX_CHANNELS
      #define NUM_MAX_CHANNELS XX
      #endif
      

      B. Build HISE

      Build HISE as usual.

      2. Setting the outputs in HISE

      1. In HISE, click on the Main channel meter to open the routing popup:

      My build has 48 channels, that's why there're so many output here. Your setup will be different depending on how many outputs you've configured for your build)

      Right-click somewhere in the popup, and change the channel amount (let's say we want 8 outputs) :

      5b812dd2-6a5b-4617-a2a8-3b5a3d64ec1a-image.png

      Now the routing appears like this:

      464f87a6-a230-40e4-8595-a9821772305c-image.png

      Again, it will look a bit different on your version, but all the output of your plugin should be routed to each of HISE's output channels.

      1. Edit the project setting

      Lastly, you'll have to add those extra definitions in your project's settings:

      HISE_NUM_PLUGIN_CHANNELS=8
      NUM_MAX_CHANNELS=8
      

      562b7413-4f5e-45b0-a8e5-5cf3fdef7d8e-image.png

      You're all set now to do what you want with your outputs.

      Here's a snippet:

      HiseSnippet 3061.3oc6bstbaabEFTRHwjN0woSZm9ysZ5DQESQKdQR9RcCknjbzXIKNhRwsiFU2k.KI2HPrH.KzkwwyzN8knOF8EnS6iPeTxaP64rK.I.Ekht3jn3g7GVD6YOW2y4reKVK0vWXwBBD9FYxs6odLiLejYySckcq2kxcM1XUiL+JysBcjbx1gRuPIogSXGfxJm5QCBX1FYxL4ywolI6TFpOe2WrB0g5ZwFLjgwWI3VrM483xAi1n1K3NNqSsY6x6kX1UqsgkvstvQDBl0jlya3QsNj1g8RJNsILM9RZPWiLetIsRE61Kt3idrsU0EJ831zkrsZU4wKvrKWsB6wLa6kpX2pcaiLevZ1bovuojJYAFYlZEg8oM6JN1UqfuhGva4vvGJYzDzrd30EN1nKhiZTuK2wtQb7JvvHycZLH5MoN58olaws48GePT79JBjAbjL.lYhzl2joLuRIMu4SXdivjxjvjlRaRehYSKetmb.Ezdtq4FtRleaJrNkzTzy0Xh+w8Le3CI61kGPBb4ddLIA9ZKJLMhvkTuqOOPJ75NS.YFU9A3pttLGxtr.4LDOewWyrjEHzinbGJX7DtKQ1kQ.IxdsLD7VN0g3y7D4xUW.1hqrXO5gr08gG5aa4ez7yWfTc94m8oYykCrnmCFBJFeValOCxxBHh1DF0pKYFHqQBwal+LnxNEReHdprURdUNcAR.smmCyu.o+TKPXRqhEKNKJ70Nh4eJIPD5ZS5IrCAqFjB4XpKnTAwWDJYDlSvwcAcmCjQfjzw2qdrv1hJ84mPdFYek9J1gI2A3g61QSI+zMgoQdE8HF3H.CTHLTZ5YKjKq9yUfsxWO1pb8Xq5zydvSyE4xau2tM1a2W+x81Bb0G8T05x5PoLg5Rn99zSIGykcITXDboJ.VKYBhkNAI.FiJg4wFjafB3UrYf4GFv.5PlVT1hP2zoGyMLfXARrEzJH.m+FRPKNXFjLz2UyzSHHEapjpaVg9Ejf.qG6CYQkNn.Y+xEHUveVs.YA7mKVfrzACbsQvK5Y5gBVkAqyNA4mEl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M4l7JIvKtIh.z3H08.fPog5C4oI298c18TbYMwOwrAWZ0cz13DivFgM2+gvFitcmeg4Zvo.rjCLvoLW+O9CyU4jT82Sq96ZhuYd0asWo7es4ntNgK3p49uW1qly6Re0baaIA0uqOr2imHHIXs+cSVO9tP1ePRssW.ace12nZhlb75Bp+HI8cew5fSNRdZRkg9pzhk6AsbjoRCl7htwuRWya7apac232OCJ1ScojYiswlb7p3Vy8HlC.BWYi+R.0caZniLdzz4xaIbEdcEtbqjKz6vj97NcX9Is8Q5PKKkTqCGLxmVaG.0AMYR6uq1lPxF0GhSrqYrnzU9BZG450uwTatDr.j7y2lzS9dcS5TKm2o++AJTo1OOV82KZ.BNxE0d1v.fASSEndUJvSvoIGQC7MfpEeYCgC0e3v7juqRam5RmKftzs67UrMCDlusajpk9a2F48MaP+oZwN08zAm9GNzVS0UyEeE23aDXBDYg944wmUnFXt1pG9evmHhkvmyDQrTLweTzw0DlW4aIv7P2YLLuwv7tIv7JOFl2XXdueAyq7XXdig4MFl26wv7l3hzwjuqf4U41xay6KFCyaLLuaFLuJig4MFl26Wv7pLFl2XXdig48dLLuotHcX9tBlW0aKuMuZig4MFl2MClW0wv7FCy68KXdUGCyaLLuwv7FeosmiN9jQpi6bizQDwxIeWikGhXkjuqwJCQrZR3qUGh3BIgutvPDWDe9ChHt3PDWBe9CiHtT+HROpku30V5e8LT+wwPMBjI3p9q1QVysvmIkN6uWF8.DWu1xJsnNCikutLV45xX0qKiKbcYbwqKiKccY7Qe+Lh.hWNTJ5o6VXXrUi0T+hIjIyZt3e8FTMNL9+EcceIB
      

      BONUS: I added a Preset Handler to be able to keep the routing setup when loading presets.
      (Thanks to @d-healey for his help on this matter)

      I'll make a pull request to add this to the docs.

      @Morphoice, @clevername27

      Edited: I completely forgot to add the Extra Definitions in the project's settings.

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      d.healeyD clevername27C 2 Replies Last reply Reply Quote 7
      • d.healeyD
        d.healey @Matt_SF
        last edited by

        @Matt_SF you can export a multi output plugin without changing the number of outputs HISE is using.

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

        Matt_SFM 1 Reply Last reply Reply Quote 0
        • Matt_SFM
          Matt_SF @d.healey
          last edited by

          @d-healey said in Multi Output Tutorial:

          @Matt_SF you can export a multi output plugin without changing the number of outputs HISE is using.

          Oh, I didn't know that was possible - I haven't even tried...!

          Develop branch
          Win10 & VS17 / Ventura & Xcode 14. 3

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

            @Matt_SF the outputs will be set dynamically in the daw when you load the plugin - most daws show a pop-up and ask how many outputs you want.

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

            Matt_SFM 2 Replies Last reply Reply Quote 0
            • Matt_SFM
              Matt_SF @d.healey
              last edited by

              @d-healey said in Multi Output Tutorial:

              @Matt_SF the outputs will be set dynamically in the daw when you load the plugin - most daws show a pop-up and ask how many outputs you want.

              Indeed. OK noted!
              ... Now half of my post is useless 😂

              Develop branch
              Win10 & VS17 / Ventura & Xcode 14. 3

              1 Reply Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @d.healey
                last edited by

                @d-healey Although I think that building the multi-out version of HISE allows to see what you're doing and debug your code easily.
                If you have your routing script already set up and working, you can take the dynamic way.

                Develop branch
                Win10 & VS17 / Ventura & Xcode 14. 3

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

                  @Matt_SF said in Multi Output Tutorial:

                  Although I think that building the multi-out version of HISE allows to see what you're doing and debug your code easily.

                  Yeah this is pretty much the only reason I ever built HISE as a plugin, but actually you get 99% of the way there in the standalone and you can test the output routing with a container.

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

                  Matt_SFM 1 Reply Last reply Reply Quote 0
                  • Matt_SFM
                    Matt_SF @d.healey
                    last edited by

                    @d-healey said in Multi Output Tutorial:

                    Yeah this is pretty much the only reason I ever built HISE as a plugin

                    You don't have to build the plugin version to 'access' the multi-out routing anymore.
                    The standalone version works just fine.

                    @d-healey said in Multi Output Tutorial:

                    you can test the output routing with a container.

                    I'll have to try that in the 'stereo' build, thanks!

                    Develop branch
                    Win10 & VS17 / Ventura & Xcode 14. 3

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

                      @Matt_SF said in Multi Output Tutorial:

                      I'll have to try that in the 'stereo' build, thanks!

                      It's the same as you're showing in your tutorial above, but you use another container instead of the master container.

                      201f587d-6715-4ef8-ab36-21626c6b8644-image.png

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

                      Matt_SFM 1 Reply Last reply Reply Quote 0
                      • Matt_SFM
                        Matt_SF @d.healey
                        last edited by

                        @d-healey Oh ok, I get it. Nice tip!

                        Develop branch
                        Win10 & VS17 / Ventura & Xcode 14. 3

                        1 Reply Last reply Reply Quote 0
                        • clevername27C
                          clevername27 @Matt_SF
                          last edited by

                          @Matt_SF My man. 💯

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

                          8

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          103.1k

                          Posts