HISE Logo Forum
    • Categories
    • Register
    • Login

    Possible to communicate between plugins?

    Scheduled Pinned Locked Moved General Questions
    32 Posts 7 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.
    • ?
      A Former User
      last edited by A Former User

      Guys sorry about my ignorance.

      What are the use cases of the communication between the plugins?
      What does this feature stand for?

      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @A Former User
        last edited by

        @harris-rosendahl in my case I wan't to send midi information from a multichannel arpeggiator (which will not work in some daws), to several "receiver! plugins to control multi instruments

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

        lalalandsynthL 1 Reply Last reply Reply Quote 0
        • lalalandsynthL
          lalalandsynth @ulrik
          last edited by

          @ulrik Could I for example control a gain module on track 2, and having my main control module on track 1?

          https://lalalandaudio.com/

          https://lalalandsynth.com/

          https://www.facebook.com/lalalandsynth

          https://www.facebook.com/lalalandsynth

          Christoph HartC ulrikU 2 Replies Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @lalalandsynth
            last edited by

            @lalalandsynth Be careful about "persistent" states in conjunction with OSC, this is one of the main drawbacks I found in this protocol because restoring these settings from a DAW project will not restore the values (especially because you can't guarantee that the gain module 2 exists already when the gain module 1 is created and restored).

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

              @lalalandsynth
              If I understand you right, yes

              In you main plugin

              const var rm = Engine.getGlobalRoutingManager();
              
              rm.connectToOSC({
              	"SourcePort": 6666,
              	"TargetPort": 6667,
              	"Domain": "/receiver"
              }, function(printError)
              {
              	Console.print(printError);
              });
              //     In you gain callback
              inline function onGainControl(component, value)
              {
                    rm.sendOSCMessage("/gain", value);
              }
              
              Content.getComponent("Gain").setControlCallback(onGainControl);
              

              In you receiver plugin

              const var rm = Engine.getGlobalRoutingManager();
              
              rm.connectToOSC({
              	"SourcePort": 6667, 
              	"TargetPort": 6666, 
              	"Domain": "/receiver"
              }, function(printError)
              {
              	Console.print(printError);
              });
              
              
              inline function OSCCallback(id, value)
              {
              	Track2Gain.setValue(value);
                      Track2Gain.changed();
              };
              
              rm.addOSCCallback("/gain", OSCCallback);
              

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

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

                @Christoph-Hart while searching the juice files for a solution to the "locked port" issue, I found this:
                taken from juice_OSCReceiver.h

                /** Use this struct as the template parameter for Listener and
                        ListenerWithOSCAddress to receive incoming OSC data immediately after it
                        arrives, called directly on the network thread that listens to incoming
                        OSC traffic.
                        This type can be used by OSC callbacks that don't do much, but are
                        realtime-critical, for example, setting real-time audio parameters.
                    */
                    struct JUCE_API  RealtimeCallback {};
                

                If this was implemented in Hise, would it be able to control midi messages accurate, in time?

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

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

                  @ulrik I'm using the Realtime callback already (unless you specifically tell the OSC listener to be asynchronous).

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

                    @Christoph-Hart Great!

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

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

                      @ulrik I managed to have several listeners plugins, by forwarding the not consumed data to a new port it works.

                      The downside is that if I want to listen to ch 4, I need to have ch 1 - 3 also up and running

                      const var rm = Engine.getGlobalRoutingManager();
                      
                      inline function onChannelKnobControl(component, value)
                      {
                      	rm.connectToOSC({
                      		"SourcePort": 6666+value, // incoming port
                      		"TargetPort": 6667+value, // sending port
                      		"Domain": "/ostarp"
                      	}, function(error)
                      	{
                      		Console.print(error);
                      	});
                      };
                      
                      Content.getComponent("ChannelKnob").setControlCallback(onChannelKnobControl);
                      
                      
                      inline function OSCCallback(id, value)
                      {
                      	local ch = ChannelKnob.getValue();
                      	
                      	if (value[0] == ch)
                      	{
                      		local ev = Synth.addNoteOn(value[0], value[1], value[2], 0);
                      		Synth.noteOffDelayedByEventId(ev, value[3]);
                      		
                      		LogPanel.setValue(value);
                      		LogPanel.repaint();
                      	}
                      	else
                      		rm.sendOSCMessage(subdomains[ch-1], value);
                      };
                      
                      for (i = 0; i < 4; i++)
                      	rm.addOSCCallback(subdomains[i], OSCCallback);
                      

                      ostarpwlisteners.gif

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

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

                        @Christoph-Hart is there a way, in Hise, to count how many instances of the same plugin is loaded in a daw?

                        The above solution is not optimal because the user will not be able to run more than 1 instance of the "mother plug" before it's get messy.

                        I'm thinking maybe the second "mother plug" could sense if there is another loaded and automatically change the domain port and the listeners have a way to change the domain port (via the user)?

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

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

                          @Christoph-Hart
                          I still haven't found a way for instance number 2, 3 etc, to connect to the target port (if already 1 instance is communicating with it).

                          Do you have any suggestions what I, (or you πŸ˜‰ ) could do to make it work?

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

                          1 Reply Last reply Reply Quote 0
                          • Sac TenS
                            Sac Ten
                            last edited by

                            Here is a way to communicate between plugins,
                            without OSC messages. I found out before I saw this post. ;)

                            Animation.gif

                            HiseSnippet 1092.3ocsV01aaaCDlJILqRacXAX+.zLFJjw5br6KqCHHXNwwtHnMoFSYA6SsiVhxlHTjBRzIwaH.6m79Gjcjh1RNyIcyXUeP.7t6g2yc73cbXt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beqBnVZo4N5YKhBlZV82E7+1bw+sTbG7PlJZxp43FqfiPMymBNZeMwiw8SRnQpJBtEdvu9o4oCneVNUAcGNg.MIf5.7oSSCgpxHJ3cgfx02kc1Peqqbca8ZcFP2h2r.Jdu0pridsiUYm4JQojnb4GhJuqpeuxiLR.NILOUyEehds+hKoXLLVDkBOc5CQQ5v+6gFAqFyyVCLOeMv7h0.yKWCL+vZf4UqAle7Awne05ASUxzxqCffg8MMKcb5KHPkkoJD82PJ0I1n
                            

                            it works by storing values ​​in an external file

                            1 Reply Last reply Reply Quote 1
                            • Sac TenS
                              Sac Ten
                              last edited by

                              I also tried it by making a little messenger:grinning_squinting_face: :grinning_squinting_face: :grinning_squinting_face: :

                              Animation.gif

                              HiseSnippet 1238.3ocsW8+SaaDE+LvwvtsRCo8GfWzTkifERJztpg5Vf.LgJPyVZQ8GPqxXeN4D12kYeAZ5DR6O48e.68rchuDr6WhV4m3du2myedet2cuW5FK8XIIxXhg4qGOjQLdHs2XgZPmAtbA43CHFqQ6FyRXJx9iG5ljv7IFFK+anWCyUHo+8u+59tgtBOVgIB4bI2icBOhqJr1s8K4ggG45ydMORK5cZermTzQFJGALYYZSxPWuqb6yNyECaIJwX0C84JYbOkqhkPLVYeo+3dCj2Hxh+bdB+xPFtnEoGrQYlORF5iLFsR5LfG52cRFmPfcoaQ9ubV9+czS497o1KzguM0gcABc8vXoYo2xyPuV5zqoF8JgRFZTZkLJsNsmWLenpvCxmGPOVnXwAtfrqSkrXIK8RJsiDhPnZD4dE6nXXwTDNa2r4l1OqYy56ZYARehx9Z2X687gi5Dl8Krm.sOS0QFMTJfEN0x8WCPU.BOipDA5b1vyDpJAj4dVHmyY2TI.zIFtEFYWW0.Hxi3grdiSTrHL3zhfXGMi6Mb3AtJW.EBBcb.Ol4Ae3w.5Z0JrKxRt7DG2MmZJ16U0xwBFNE7.kpZ.g8lwOT3ORzGs1HhkTKmfAfAjjoIAd3ieDmoeoMzwl+ItFRvWCex7OvVaA5PhLj0XXLGD.Mr0ZnxXlU5c3FIJ2XEdSK1oYiVfcTqZjLMG1D1v53NlmdVbQHWvrCFI7TbovVJx8fRerLzwahtuIbvDNhU25usL0zoTi6ZYVNEguk4Wn.b6tVehRQLexoWG2vvKgGNblm2njr0V8XB+RRwrJtORFZZYxCbRWY+8u.OEpaYB4sYPiah4JVOEjk8cvRc8BjMp8y101Ha20sipfYt46cVXda0o7jqFkmwyjFXBm9mVddlTwdkvI8Hy5VK64cEDTpu7cLDJhJycV4UpmYDImfFgRW+8RxUm50se7i0utTdP4J6LWqlOHT+ldoXC373h3KDWHpsQAJLj6UrOAStLWVV5HFEcIKVu5FCDdJd122oU+9td6GuryQs.khiEb0qFxDU0Thje3C+2aNFekBaJjaChaHKVwQJXb.6ZnCaVKBS5ArjqTxg.SmVw.MyUodeTdCjSbujER3PahUon5PdeQK3en83oK9meu8Mbe0fBC+U6ALd+AEsxaOp8k8mzv1b06t6tGhlC.d1i+AsV6a1NZTnhiW5.NujaHuuHJkblTfumvBTD77IsKOCDY2TczXYhVdXUUdXRyunqkJsYZoBjWywy0QqZzXUZXAG9FZqmr8NOsj7vYNIg7myKIvTL5b9AUw40nY0RUo9s+vmV8Yelp+y+RTec1uV0UNoyjUA2I+Rox88I11sq5HXU5aRXwvrh2aNHXBLo+nPW0rikgyhl6.tKOyrP37NhDtZr9rp+uMq1mKEWm1kq7FTNGWpDNB23+Zvw7IbeD8vf.XXmBBtB8n290YbVxeHGofGsO0Ed6FpYnmMJpGTb3wfutPvBw2RMVBe0KacSbMp.Xy5zEPMzc4NagqMxc1ZhSRjqWr7cdYufiyPuVpEfShze9fI8TbscKR5q5.NZyFMIQv37uyyCS+eDdHtbLOYAvr8BfYmE.ySW.LOaAv7SK.lm+Qwf+Rp8FojQYWG.CcOLsUmgwgBrAPZUH4+vM5XTA
                              
                              d.healeyD ulrikU 2 Replies Last reply Reply Quote 3
                              • d.healeyD
                                d.healey @Sac Ten
                                last edited by

                                @Sac-Ten

                                I also tried it by making a little messenger

                                You could probably use the server calls to make it work over the internet :p

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

                                Sac TenS 1 Reply Last reply Reply Quote 1
                                • Sac TenS
                                  Sac Ten @d.healey
                                  last edited by

                                  @d-healey for live support directly in the plugin:grinning_squinting_face:

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

                                    @Sac-Ten πŸ˜‚

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

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

                                    45

                                    Online

                                    1.7k

                                    Users

                                    11.7k

                                    Topics

                                    101.8k

                                    Posts