HISE Logo Forum
    • Categories
    • Register
    • Login

    Question about UI Json data!

    Scheduled Pinned Locked Moved General Questions
    40 Posts 4 Posters 7.2k 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
      last edited by

      Well I tried opening an existing project and instant crash.

      So I created a new project, saved a blank preset, closed and reopened, loaded the preset and no crash.

      I then added a sampler with a single sample, closed and reloaded, no crash.

      I then added a script to the master container, the only line I put in the script is Content.makeFrontInterface(500, 200);. I closed and reloaded and instant crash.

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

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

        Hmm, I can't even load a preset with a single sine wave oscillator without a crash.

        I'll ask the JUCE guys what could be wrong there.

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

          I just tried a project with a single sine oscillator and it crashes for me too.

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

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

            Slider.setPropertiesFromJSON(); is giving me a function not found error

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

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

              It is and had always been Content.setPropertiesFromJSON("Slider", object) :)

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

                Aha, the API needs updating, it shows ScriptSlider.setPropertiesFromJSON( var jsonData)

                Using Content.setPropertiesFromJSON() doesn't produce an error but it doesn't seem to have any effect on the controls and they no longer show the property overridden by script message, which was displayed when using Slider.set()

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

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

                  Hmm,

                  1. Add a knob called Knob1.
                  2. Add this line: Content.setPropertiesFromJSON("Knob1", {"width": 200});
                  3. The Knob should get wider and the property is deactivated (even on Linux).
                  1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey
                    last edited by

                    You're right! I was using the variable of the component instead of using the component ID. Solved :)

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

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

                      I am using the ID instead of the variable almost every time I need to pass in an control as parameter to a function (and I would heavily recommend this paradigm for your own functions). The reason is to avoid reference counting cycles:

                      // If you would pass the variable instead of the ID:
                      CloseButton.set("parentComponent", parentAsVariable);
                      
                      // and later for some weird reason:
                      parentAsVariable.data.closeButton = CloseButton;
                      
                      // BOOM, Cycling reference & leaking
                      

                      BTW, the Linux crash is fixed now :)

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

                        Double clicking on sliders brings up an option to enter a value but I would like not to have this, is there a way to disable it? Also how does one restore a slider to its default value when this behavior is active?

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

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

                          I can't change the stepSize of panels in the interface designer. I can set it in the script but it doesn't seem to be working as expected.

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

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

                            So double right clicking seems to be the way to restore the default value now. But how can I disable the value input thing? Also I'd like to make use of the value pop-up but I don't want the value to appear on the slider (seems redundant to display it twice and it won't fit on a vertical slider very well), how can I achieve this? I'd also like to use different colours for the background for this pop that the slider uses.

                            How can I remove the X button from floating tiles?

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

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

                              Yes, I will add an option to remove the textbox of the slider. You seem to be the first person ever that is not using the sliders with a custom filmstrip :)

                              BTW, I was planning to add support for custom paint routines to sliders, which might solve most of the issues you have at once here (and allow even nicer things like displaying the current modulation value for a modulated parameter etc.). Currently you need to use a ScriptPanel and recreate 99% of the slider logic just if you want to customise the appearance.

                              The stepSize property of the ScriptPanel has no influence on the actual step size because this is solely determined by your implementation of the mouse callback where you calculate the value. If you eg. round it to integers, you'll basically have stepSize = 1 and so on. What this property does is to tell the host that the automation data has this step size, so you don't end up automating floating point values when you're control is actually a combobox type thing with discrete entries.

                              I've been running out of colourIds so I've reused the colours from the slider for the value popup, but that may end up looking weird in some scenarios. Another reason for custom paint routines, then you can use your own colours for the slider rendering and just use the native colour ids for the popup.

                              And the X in the floating panels only appear once in a year under spurious conditions that I wasn't able to reproduce yet, but they will be definitely deactivated in the compiled plugin otherwise people could just delete the whole interface by pressing on the wrong button :)
                              However if you are using an complex arrangement inside your floating tile using horizontal containers / tabs, the close buttons are intended and can be removed by setting the parent container to read only using the Dynamic property:

                              const var data = 
                              {
                                "Type": "VerticalTile",
                                "Dynamic": false, // set this to true to make the close buttons reappear
                                "Content": [
                                  {
                                    "Type": "PresetBrowser",
                                    "StyleData": {
                                    },
                                    "LayoutData": {
                                      "Size": -0.5,
                                    }
                                  },
                                  {
                                    "Type": "Keyboard",
                                    "LayoutData": {
                                      
                                      "Size": -0.5,
                                    }
                                  }
                                ]
                              };
                              
                              1 Reply Last reply Reply Quote 1
                              • d.healeyD
                                d.healey
                                last edited by

                                Thanks Christoph. It's just a single floating tile so I won't worry too much about the X. Custom paint routines for sliders would be good, currently I'm using native sliders for everything except bidirectional pan sliders.

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

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

                                  I noticed a problem with the double right-clicking to restore the slider to its default value. This doesn't work if the slider can be midi automated because the learn CC box pops up as soon as you try to double right-click which prevents the value being reset. Maybe a key modifier could be used to reset the slider to default - like CTRL+Click or something?

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

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

                                    Whats wrong with double left click?

                                    Edit: Scrolled up, got it ;)

                                    Ctrl Click is using fine mode, so thats not free.

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

                                    58

                                    Online

                                    1.7k

                                    Users

                                    11.7k

                                    Topics

                                    101.8k

                                    Posts