HISE Logo Forum
    • Categories
    • Register
    • Login

    only when plugin is visible?

    Scheduled Pinned Locked Moved General Questions
    49 Posts 5 Posters 1.1k 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.
    • d.healeyD
      d.healey @Morphoice
      last edited by

      @Morphoice Yes :)

      Set up the data property something like this - change the processor ID to your simple gain (or other volume module that you want to connect to). The important part is the ChannelIndexes which catches everyone out. This needs to be an array with the channels you're interested in. In this example it's [0,1] which is channels 1/2.

      {
        "ProcessorId": "masterGain",
        "Index": -1,
        "FollowWorkspace": false,
        "SegmentLedSize": 0.0,
        "UpDecayTime": 0.0,
        "DownDecayTime": 500.0,
        "UseSourceChannels": false,
        "SkewFactor": 0.2,
        "PaddingSize": 1.0,
        "ShowMaxPeak": true,
        "ChannelIndexes": [
          0,
          1
        ]
      }
      

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

      MorphoiceM 1 Reply Last reply Reply Quote 0
      • MorphoiceM
        Morphoice @d.healey
        last edited by

        @d-healey basically I'd just want to relay the meter from the sampler, I had gotten the value with

        
        var value = Synth.getChildSynth("Bass").getCurrentLevel(true);
        

        inside the paint routine, which was stupid. Id probably also have to sum them to mono as there is really no stereo information in the samplers. Single drum one-shots. But i figured with the layout of the plugin the visualisation helps to identify the correct slider as there isn't much space for a lot of labels.

        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

          @Morphoice I'll send you an example when I'm back home in a few hours

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

          MorphoiceM 1 Reply Last reply Reply Quote 0
          • MorphoiceM
            Morphoice @d.healey
            last edited by

            @d-healey preem! thanks

            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

              I'm using a sinewave gen in this example but will work with a sampler just the same.

              Peek 2024-12-01 17-40.gif

              HiseSnippet 1418.3oc2W8taaTDDeujbUXWnPqp.93JK9fSIjZ67uFppZRiiKQD2ZhSaAEEUs4t4rWxd6db25jXppDO.7XwC.OJ8MnL6d9huiXERs.p.+AGO+cmc142LS5Dq7fjDULwo79Ci.hyG51cnT2eq9LtjrSShyMbayRzPLMk0iFFwRR.ehiyrO1vvozbD6m27vGwDLoGLlEg7bE2C1kGx0i41YiukKDsX9v97vbZu7F63ojaoDpAX7LqaMRDy6XVO3ILiZy3R9FVRehycbqsxp.r1RA99rkVxe0UWc86s9xqWmETaY1Q0Wc8kar7ZMt2ZADmqssOWqh6pYZHAc5iT9C61WcpL8.dNOgej.LD0IcwSNkMYq9bgemrjSBg331YbpZ1zT0scay84myebJ6SrBnisHeRyYlKKjp+NDRN4Bo4RCoa510KlGoGKwDOW2cGI9BFvv2l7gRptjYt0rtaoPMj5ECYGCshQhysn5p0ps.E+Z96WtL99jnomvhosDJllK6sOW.0oOfl4fdfdKUXjRhDUqTPqJi8ffEjyFuX.yE6p7XhcUpi2T52B.QUT8B1uXBnufRnmLtE+yhwPOtoRs0.omlqjUq3GyNsMSGyOqCvNtMfBqr.MHSduEnpi9w4K+pxkLWIFFRH8hLLbt+HVm.wXAHRUtzcuK8wflp6CYrop.JSHrrhvCHgVMYPnkzDGfhdDKgiArX37kKEnhoUOixk1CwpOxsTlu9xGPOCOG7fx3b2GLVyEEfrmteVfzDuX1y4HDgzKVMP5WtTOSBJE9T0XHWCgojXFBkFfnt8LpB96AdZlrm.pxVftx7WvsB3DPbYdrwk3xCXGT6vEnrCpa+twgz6jkwLzKc3gom4qm+9YOETk7IJM7TYU6qQ4WWl9mEEDLQYlZnXkP.wSTroCS7kYXU4fvif3EvhZw.3bEQDUQX50tZvTuzR5bJpj6H45mFAinaoD9F3m42WDTSFgIve8rcZxzLCNeDOTuHHVyMgiSS3DryZJpujaSH4XsJxp6HvG1JWOpMUJNOOVhvwH3icK.uHmMtU7OrwvyI9kuaiQAPVOl+DjhbTurl1ktVVi+wkJFtyeqO6sE41vv92fe0x1dQmopi6qJSoUNOeriekulVoKWBzWfEPH7ShUQ3iR8JKXTbGrt6LTkuptkDyrB0ouPEebBN3.PAALQBXk0E5Eh2fcA+t7e1Hp1h0rBdVTSviMzTmjiaS74KO+Upct9IPWL78.rcuTBhjhGywvosXdXHZc1RVlcX99XRdzAWejiLkHsY1rXNti7p8lAFee.xkRsBoz532GV90jS49ZbPnqSeGBoOv60WanZfoRMbl9huFjKNp.GRo7GHLoy7StLyzGI.wIEFWXFIHS35g4m4+NLNq1kNN6pFh2zsCW60exw3LSHFQDz+Dw3nk.9H2sCBvVeiCv4ba88S6D+q9weizi+5tF3gckM6g+otSBtbIas86W0s1htxas8TbPvIv9wLYRjJofi6Bg78w1SI4YhPpVwvOsm40LO+sTr3IJ5MOrEdImnMcY5Aw1xhMCw4R5BkAyV7cXtqVK8hHhb5OgUxl68vVh+8.qdOh7KrHaorXrKOLR.aKwEQvwd1X7V3bt.1.gNiawB61JoJpuRx8x+puGfCq50ChyG6S7BsoViaSMlys2XOP.r7UvewF6hUdrXLOASYt3ceo9I9d84togK0fFo+2si8r++tiMtbrYAqzMlvYzOYPXw0GLysmwzrKktlgNsSoz2R7V7yHg0MzNiDVOS3+JmQHyKV8RuzclM0oefkCduk1+47R3RgHMsNwtGc92xPrK2K87J5pKXXio0vklVCWdZMbko0vUmVCWaZM7d+0FZFBs4.sJLEZRHs6rscebGmskLrJ2hHH+AH7WE7B
              

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

              1 Reply Last reply Reply Quote 0
              • DabDabD
                DabDab
                last edited by

                @d-healey How Can I change it to vertical . from bottom to Top. My Snippet only doing the opposite. How to invert it ?

                HiseSnippet 1428.3oc2Ws0S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CQNn8vN1Etzvt9ixMLbm85e5qxycdC6+3W+MKa6EcpxNtOuHkV5z3wlAk9ZZoVbIPeJlxf0aRLuAeH7JUwn3lXh1InJekmkDaYKTG+TU7gI3TC.EDxDIfUVKncDdC1BBZw+YinpyU0J3wcqC9r9lbiLbqiOYY4uT0S0OAZgv2Gv96RIHRxeLGBG2f4iPz5rErLaxBBvf7fC1afiLoEayrQwLbG3U6MCL9dOjKkZERod328K9Bxw7.MNEz04ywfWGf2ti1PUygPzvI5y9ZPN6rAbpjJnmvDNyNpxLPef.r1H27AyL.YBW2O6.+2YyutnP7ZtM4Z+NiGiSMFLhUPuOv3fo9ej6FggXutQ.bF2Fe+6mQ7YO9qjd7W10TdX2Wyd3eh63JWNmU198K5Jacuvqr8Hry+QvtwLYRWURNG2Bh36hsmRxxDKoZDC+zNlWyr7WWwhGqnWduF3kbr1zho6EaSKVKBGDoykFL84sIn2DtI3L+qaSv+CTrmaY0BCwXKdTWArgDW1.mzYw30wQagrdB8Pt4yk2VIUc6njb+rOz6.37o1sg3rXerWn0zZbioQbtwp6.BfkMo8KVcKLYiEiwIXBiEd+kWberuWelaJbolBP5em2sYtXuamel+6jF1S++6F13xvl8qRWXBGQ+vdQ42dvL1dJSutT5pF5zFkx.KwqveFHzyP6LPn2Pg+ibFQL+X0y7SWS1jy9AVN38VZ+GyKf6DhzTOhc04rukQXGum46m2Umwv4mTCWXRMbwI0vklTCqMoFt7jZ3se6FZFHsVOsJJszjP1t4F10wcb1PxvrbaEA4OwjfFP9
                

                Bollywood Music Producer and Trance Producer.

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

                  @DabDab you need to subtract from the height because y0 is the top of the component. I'll make an example in a little while

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

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

                    Here you go, this handles both vertical and horizontal

                    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cAqMgiwF4IMVJZuIDejR1yHaZ8MN4Pk1ILoUR1xUBG6w7w14pfImNty+Or1fQD+x2sVpCLrM1qU0RNryvYDEuzv4LiSG0nycsO6U4QWPC+GvuYfMWzYpXY+7RTZ4Qwildk+JZ41bAPeJlzfk3BLyAeHbJWUKXSLW6TTja5XHwgDAxSdpL5nXbNEfL7YXxogWanSHdC1F7Zy+YMqZyWyv3w81DbYCz4FYP2DexxhuTsQxGCsQ22EvIJBAl7m+XNBNoAyEcQiwpa.aw77vfb5A6jZHcZwNLSTLCZpUM2LPa68QTJ0vjRcvuOnzKHmv8T3bWaquFCdcAdmtJM0uaQHJ3T0YeMHmcZDNGT50OPGNyNbTuBQJCr1H2DI8TGQLWMH6JF+iMw7h5hW0tEW41cx93LSvGwJn2E9X5dFej8V99X6twN3r1M992MKUj83uRxweYac4gYCQyg+o1Spb4bVR7OunKI16Buj3ivl+GC6EwDw8jw4LbaHjuG1dJNKHVR0HB9oc0ulYw2PxhlHqWduF3kbh5zlo5GYRKVODmEoxkFT3718zYJ28b1+ys646AE64VOt3PerMOrW.rk.2uAmzY7wqgi17Y8CTCQymKuiTH60UJ3tYen2Ev4Sc5.QY88IdgVWovkzFib801EB.V1j1uXsswjMVDFmfoLV3729mJLw2qO2Nwco5BP56uMoK7+6lz3Nv5cpRVRBGK+v9g42XPOpdFc+sD5ZZ5jliBOCwqvOoLczzVoLcFx7ekyHj4FIelaxpw57zOvff2ag4m+WD2CDooNDy5xYeKCwtbOy0MuoNihKLsJVeZUbwoUwklVEWdZUbkoUwa+1UTODZ89JYXRoIgrSqsLqfaYskfgY4lJBxeAHCfHH.
                    

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

                    DabDabD 1 Reply Last reply Reply Quote 1
                    • DabDabD
                      DabDab @d.healey
                      last edited by

                      @d-healey Understood my mistakes.

                      Bollywood Music Producer and Trance Producer.

                      MorphoiceM 1 Reply Last reply Reply Quote 0
                      • MorphoiceM
                        Morphoice @DabDab
                        last edited by Morphoice

                        @d-healey Thanks Dan! The example works well, yet when I implement it into my plugin, I seem to be unable to assign the look and feel. I must have mistyped something and can't see the mistake. Bad night.

                        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                          @Morphoice said in only when plugin is visible?:

                          Thanks Dan!

                          Dave ;)

                          @Morphoice said in only when plugin is visible?:

                          I must have mistyped something and can't see the mistake.

                          Show me your code

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

                          MorphoiceM 2 Replies Last reply Reply Quote 0
                          • griffinboyG
                            griffinboy @Morphoice
                            last edited by

                            @Morphoice

                            I made a post about this where I posted a code snippet that will completely bypass a timer when the ui is closed

                            1 Reply Last reply Reply Quote 1
                            • MorphoiceM
                              Morphoice @d.healey
                              last edited by

                              @d-healey why am I saying Dan all the time? It'll take me a while to get that fixed in my head lol I apologize

                              const volumeMeters	 	= Content.getAllComponents("Meter");
                              // Meter1, Meter2 etc.
                              
                              const var laf_VolumeMeter = Content.createLocalLookAndFeel();
                              laf_VolumeMeter.registerFunction("drawMatrixPeakMeter", function(g, obj)
                              {
                              	var a = obj.area;
                              	var average;
                              
                              	// Get the average of all the peaks (sum the stereo basically)
                              	for (x in obj.peaks)
                              		average += x;
                              		
                              	average /= obj.peaks.length;
                              	
                              	// Draw the background
                              	g.setColour(obj.itemColour);
                              	g.fillRoundedRectangle(a, 5);
                              	
                              	// Draw the level
                              	g.setColour(obj.itemColour2);
                              	
                              	if (obj.isVertical)
                              		g.fillRoundedRectangle([a[0], a[3] - a[3] * average, a[2], a[3] * average], 5);
                              	else
                              		g.fillRoundedRectangle([a[0], a[1], a[2] * average, a[3]], 5);
                              });
                              
                              for (v in volumeMeters) {
                              	v.setLocalLookAndFeel(laf_VolumeMeter);
                              }
                              
                              

                              the Meter1..x floating tiles have these Data settings

                              {
                                "ProcessorId": "Hat",
                                "Index": -1,
                                "FollowWorkspace": false,
                                "SegmentLedSize": 0.0,
                                "UpDecayTime": 0.0,
                                "DownDecayTime": 500.0,
                                "UseSourceChannels": false,
                                "SkewFactor": 0.3,
                                "PaddingSize": 1.0,
                                "ShowMaxPeak": 1.0,
                                "ChannelIndexes": [
                                  0,
                                  1
                                ]
                              }
                              

                              They look unchanged and all meters react to all samplers, although every one has its own ProcessorID set to a specific sampler. sigh

                              https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                @d-healey Dave (practicing, to get that set in!), as the absolute guru in coding, how would you go about the following problem

                                Screenshot 2024-12-01 at 23.23.28.jpg

                                I want to use those columns to change the sample map as if the user changed the picked another eprom for the slot... I reckon buttons are not the best way here but panels instead? one klick should disable the others and load the map, I have no idea on how to store the sample-map name inside the button though, I can't use the displayed text and hardcoding separate arrays feels like there would be an easier way.... how would you approach this?

                                https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                  @Morphoice said in only when plugin is visible?:

                                  const volumeMeters = Content.getAllComponents("Meter");

                                  Have you checked that volumeMeters does contain the references to the floating tiles?

                                  @Morphoice said in only when plugin is visible?:

                                  I have no idea on how to store the sample-map name inside the button though

                                  Put the sample map names in an array. Use the button's index as the array index. So if button 0 is clicked you will get the first element of the array.

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

                                  MorphoiceM 1 Reply Last reply Reply Quote 1
                                  • MorphoiceM
                                    Morphoice @d.healey
                                    last edited by

                                    @d-healey said in only when plugin is visible?:

                                    Have you checked that volumeMeters does contain the references to the floating tiles?

                                    it does contain an array with 3 elements, which are the three meters in existence...

                                    https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                      @Morphoice Are you assigning laf to these controls anywhere else in your script already?

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

                                      MorphoiceM 3 Replies Last reply Reply Quote 0
                                      • MorphoiceM
                                        Morphoice @d.healey
                                        last edited by

                                        @d-healey you might be on to something there. I just took all the other laf into an extra script and when I comment out the include it seems to work, so there must be something interfering... I have to investigate

                                        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                                        1 Reply Last reply Reply Quote 0
                                        • MorphoiceM
                                          Morphoice @d.healey
                                          last edited by Morphoice

                                          @d-healey theres another for loop to assign laf to the volume sliders which seems to interfere as it uses v too

                                          for (v in volumeSliders) {
                                          	v.setLocalLookAndFeel(laf_VolumeSlider);
                                          }
                                          

                                          if I comment it out the meters work but my volume sliders have no laf
                                          changing the v to another variable doesnt help

                                          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                            @d-healey also super weird if I press pad1 meter1,2 and 3 moves, if I press pad2, meter 2 and 3 moves and if I press pad 3 only meter 3 moves.... although all are assign a separate synth. I can't make heads or tails of it right now.

                                            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                            30

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.4k

                                            Posts