HISE Logo Forum
    • Categories
    • Register
    • Login

    HISE performance slowing down when using SVG project?

    Scheduled Pinned Locked Moved General Questions
    27 Posts 4 Posters 2.7k 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.
    • NatanN
      Natan
      last edited by Natan

      @RastaChess Thanks mate,
      Still no luck here,

      It's not the usual way i do SVG Painting, and I Stucked with this
      @d-healey Any hint?

      Edit:
      I Put the Painting inside the namespace Path, and It works just fine :)
      @d-healey Is this how It is supposed to be used?

      Can it be used out side the namespace ?

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @CyberGen
        last edited by ustk

        @RastaChess You have only one interface script. Other scripts are for the modules for instance, where you don't need any LAF customisation

        Link Preview Image
        HISE | Scripting | HISE Additions

        A summary of all additions made to standard Javascript

        favicon

        (docs.hise.audio)

        You can have included external scripts, but they are part of the same interface script, so they do not require any global variables. If in these included script you have namespaces (which I hope you have) you want to access variables, you do it this way:

        namespace CoolSpace
        {
            const var YOPLA = 47;
            reg youhou = 22;
        }
        
        // somewhere else in another namespace in interface script
        reg a = CoolSpace.youhou * CoolSpace.YOPLA;
        

        Can't help pressing F5 in the forum...

        CyberGenC 2 Replies Last reply Reply Quote 1
        • ustkU
          ustk @Natan
          last edited by ustk

          @Natan don't call it Path, but Paths or anything else. I reckon I had a conflict with the Hise APIs when using same name. Had this with FileSystem too....
          Also there's a difference between drawSVG ("base64SVGstring") and drawPath ([from, loaded, array, of, data]), so choose your style wisely because one cannot paint the other...

          Can't help pressing F5 in the forum...

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

            @RastaChess As utsk said you only have one interface so there is no need for paths in other scripts. But in general if you want to have the same code in two places you should use includes.

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

            1 Reply Last reply Reply Quote 0
            • CyberGenC
              CyberGen @ustk
              last edited by

              @ustk Thank you this great info.
              I had no knowledge of namespaces or includes 😊
              I was just getting the clutter out from the interface script. I can see how using globals could be a drag now. Thanks for the example. I'll start implementing these changes.

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

                @RastaChess You might find this useful - https://docs.hise.audio/scripting/scripting-in-hise/hise-script-coding-standards.html

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

                1 Reply Last reply Reply Quote 1
                • CyberGenC
                  CyberGen @ustk
                  last edited by

                  @ustk ok, I merged everything in the interface script using includes. Now HISE is working much faster and my project feels much lighter.

                  I just wanted to clarify, should I never ever use globals? or is it ok in some cases. For example:
                  I've been working on a glide script module. I need it to be on the fast lane. It has a glide rate knob and legato button that need to connect to the interface, which I have on deferred callbacks. Is it ok to use a couple of globals for something like this? or should I be looking at doing it some other way?

                  ustkU d.healeyD 2 Replies Last reply Reply Quote 0
                  • ustkU
                    ustk @CyberGen
                    last edited by ustk

                    @RastaChess Globals are made if you really need to share data or object between scripts, deferred or not.
                    In the case you just want to control your glide controls from interface, just create the same controls on the UI and connect them to the glide ones, either by script or from the property editor of the UI controls. This way you don't need globals (which wouldn't help you out in this case anyway...)

                    Can't help pressing F5 in the forum...

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

                      @RastaChess

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

                      1 Reply Last reply Reply Quote 1
                      • CyberGenC
                        CyberGen @ustk
                        last edited by

                        @ustk @d-healey

                        Done!

                        You mates are awesome!

                        Thank you.

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

                        25

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        105.7k

                        Posts