HISE Logo Forum
    • Categories
    • Register
    • Login

    ScriptFX Parameter Example?

    Scheduled Pinned Locked Moved General Questions
    12 Posts 4 Posters 354 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
      last edited by

      Are there any examples available for the old (pre-scriptnode) ScriptFX stuff? Specifically how to attach a Parameter Slider to the actual DSP in the processBlock?

      orangeO 1 Reply Last reply Reply Quote 0
      • orangeO
        orange @A Former User
        last edited by

        @iamlamprey

        Link Preview Image
        Continous Noise and Sine wave generators in fx plugins....

        Now it is :) Check out this example patch: It's a monophonic synthesiser without any sound generator :) HiseSnippet 1700.3oc0X0zaaTDFd2DuPsCAZQbgaqhDRNpgH61T...

        favicon

        Forum (forum.hise.audio)

        develop Branch / XCode 13.1
        macOS Monterey / M1 Max

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

          @orange Thank you but this is specific to the pre-built libraries, I need to access a custom variable in the processBlock:

          function processBlock(channels)
          {
          	for (c in channels)
          	{
          		for (s in c)
          		{
          			s = s + (Math.abs(s) * scalar); // i need "scalar" as a param  to connect to the frontend
          		}
          	}
          }
           
          

          Not sure where to instantiate it, and what type ie reg/var

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

            ah okay i can just add them like a regular script and reference them in the processBlock, super easy, thanks again!

            Christoph HartC 1 Reply Last reply Reply Quote 1
            • Christoph HartC
              Christoph Hart @A Former User
              last edited by Christoph Hart

              @iamlamprey Is there a reason why you still need to use this old approach? Especially If you need to process on a per-sample basis, then using HiseScript is super inefficient (it's at least 10x slower than using scriptnode / SNEX).

              The example you posted is a one liner using the core.expr node.

              HiseSnippet 1027.3ocuV0sahbCE1FxPJraq5J0Gfo2QZihf1saqTuX2.IzhZgf1IEs2EY7XBVLi8HOdRBsp22Gq9HsuAsmy3AXHPSSPaKHAy4O6OeNemim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q7h7gGhaEZ9UUJQ9jgzhatJDKXs8CWQ.VgST2RPR5n0yiY48c62Mf+eLkHlwM5q3tAe3A8ix0.StT4ulXc38UAY+1jateFOFdMtq37MWpsB7q12.+58MvWtuA9M6afuZeC7a22.+t+8.w2xtn4BIsPGxnyyIgT54JFbOU9XIxeC5sldUB
              
              d.healeyD 1 Reply Last reply Reply Quote 2
              • d.healeyD
                d.healey @Christoph Hart
                last edited by d.healey

                @Christoph-Hart I think it's because he is building an instrument for Rhapsody.

                Is it possible to keep the compiled networks outside of the plugin by shipping the dll to the user?

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

                Christoph HartC 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @d.healey
                  last edited by

                  @d-healey said in ScriptFX Parameter Example?:

                  Is it possible to keep the compiled networks outside of the plugin by shipping the dll to the user?

                  No, I don't feel comfortable declaring this as a feature robust enough to be shipped to end users - the DLL allows fast iteration during the development process but if you want to make it a robust plugin system a lots of things need to be added / tested.

                  You can recreate this within scriptnode though:

                  4e1fca13-fd94-41f7-a601-ff4033d3e1de-image.png

                  ? 1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User @Christoph Hart
                    last edited by

                    @Christoph-Hart I've built a backend module-creator to rapidly iterate with the builder class and I haven't been able to get it loading Scriptnode trees, which is why I'm using the older module

                    If i can load uncompiled Scriptnode trees using the builder that would be awesome😀

                    and yeah, it's for Rhapsody

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @A Former User
                      last edited by

                      @iamlamprey If you export the scriptnode module as Base64 state, it's super easy:

                      const var b = Synth.createBuilder();
                      
                      const var i = b.create(b.Effects.ScriptFX, "ScriptnodeFX", 0, b.ChainIndexes.FX);
                      
                      b.get(i, b.InterfaceTypes.Effect).restoreState(
                      "424.3ocaR0raaCCClLsZEwGJvdCxwLfhfjmfAjjVfdHEF0cA6phL6hPjkLjjaiWQuuG28FzQE61ktN4Cle7mOJ9Qk6cJJDbd.O8t1ZBvLQgxqqiW8c35k.ddOz5JI1071ZYHPk.hmzE.veIFceiUE0N6nZOUK8zctbircbPVUanakQ5hQaLN0tB8Oouj8T1vrmyNtnCWh4oLFq1JsVxD9XZN6BmM5clw1lpMj+hQOHMM+kO.+zkk5nyWD4NF.7j4tx1hstGsrsXFrVGzaLTGnvYbIqo.rXq1Tl+pRD..t00D01erRF858.Jtoopv03Uzh9aG6CG.oROfmlvLDJHa4AvK7oO3rDF6CN60fPZXHaj8eCEez42wMFwda.Gzo9g2T+62CqIefUB.OSLcB+kxmiviwUREO3s4x3V.+rPwbK0VxOgkSsE9Obc7lDGjnoq+c7kJPHjkkv6XNSTw+mj7+t5wboWVQQxefj2P7qpUZ65zZBvgmB8mUx8+iue+0TGOSz49CE.GyO7sqWJixTi50Pd2US9nNszwkzCZE08XdnXIE1Ec0.7GsPlzUC");
                      
                      b.flush();
                      
                      ? 1 Reply Last reply Reply Quote 1
                      • ?
                        A Former User @Christoph Hart
                        last edited by

                        @Christoph-Hart How are you exporting the tree to Base64? Your example works but my exported strings don't load anything

                        I'm right clicking the root container and using this button:

                        802fe1d7-39aa-4fcb-bc24-e691e0e8b456-image.png

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

                          ah it's the Edit menu version... okay now it's working cheers 😁

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @A Former User
                            last edited by

                            @iamlamprey either there or you can just call exportState() from a script, this will also give you the Base64 string.

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

                            21

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            102.6k

                            Posts