HISE Logo Forum
    • Categories
    • Register
    • Login

    Saving external file in standalone script editor

    Scheduled Pinned Locked Moved Feature Requests
    24 Posts 2 Posters 4.3k 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

      Yes, you can remove the close buttons for some panels in order to prevent accidentally destroying your precious workspace. Can you post the JSON, then I'll do some changes and add some comments?

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

        {
          "Type": "HorizontalTile",
          "StyleData": {
          },
          "LayoutData": {
            "ID": "anonymous",
            "Size": -0.5,
            "Folded": -1,
            "Visible": true,
            "ForceFoldButton": 0,
            "MinSize": -1
          },
          "ColourData": {
          },
          "Content": [
            {
              "Type": "VerticalTile",
              "StyleData": {
              },
              "LayoutData": {
                "ID": "anonymous",
                "Size": -0.78887251,
                "Folded": -1,
                "Visible": true,
                "ForceFoldButton": 0,
                "MinSize": -1
              },
              "ColourData": {
              },
              "Content": [
                {
                  "Type": "Tabs",
                  "StyleData": {
                  },
                  "LayoutData": {
                    "ID": "anonymous",
                    "Size": -0.203125,
                    "Folded": -1,
                    "Visible": true,
                    "ForceFoldButton": 0,
                    "MinSize": -1
                  },
                  "ColourData": {
                  },
                  "Content": [
                    {
                      "Type": "ApiCollection",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      }
                    },
                    {
                      "Type": "FileBrowser",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      }
                    },
                    {
                      "Type": "ModuleBrowser",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      }
                    }
                  ],
                  "CurrentTab": 0
                },
                {
                  "Type": "Tabs",
                  "StyleData": {
                  },
                  "LayoutData": {
                    "ID": "anonymous",
                    "Size": -1.1253906,
                    "Folded": -1,
                    "Visible": true,
                    "ForceFoldButton": 0,
                    "MinSize": -1
                  },
                  "ColourData": {
                  },
                  "Content": [
                    {
                      "Type": "ScriptEditor",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "ProcessorId": "",
                      "Index": -1
                    },
                    {
                      "Type": "ScriptEditor",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "ProcessorId": "",
                      "Index": -1
                    },
                    {
                      "Type": "ScriptEditor",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "ProcessorId": "",
                      "Index": -1
                    },
                    {
                      "Type": "ScriptEditor",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "ProcessorId": "",
                      "Index": -1
                    },
                    {
                      "Type": "ScriptEditor",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.5,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "ProcessorId": "",
                      "Index": -1
                    }
                  ],
                  "CurrentTab": 0
                }
              ]
            },
            {
              "Type": "VerticalTile",
              "StyleData": {
              },
              "LayoutData": {
                "ID": "anonymous",
                "Size": -0.21112749,
                "Folded": -1,
                "Visible": true,
                "ForceFoldButton": 0,
                "MinSize": -1
              },
              "ColourData": {
              },
              "Content": [
                {
                  "Type": "Console",
                  "StyleData": {
                  },
                  "LayoutData": {
                    "ID": "anonymous",
                    "Size": -0.82851562,
                    "Folded": 0,
                    "Visible": true,
                    "ForceFoldButton": 0,
                    "MinSize": -1
                  },
                  "ColourData": {
                  }
                }
              ]
            }
          ]
        }
        

        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've found a little bug with this, if I have my popout window on another desktop and I right-click in the API browser it will switch to the desktop with the main HISE interface on instead of opening the info where I clicked. I've only tested this on Windows.

          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

            I made some of the containers not Dynamic, which causes the close button to appear and give it a more "hardcoded" style. I also changed some size values to absolute values (eg. the left panel doesn't need to increase in size when the window gets bigger). I also added a "Global Script Connector", which sets the processor of all child panels (so you don't have to set each script editor explicitely.

            This is the updated JSON:

            {
                  "Type": "HorizontalTile",
                  "StyleData": {
                  },
                  "LayoutData": {
                    "ID": "anonymous",
                    "Size": -0.5,
                    "Folded": -1,
                    "Visible": true,
                    "ForceFoldButton": 0,
                    "MinSize": -1
                  },
                  "ColourData": {
                  },
                  "Dynamic": false,
                  "Content": [
                    {
                      "Type": "VerticalTile",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.97559917,
                        "Folded": -1,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      },
                      "Dynamic": false,
                      "Content": [
                        {
                          "Type": "Tabs",
                          "StyleData": {
                          },
                          "LayoutData": {
                            "ID": "anonymous",
                            "Size": 357,
                            "Folded": 0,
                            "Visible": true,
                            "ForceFoldButton": 0,
                            "MinSize": -1
                          },
                          "ColourData": {
                          },
                          "Dynamic": false,
                          "Content": [
                            {
                              "Type": "ApiCollection",
                              "StyleData": {
                              },
                              "LayoutData": {
                                "ID": "anonymous",
                                "Size": -0.5,
                                "Folded": 0,
                                "Visible": true,
                                "ForceFoldButton": 0,
                                "MinSize": -1
                              },
                              "ColourData": {
                              }
                            },
                            {
                              "Type": "FileBrowser",
                              "StyleData": {
                              },
                              "LayoutData": {
                                "ID": "anonymous",
                                "Size": -0.5,
                                "Folded": 0,
                                "Visible": true,
                                "ForceFoldButton": 0,
                                "MinSize": -1
                              },
                              "ColourData": {
                              }
                            },
                            {
                              "Type": "ModuleBrowser",
                              "StyleData": {
                              },
                              "LayoutData": {
                                "ID": "anonymous",
                                "Size": -0.5,
                                "Folded": 0,
                                "Visible": true,
                                "ForceFoldButton": 0,
                                "MinSize": -1
                              },
                              "ColourData": {
                              }
                            }
                          ],
                          "CurrentTab": 2
                        },
                        {
                          "Type": "HorizontalTile",
                          "StyleData": {
                          },
                          "LayoutData": {
                            "ID": "anonymous",
                            "Size": -0.58047337,
                            "Folded": -1,
                            "Visible": true,
                            "ForceFoldButton": 0,
                            "MinSize": -1
                          },
                          "ColourData": {
                          },
                          "Dynamic": false,
                          "Content": [
                            {
                              "Type": "GlobalConnectorJavascriptProcessor",
                              "StyleData": {
                              },
                              "LayoutData": {
                                "ID": "anonymous",
                                "Size": 18,
                                "Folded": 0,
                                "Visible": true,
                                "ForceFoldButton": 0,
                                "MinSize": -1
                              },
                              "ColourData": {
                              },
                              "ProcessorId": "",
                              "Index": -1
                            },
                            {
                              "Type": "Tabs",
                              "StyleData": {
                              },
                              "LayoutData": {
                                "ID": "anonymous",
                                "Size": -0.5,
                                "Folded": -1,
                                "Visible": true,
                                "ForceFoldButton": 0,
                                "MinSize": -1
                              },
                              "ColourData": {
                              },
                              "Content": [
                                {
                                  "Type": "ScriptEditor",
                                  "StyleData": {
                                  },
                                  "LayoutData": {
                                    "ID": "anonymous",
                                    "Size": -0.5,
                                    "Folded": 0,
                                    "Visible": true,
                                    "ForceFoldButton": 0,
                                    "MinSize": -1
                                  },
                                  "ColourData": {
                                  },
                                  "ProcessorId": "",
                                  "Index": -1
                                },
                                {
                                  "Type": "ScriptEditor",
                                  "StyleData": {
                                  },
                                  "LayoutData": {
                                    "ID": "anonymous",
                                    "Size": -0.5,
                                    "Folded": 0,
                                    "Visible": true,
                                    "ForceFoldButton": 0,
                                    "MinSize": -1
                                  },
                                  "ColourData": {
                                  },
                                  "ProcessorId": "",
                                  "Index": -1
                                },
                                {
                                  "Type": "ScriptEditor",
                                  "StyleData": {
                                  },
                                  "LayoutData": {
                                    "ID": "anonymous",
                                    "Size": -0.5,
                                    "Folded": 0,
                                    "Visible": true,
                                    "ForceFoldButton": 0,
                                    "MinSize": -1
                                  },
                                  "ColourData": {
                                  },
                                  "ProcessorId": "",
                                  "Index": -1
                                },
                                {
                                  "Type": "ScriptEditor",
                                  "StyleData": {
                                  },
                                  "LayoutData": {
                                    "ID": "anonymous",
                                    "Size": -0.5,
                                    "Folded": 0,
                                    "Visible": true,
                                    "ForceFoldButton": 0,
                                    "MinSize": -1
                                  },
                                  "ColourData": {
                                  },
                                  "ProcessorId": "",
                                  "Index": -1
                                }
                              ],
                              "CurrentTab": 0
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "Type": "Console",
                      "StyleData": {
                      },
                      "LayoutData": {
                        "ID": "anonymous",
                        "Size": -0.31327334,
                        "Folded": 0,
                        "Visible": true,
                        "ForceFoldButton": 0,
                        "MinSize": -1
                      },
                      "ColourData": {
                      }
                    }
                  ]
                }
            
            1 Reply Last reply Reply Quote 1
            • d.healeyD
              d.healey
              last edited by

              That's great Christoph, thanks!

              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

                When I add a MIDI processor and use connect to an external script, any changes I make to the script within HISE don't seem to be written to the external file.

                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

                  Ah, nice catch! Connecting a script to a MIDI processor is a read-only connection (that's why the script editor will be hidden in the main panel). However, it's still fully accessible in the Scripting workspace, but it will not write to the file because of the "read-onlyness".

                  It has to be read only in order to make sure that multiple scripts that use the same external file have the same state.

                  I "fixed" it by removing connected script processors from the editor drop down - not sure if this is a satifying answer for you though :)

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

                    Well it solves the problem :) however it creates another question for me. What if I want to edit the file in the HISE editor? I'm trying to remove the need for an external text editor and do everything in HISE.

                    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

                      Well, I added this feature for scripts that are somewhat "finished" and just need to be reused (so as long as you're working on a script, it's recommended to not connect it to an external file). However if you want to make changes to this script - nobody's perfect :), you can:

                      1. disconnect the processor (which will load the script's content back into the processor)
                      2. change it until it works
                      3. Save the script as file (and overwrite the old file).
                      4. Connect it back to the overwritten file
                      5. Recompile all scripts (Shift + F5) so that the changes will be applied to all other instances.
                      1 Reply Last reply Reply Quote 1
                      • d.healeyD
                        d.healey
                        last edited by

                        Cool, that seems pretty straightforward

                        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

                        31

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.9k

                        Posts