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.
    • Christoph HartC
      Christoph Hart
      last edited by

      Alright, here we go:

      Link Preview Image
      File not found · christophhart/hise_documentation

      The markdown files for the online documentation. Contribute to christophhart/hise_documentation development by creating an account on GitHub.

      favicon

      GitHub (github.com)

      I tried to cover all new features as well as an in-depth explanation of the behind-the scenes model. Let me know if something's unclear or missing.

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

        Thanks Christoph. I've had a read through the whole document and will play around with it tomorrow/today. A couple of things come to mind though. Since there is only one UI JSON per script is it still possible to split the interface between multiple scripts? Now that the UI stuff is stored as an XML sub element is it possible to have the preset browser restore the controls for scripts other than the front interface?

        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

          For the replace add widget with get component function to work the widget variable and ID must be the same otherwise this happens:
          0_1513515071733_Screenshot from 2017-12-17 12-46-32.png

          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

            Thanks, fixed.

            RE multiple scripts, I thought you were talking about including external script files, which of course is still possible. However I think I removed the support for multiple interface scripts long before the rewrite so there's nothing new on that front.

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

              How would one go about this? Previously I would have one file for my mixer GUI and another file for my articulation editor GUI and then a master script where the two external files were imported. All of the control declarations and actions were in the external scripts. I'm not sure how I could build the two external files now using the interface designer. Before I would create all my controls in the script with addControl but that's no longer the best method.

              I'm thinking that all GUI controls are going to have to be created in the main script and then I can use external scripts to make use of the controls with getComponent.

              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

                Panel bgColour property doesn't appear to do anything

                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

                  Yes, bgColour is unnecessary, because it draws a gradient from itemColour to itemColour2. This has always been like this.

                  And importing files using include("Script.js"); is still working. Actually using external files does not change anything here, it's just as if you divide your onInit callback into multiple parts (they get reassembled before compilation anyway). So the same rules for migrating also apply to external files.

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

                    Ok cool, that's good to know. Clicking show plugin preview isn't working for me, it's asking me to select a preset size to build an interface but I already have a script with this line Content.makeFrontInterface(650, 372); is there something I've missed?

                    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

                      Floating tile keyboard doesn't appear to be working. I've added a floating tile and I'm using this code

                      const var fltKeyboard = Content.getComponent("fltKeyboard");
                      fltKeyboard.setContentData({"Type":"Keyboard", "LayoutData":{}, "LowKey":24});
                      

                      but it's just showing up as a blank panel

                      Something else that's strange, I have 3 controls on my GUI - all added through the point and click method, but only one is showing up in the UI JSON. The two that arne't showing up are child components of the one that is there if that makes a difference?

                      Update: I got the keyboard to show up by making it not a child component (still doesn't show in the JSON though) is this intentional behaviour?

                      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

                        Ah, now I understand what's the problem. Just forget about the UI JSON Data that can be shown in the code editor, I'll remove this soon in order to avoid this confusion in the future. This is a misfortunate attempt to expose the raw data to the user but doesn't work at all with nested components, breaks up the connection between the data model and the interface and does all kinds of other stupid things. Actually I forgot it's there (I implemented it at the beginning of the redesign and forgot about it later on).

                        In a normal scenario you should not need to access this data directly, and if you do it, the JSON popup editor is the way to go (it's still not ideal because you loose every undo history, but as last resort OK).

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

                          Aha that explains 99% of my confusion :)

                          A few more things I noticed:
                          When opening a .hip each module is folded up now, could we have a context menu for each module to unfold/fold it?
                          Holding Alt while dragging the currently selected control on the canvas doesn't appear to duplicate it.
                          Ctrl+Z doesn't undo a canvas action - Linux strikes again I think because CTRL+SHIFT+Z works
                          Copying properties from a control and pasting them onto another worked great, but then I created another control and hit paste again (didn't copy again), result was that HISE instantly closed.

                          Is the best way to add controls in a loop still to use Content.addControl();?

                          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

                            Oops, you're right, something broke the restoring of the fold states. I'll investigate.

                            Have you tried the "Windows" key for duplicating? (I assume you're still using a Windows keyboard on Linux)? Sometimes the modifier keys get a bit confused.

                            However I need to go into Linux now anyway because I migrated to JUCE 5, then I'll check that everything works there as expected.

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

                              I just tried the Windows key but no luck there

                              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 currently compiling the Linux version of HISE, then I'll check what's the key there :)

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

                                  Ah now I see, these keys somehow interrupt the dragging operation because they do some OS specific functions. That's too bad, not sure how to fix this and the only working modifiers (Shift / Ctrl are already used).

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

                                    Solved it. Just press Ctrl+D and it will duplicate the selection to the current position. No need to hack around the modifier keys...

                                    Funny story: this is nothing new, but I forgot about it because the shortcut was broke like the rest...

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

                                      Hey David, can you check the latest version on Linux (it's on the juce_5_migration branch? HISE crashes when loading the simplest project, but I suspect it is something stupid going on in my VirtualBox.

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

                                        I'll build it now

                                        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 seems to crash at a memory copy operation which might be caused by some missing SSE flags that the virtual box can't set because it has to add a CPU emulation layer (long shot, I know).

                                          1 Reply Last reply Reply Quote 0
                                          • 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
                                            • First post
                                              Last post

                                            51

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.8k

                                            Posts