HISE Logo Forum
    • Categories
    • Register
    • Login

    Using LFO in scriptnode best practice

    Scheduled Pinned Locked Moved General Questions
    16 Posts 5 Posters 1.1k 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.
    • ForeverLiveF
      ForeverLive
      last edited by

      Hello, sorry for asking, is there any code example of using global modulation with a scriptnode? How to connect LFO target using dropdown or some UI component?
      Thank you! Have a good day.

      modularsamplesM 1 Reply Last reply Reply Quote 0
      • modularsamplesM
        modularsamples @ForeverLive
        last edited by

        @ForeverLive To use a global modulator in scriptnode you need to use a Global_mod node. Like this:

        HiseSnippet 2091.3oc6Zs7aabbFeVRMzhx1AxI9PPPaAARN3f5pJJ4j1fdPqDojKQzCVSU0.TfXOZ2ghCzt6rc2kxhIo.FH4PA5gbq.A8P6gdq.8TOzhhB66MEvH9bOzSoWBP5eAseyN6iY4KQtllNMnj.D679226u4iaSOtA02m6gzJeXOWJR6J3V8bB5TqCg4fZTGo8B38H9ATuJxt1pmKw2mZhzzJdaQGZkW.E94K2XKhEwwfl1EBcDmYP2kYyBR6so9ayrr1gXROjYqL6ao2vf6Tiaw6B3oHdUjKw3TxIz8IhoU.izJssIKf60JfDP8g4rE2rWqN766Hm+QLe1wVTQipnVvFI6FUqCyxrYLs5ifMpYJkWTR4WGuGyjkzeJGX4vApjtBUdfVgwAopSAjzTfzBRHcMbKCOlaP5HB7bYbCGPfzl.rZUnHmKR6Q3ZbXBNAqXSNktiGzHYA2X8UW8lUfed8eP6tNFALtSEty97.5AN230W58Wp7R+7kpz+PsaOzwDGiG2xh5MzgERWuwsva3z09Xp2MqbFwpKMYh.4mkmVZx3oFRpVYhbmFNrfCboQs2gaYJ3UhmGTBfhXafrnXDBgmBBkDuPjjnkEyj5gXvlbI7a6vOtJJD7QZw26O8s9hGh5ewKGs3Zb6i4awOOb4WFG2L6VDZIglfyeQbstAfnIypev0+Ce9Fnebi5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lL6G5fpzNDCfA2qIAhjC1dFwUGZECE4UDNUkWhkGG6Uxc.3YGVkSQ97fLpYbkHEUhtfVQkJSKchIZAh6Bhy3J3F9GIF0.Nmijk4FHLwoDVxGIZwxoJgycsgTSG.9dzUTFdxQbXUkRvGJ08ygDuSnA9QkX2gZHkPg7OQMVwXWaBpoZYWuDVRAgk90hddbI5qy7csH81pK3EQ5JOSOBVgiI87Xknsg7ULAEY4EihyFKkqJ3hwsfCcOlyQY+2E.xfbde8spt3tVsXuWlnSsNkdeIqLSLv5BZQhoA15M6BWhCLKMSDTQxGICIif4pg5UPRXqHFZJDJEysPw+r1YEJWFmdy5rbwhSOWD3XCvEAW.igKJ2fKfKNdf7kO7oGHKg2CxNh4Z0KEKO3K9fMdi282swzfkYASAi2zzLEFGu767V+w+0mswHUrtBl6a.WEPDMYnF9JCmacrm0lrkT3qklL95xSoIaIbXxmCHct.Q5szG3n+EOo+i929IexedviV+Cs+6aH+CqSMxxtUO3TcUAawKRWeimdWWWIDLUtiviwfbiQhlR4Wae7RkaCm13kJkdV48Ir7cC58YNb1kBu03PH6LQLDdq6KhQalkvjYEwPyJq4cj6Y5ii29E1uQa7lWKngyul.KH8OVejdn6W3ou95OoeKnG8oe5qNYfA8p+6GGBlh3ezTqvt1iFToYM8YgRyyR8068R0eRD+Ooz3YNe8+468Q4wVc137dlQ5i6nKiiK7+Xj48mvTIISK88cX5SCEC2Io5HzFFXqTS3az4+k4NB8katzfG0OMn79kL6S8JYoO527Je2+wq821XxHigb2BkD3FfDRdcOl8txSV5up1uz5y+0OI+DfLqOzVb9o1jv6EmqWho4xs3sIFd76Fc2EAUtXXOfEfS3KpXY7dh1URdutDpxqhrYlr6ZXHJOz2oJBM70rVNVy54XM2JGq4MxwZdybrluWNVy2erqQT77nnjBMQnilaKClqk7uZBo68egtcpAF
        

        One important thing to note is the global_mod nodes index parameter has a step size value of 1.0, meaning it will increment from 0 - 16, ignoring the decimal points between. However, when we patch this up to the parameters in the network and connect our combobox (dropdown menu) this doesn't work as you might expect as the combobox ignores the 0 and begins at 1 by default.

        You can fix this with scripting , or if you're lazy like me, you can change the step size of the parameter controlling the index to 0.1, like this:

        Screenshot 2023-08-11 at 14.08.57.png

        ForeverLiveF 1 Reply Last reply Reply Quote 2
        • ForeverLiveF
          ForeverLive @modularsamples
          last edited by

          @modularsamples ok, it's very good solution, but in my situation i feel like it would be easier to not use scriptnode, but just connect a slider to LFO directly with some scripting. How i should reference the LFO? With some callback to modulator? Sorry, just want make it so user can change the LFO target with a dropdown.

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

            @ForeverLive Add NUM_HARDCODED_FX_MODS=6 to the HISE juicer file and recompile HISE. This will add modulation slots for up to 6 of your scriptnode parameters and you can just assign a standard LFO modulator.

            Peek 2023-08-11 19-16.gif

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

            ForeverLiveF 1 Reply Last reply Reply Quote 5
            • ForeverLiveF
              ForeverLive @d.healey
              last edited by

              @d-healey Hi, wow, thank you. You as always just crushing it. Can i ask for any reference about assigning that modulators to target using scripting? Thank you very much!

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

                @ForeverLive said in Using LFO in scriptnode best practice:

                Can i ask for any reference about assigning that modulators to target using scripting?

                I'm not sure I understand the question.

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

                ForeverLiveF 1 Reply Last reply Reply Quote 0
                • ForeverLiveF
                  ForeverLive @d.healey
                  last edited by

                  @d-healey i mean how i possibly can do the dynamic target for LFO so user can just use a dropdown and pick where LFO is assigned to. Thank you again for the priceless help!

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

                    @ForeverLive I think the only way to do that would be to add an LFO to each parameter and bypass them all, which ever one the user selects you unbypass

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

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

                      You could also try and use the new modulation matrix object like shown here:

                      Link Preview Image
                      hise_tutorial/ModMatrixTutorial at master · christophhart/hise_tutorial

                      The Tutorial project for HISE. Contribute to christophhart/hise_tutorial development by creating an account on GitHub.

                      favicon

                      GitHub (github.com)

                      It basically lets you define mod sources and targets and then make the connections dynamically. The targets can either be modulation slots for sample accurate modulation or any knob on your UI with a block-based modulation which isn't as accurate but should be fine for most targets.

                      ForeverLiveF 2 Replies Last reply Reply Quote 3
                      • ForeverLiveF
                        ForeverLive @Christoph Hart
                        last edited by

                        @Christoph-Hart , @d-healey wow, sometimes i cannot believe i living in same reality with both of you. You are just superheroes in real life! Thank you very much, God bless your families.

                        1 Reply Last reply Reply Quote 1
                        • ForeverLiveF
                          ForeverLive @Christoph Hart
                          last edited by

                          @Christoph-Hart I just got this error all the time. Using late july HISE version.

                          Function / constant not found: Synth.setUseUniformVoiceHandler
                          
                          d.healeyD 1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @ForeverLive
                            last edited by

                            @ForeverLive That function was added in June, you sure you're using a version built on source code from July? Either way you're out of date, update, update

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

                            ForeverLiveF 1 Reply Last reply Reply Quote 1
                            • ForeverLiveF
                              ForeverLive @d.healey
                              last edited by

                              @d-healey isn't july is after june? July month number is 7 and june is 6. I loosing my mind really. Ha ha

                              CasmatC d.healeyD 2 Replies Last reply Reply Quote 0
                              • CasmatC
                                Casmat @ForeverLive
                                last edited by Casmat

                                @ForeverLive January February march April may June July august September October November December

                                Who else sings the song while trying to recall months, or is it just me..

                                i make music

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

                                  @ForeverLive Lol yes you're right, that's why I asked it "you're sure" to check if you had made a mistake. Perhaps you built HISE in July using source code from June or earlier.

                                  @Casmat I didn't know there was a song...

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

                                  ForeverLiveF 1 Reply Last reply Reply Quote 1
                                  • ForeverLiveF
                                    ForeverLive @d.healey
                                    last edited by

                                    @d-healey yes, you right, i updated HISE using your fresh awesome script, and it was so refreshing that i almost started to jump around and scream of happiness :)

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

                                    46

                                    Online

                                    1.7k

                                    Users

                                    11.7k

                                    Topics

                                    101.8k

                                    Posts