HISE Logo Forum
    • Categories
    • Register
    • Login

    Old project won't open in latest build

    Scheduled Pinned Locked Moved Bug Reports
    17 Posts 2 Posters 2.6k 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

      Thanks, here's the project. I built it in 644 http://chilp.it/6b66582

      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

        Actually I have no idea why it didn't crash in the last build, but now it's fixed (it was actually a missing safe check that wasn't triggered in build 644 for some reason).

        I think the script warning has something to do with your framework script that is saved outside of the folder (I get this error message when I try to compile the script:

        onInit() - Line 1, column 1: File /Volumes/_HISE Development Framework v1.0/libraries/ui_library_v1.0.js not found

        (The onNoteOn error message is just a follow up - the line numbering is a bit off sometimes when using external files).

        BTW, I noticed you are using many functions in your framework. I strongly recommend you replace them with inline functions (see my blog post about scripting best practices).

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

          Thanks Christoph. Yes I've just started another library which makes use of inline functions. Am I correct in thinking that these only provide a benefit when used in the audio thread callbacks?

          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 for audio callbacks it's pretty mandatory, but there's no reason why you shouldn't use it elsewhere (the paint callback of Panels could also become a bottleneck if it is too complex).

            I made some performance measurements and the boost is pretty drastic. This is the execution time in milliseconds for 1.000.000 calls to the identity function function id(x){return x;}

            0_1478594079465_FunctionCalls.png

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

              For some of the GUI stuff I'm doing like mic mixer channels it's definitely beneficial for me to create classes which, as I understand it, won't benefit from inline functions - if they can be used within classes? But for most other things like round robins, legato, etc. I'm using inline functions and reg variables as much as possible. Is there a way in HISE to measure the performance of our scripts?

              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

                Do you need classes to sort your functions (like the ui.knob() methods) or do you want to access object properties via this? The latter could be also achieved by passing the object as parameter (this is how you could do object oriented stuff in C):

                inline function setInvisible(this)
                {
                   this.set("visible", false);
                };
                
                // Usage
                setInvisible(volumeSlider);
                

                If you just want to categorize the functions, I am thinking of adding a namespace keyword so that you can do stuff like this:

                namespace ui
                {
                    inline function knob(name, x, y)
                    {
                        //  [...]
                    }
                }
                
                // Usage
                ui.knob("name", 20, 20);
                

                The compiler can resolve the dot operator at compile time to the function pointer so there's no overhead compared to plain inline functions (unlike using functions from actual Javascript objects).

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

                  The organisational aspect of it is helpful, especially with things like the UI library, also having access to this is helpful, although not necessary in the case of my UI library. For my mixer channel library it's important that it's a class because I need to be able to create multiple instances of it - one for each mixer channel. The namespace keyword would definitely be useful for building libraries that are going to be using a lot of inline functions. Would it also support namespaced variables?

                  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, that could be possible (I have to think it through a little bit).

                    Why don't you do something like this with your channels:

                    inline function createMixerChannel(index)
                    {
                       local Panel = Content.addPanel("Channel"+index, index * 20, 0);
                       [...] // JSON stuff and callback definitions
                    
                       return Panel;
                    };
                    
                    var channels = [];
                    for(i = 0; i < channelAmount; ++i)
                    {
                        channels[i] = createMixerChannel(i);
                    }
                    1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey
                      last edited by

                      The channel class I've created is more than just the UI it also houses the mute, solo, purge, change volume, change pan, and change width functions. It makes it really easy to do something like channel1.solo(true, mixerObject); and this not only solos channel1 it also mutes all the other (non-soloed) channel. I'm not sure this sort of functionality could work as smoothly if they weren't part of an object. This sort of thing though will run in the message thread so I don't think it would be too much of a problem.

                      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

                        Using a combination of the techniques you've presented I think I've actually come up with a way to create my channel class with inline functions and it should be much more efficient (I need to do a little more testing though to be sure). The name spacing idea would definitely improve the categorisation of the functions though.

                        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

                          Great to hear. BTW, did you know you can define parent components (it will use the coordinate space of the parent and will be invisible when the parent is hidden)? I can imagine this concept could also be helpful for your channels:

                          HiseSnippet 801.3ocsU12SSCDF.+51ZBTcDw3Gfl8Wij4ncLdIRLBavzoxXwRHlXL3Q6M5EZuq45UvIguy9IP8t9BsCJHyDujkt64s6We5877LlQsQggTFP4IGMM.ATdpp0TB2suKDS.C2Cnrj5AvPNhomHp2z.XXHxAnnT8sRAJKVCDu94a5A8fDaTtH.3XJ1F8QrOlmK8a67Arm2.nC5HreAq6tyPaJoO0iFI3oppAH.ZeN7LzHnzrJpfKvnKCAJFpq0oM6byS+wtskqdsyV60trEvNhwPD9wB2AJpJ+VrTT22AyoLKNjiDwrZOpyTKW5kjji9XbH9TOjbiIvRvThXPeWrmy3rzVH.nTabdRrZRR7EpGfcv2HOOY9rXE54dTLcpTYVjpMCRl2GRCndNx.bO3oT.uZI3srpkMCGvy0HY64oRuG5RTBp7KE09TBWjNaGh3uCgOyk2rigwJaWWSS78KjqeAjoOFRPd5uVOyVniSrnlMheznkdmtq0Ru65qrs1pqp+k2ac3nDm9pVg3KXI.w3XT3.F0WZTd.tptltdiKwNb2FuRuyVcaEKvMFIgDSiMqqccZ7Ws3AjiYuHNmRlkyDYMaj7TbPlaH9MCnIp9qjdSDRPM.JuE1m5GPIh+HPL8c41XlF9IQDaNVfGkLhxQGRZth1UZKpcs1s0LYRYpjzwnddHVYZkEerGvsljH+SQrVh7jWDJyNw8rYukp83tkl8JbX.J0vaPOSjznbjKJMF0RLKWjcxGhBEvTxPBlmeb2sz.j90SVjjFPgo73RjkRKFR9R.vhRfETS2DmOJ1jCb2RLQgN0IxCxms5W1wLUgHWOS80PIKgX9zhcTmiVBFk1Rnz26GItKqNFyscKm2JkvqHQ9+l2zFr0U2exDjMOG1ZpC97+Z2z4.kOQi3XxYG.4L72EyRFE4aIFWYiDjPDkxgx4KUj2sR1aH2KyLVHhiQ1vmTklx8JoJMyTB7g1L5I1I2HksvWHVhfIR7fvEESjE60MytIJ41WLW4DaaYh3kBxK2iNysGqM2dzct8X841iMlaO1bt8XqGvC4P7ci3T+jxB.3OPOHq3M
                          
                          1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey
                            last edited by

                            That seems very useful, I can thing of several situations in which it would be helpful. 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 d.healey

                              I have another preset that won't open and crashes the latest build (github build). It's strange, the autosaves won't open either but I have a backup I made that does open.

                              http://www.filedropper.com/preset

                              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 load both patches with the latest version - but I don't have your external scripts, so maybe it is crashing the scripting engine there.

                                Does it crash on load or do you have to press a key?

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

                                  Aha! I just moved my external files and it loaded up no problem. It was crashing as soon as I opened the preset, no clicking on anything. So my next task is to narrow down which file is causing the crash and then which bit of code.

                                  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

                                  57

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  101.8k

                                  Posts