HISE Logo Forum
    • Categories
    • Register
    • Login

    HiseScript Questions

    Scheduled Pinned Locked Moved General Questions
    13 Posts 8 Posters 969 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.
    • ?
      A Former User @Casmat
      last edited by

      @Casmat Welcome!

      I can only give my own perspective on learning HISE. I never learned Javascript and had only limited KSP knowledge before starting, the most effective way to actually understand everything and "think" about code functionality, is to just start making and breaking things.

      Since you're planning a big project (player plugin), you'll probably want to break it into smaller pieces and handle them one at a time. Start with a very basic instrument, add some modules like a Sampler, ADSR and maybe an effect. You don't need any scripting for this part.

      Once you have the most basic of projects, try adding an interface and connecting some front-end controls to your Modules. This can also be done without scripting. Once you have a handle on the basics (adding modules, adding interface elements, connecting the two & exporting the plugin(s)), you can start scripting.

      First, I recommend disconnecting the interface elements from the Modules, then manually connecting them via scripting. You can do this by right clicking the Module -> Create Script Reference, and right-clicking the Interface Element -> Create Custom Callback. Your first callback might look something like this:

      //
      // Create Interface (width and height)
      
      Content.makeFrontInterface(600, 600);
      
      //
      // Right Click Sampler Module -> Create Generic Script Reference:
      
      const var Sampler1 = Synth.getChildSynth("Sampler1");
      
      // add a button to the interface via Right Click - Add New Button
      // Our Button Function, attained via right click -> Create Custom Callback
      
      inline function onButton_SamplerBypassControl(component, value)
      {
      	Sampler1.setBypassed(1-value); 
      	/*	
      	Sampler1 is our sampler module, as referenced above
      	we call the class method, setBypassed(bool) where bool = true or false
      	instead of manually setting true or false, we use "value" which is given to us
      	by our Button Callback
      	
      	note: the 1-value is to invert the button to better match our interface
      	*/
      };
      
      Content.getComponent("Button_SamplerBypass").setControlCallback(onButton_SamplerBypassControl);
      
      

      You can also share and import HISE Snippets, which can be very handy for sending barebones projects for debugging or testing to other HISE users.

      HiseSnippet 1463.3ocyX08aaaCDWJNJqVqqXsnXXuL.hf8fSQRrc+bnEa0INeffUmXXmVzmV.sDsMQjHE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L7lo2+6F0ZRNX9sVVeX2YXtf9gHVUdXgdpX5APRqTGZcqUljplTzMuFSPZbkSPVTHdamtT30y7w3JyAiPF3SAFSm69MN6ObHwSkCvUcN30K6P1E+5+gjq+NN8UPi9PnuVZsfACtNYce+XrxSzBuxSWAIfi86S+8Bh8tV6FCwHQYt+YKyUsSHOlU5tRQdORDL.CRyEz4Fs506PAONZVsd+yMEEmJfNfPnn3AmvHPrVUzGaK3R4PvcL1RV7ntwhQ5XUNmdDnOtrLuiiCg7MiQB.kcrsAVuTRz4WpWGrRPeSQoM2RiSwlbLrGngt4Lz2eF5GLC8Cmg9QyP+3YneRNcR.sCNRWYn2Ccl9re0h0mELPWL3xEjbW5noFOgS41GEDcZL2fqBa8NmcIW6S05sqtXu79WlW7keuzRaiWMCi8o5T09vdIAvfHCFuCL4YHNNPkwsb+hNbFOZLmQ8J+h.pvGMhHJh845P6.6m5cdNm61pGIffkEdR+isdArNJVT9g90JVb8+kIyMe88NIvEoaxg9uj29rVlckyCqrPyC+ni2ke13m0P2sRmRhfaWn9BOOeSGSecjdL7+WPsGOV+KnxFw4.yA6Cy98HEmFthdBaBcCMsFP8ILeCweCeROrY1nS8gMyNzxKyTfuk9cydz1UHL8nCyZdAvP4fhkzRXCCMjfwaeVPYH1SvOyK4mKnw5MLb.TxL+6dp5zQSiZl8CCbbZrcCqPXV0Ydd5GBaAQ34qy8WBcdvRnyCWBcdzRnyiWBcdxRnyOck5nWSXmXEOLoIIvn69IEV16Osvph0+.vhoeNM
      

      Copy the above snippet, then hit File -> Import HISE Snippet to load it, you'll open a project that has a Sampler and a button on the interface, as well as the above code. Click the button to see the Sampler turning on and off.

      Finally, as I mentioned above, you'll want to break stuff to understand what's going on. You won't get very far just following courses or reading forum posts, you need to actually get in and write some code, watch it break, then try and figure out why it broke. This takes time, but it's like learning a language: immersion is key.

      David Healey's Patreon and course are great tools for specific examples as well, and he covers more advanced topics like Expansions, which you'll likely need if you're developing a Player Plugin.

      I hope this helps.

      1 Reply Last reply Reply Quote 1
      • ?
        A Former User
        last edited by

        dammit David's just too fast

        1 Reply Last reply Reply Quote 3
        • CasmatC
          Casmat
          last edited by

          Wow! Can’t believe y’all reply so fast! I’ll look into more detail on everything and I’ll post if I have questions! Definitely going to work on some test projects to get a hang, and then I’ll start building the instrument in multiple sections! Thanks all and if anyone has more info, it can’t hurt to add it!

          i make music

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

            @Casmat Welcome to the forum.

            In addition to what the others said, I would suggest to not worry too much about the player plugin at the moment (it's just a distribution format) and start building your libraries on after another.

            Also David forget to mention his great scripting video:

            which contains basically every concept needed for starting out scripting so at this point I wouldn't recommend a vanilla Javascript detour anymore.

            1 Reply Last reply Reply Quote 1
            • DanHD
              DanH @Casmat
              last edited by

              @Casmat keep searching the forum for threads on issues that you encounter. There’s so many examples of code and, even better, snippets that will help you see what’s going on. And if you still can’t find the answer or an example post a new thread on here. As you can see already the users on the Hise forum are unbelievably helpful.

              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
              https://dhplugins.com/ | https://dcbreaks.com/
              London, UK

              1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @Casmat
                last edited by clevername27

                @Casmat Sub to @d-healey's Patreon.

                S 1 Reply Last reply Reply Quote 0
                • S
                  Sawer @clevername27
                  last edited by Sawer

                  Hello everyone !

                  I just wanted to find a clean way to deal with multiple buttons and sliders.

                  HiseSnippet 1313.3ocuX0saaaCElJIpMVscnAXXWKTfA3NjkXaIs1hfg3FmjAitjZT2Fr6BnknsIhDofDUZ7FJ1dl1SvdD1iPeD1av1gT9GZGY4jzt5KBBOG9Q88cHEOmi5jv8Ioo7DjQk2NJlfLdnY2QLwvVCwTFp8gHisLeW6yawCHsBIXVVbczAihwooj.jgw5+jbZFU1.A+NK8u2+.bHl4SlXRYlS8I+LMhJlYsSyWQCCOFGPdKMRa1tMa6yYs3g7LfRqaVCEi8u.OfbJVNs0LQF26n.p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AogZescy1qPZOz7PZJbmghfegElilv.s74UXaZ9FxkjjdeoEkqtnh+LKp6C2GDhG8kVSdZZ5iYe10TGpveHPUM9g9KnuBsgMWlPjsEesV9flM4AYgXw7cfJa6drC4Zn21mr0NFr1Z2a7O6uXaoabyZKs7tluozcq7vRw7csB3KjO4+a9NtI+GYdT+9PYoyH6FlG+Kk1Q+F2rRQVAUdCOSVK7IXQh7.t4oYQcgbK9DfILHumrlGi0jINxGWSNVFY5B0UqF7uvuwNqKGaL1Y8INQQX+D94iKLW9IE1TYA3DS80Tp.4Bfw1SKlwzr1N0junQO22WFJ9df6Eiowc.iyc.i6c.i2c.yObGv7r6.lmWJF4GV5kYBdT9qIfgNGoJvxv3Hl7i.nNQh9Ov7ZGRM
                  

                  In this attached snippet, I have a set of knobs that are controlled by a main knob. The code works, however I was wondering if there's a less "boilerplate " way to achieve the same result with a cleaner and less code.

                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • alhugA
                    alhug
                    last edited by

                    @Casmat love your sound design videos! Everybody should go check those out. I started playing around with HISE about three weeks ago and @d-healey s videos and this forum have been really helpful. I had zero programming experience before I started with HISE and still managed to build a sampler instrument with Reverb, Delay, Saturation and started using scriptnode. I'm still far from having a plugin that I feel comfortable distributing but I'm slowly getting there. My screentime has gone up a lot in these three weeks but I'm here for it.

                    "HISE is for software developers. If you're not one you must become one." - David Healy

                    CasmatC 1 Reply Last reply Reply Quote 1
                    • CasmatC
                      Casmat @alhug
                      last edited by

                      @guhla Sound design videos? You talking about David?

                      i make music

                      1 Reply Last reply Reply Quote 0
                      • alhugA
                        alhug
                        last edited by

                        @Casmat you linked the nestacoustics website, so I thought that was you

                        "HISE is for software developers. If you're not one you must become one." - David Healy

                        CasmatC 1 Reply Last reply Reply Quote 0
                        • CasmatC
                          Casmat @alhug
                          last edited by

                          @guhla Wowwwwww!!! Can't believe you caught that haha!

                          i make music

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

                          15

                          Online

                          1.7k

                          Users

                          11.9k

                          Topics

                          103.5k

                          Posts