HISE Logo Forum
    • Categories
    • Register
    • Login

    Passing info between scripts

    Scheduled Pinned Locked Moved Scripting
    4 Posts 3 Posters 116 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.
    • S
      Sampletekk
      last edited by

      If you add a script processor to, say a sampler. Is there a way to pass information between a Interface script to the samplers script processors? Say that you have a slider that you want the samplers script processor to know the value for

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

        @Sampletekk You can use global variables - but don't unless you have no alternative... or you're Aaron.

        The method I prefer is think of each script processor just like you think of the built-in HISE modules.

        For example if your project has a Simple Gain effect and you want to control its Gain knob from your UI, how would you do that? You'd either use processor/parameter ID or you would use .setAttribute. Well you can do exactly the same thing with your custom script processors.

        So add a slider to your script that does the thing you want, then connect the slider on your UI to the slider of your script using one of the two methods I mentioned.

        I demonstrated this in a recent video on Patreon. https://www.patreon.com/posts/control-multiple-115190059

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

        S 1 Reply Last reply Reply Quote 1
        • S
          Sampletekk @d.healey
          last edited by

          @d-healey Thanks David! That should do the trick!

          1 Reply Last reply Reply Quote 0
          • A
            aaronventure
            last edited by

            this snippet https://forum.hise.audio/topic/10635/snippet-per-event-modulation-from-ui-with-global-storage

            has an example of globals usage where the interface and the processor script talk via a global object.

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

            25

            Online

            1.8k

            Users

            12.0k

            Topics

            104.7k

            Posts