HISE Logo Forum
    • Categories
    • Register
    • Login

    Confusion speed btw LFO speed sync/non-sync makes HISE bug

    Scheduled Pinned Locked Moved General Questions
    lfominsyncvaluesmax
    10 Posts 4 Posters 2.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.
    • Dark BoubouD
      Dark Boubou
      last edited by Dark Boubou

      Hey!
      I added a knob controlling LFO speed, from 0hz to 40 Hz.
      Now the problem is that when I clic on the button LFO Sync I created, the max value changes (To 10).
      So If my LFO non-Sync speed was above 10 Hz, and if I would change to sync speed... Then the software bug!
      Is there a way to add a property saying something like 'If LFO is synchronized then Speed max value set=10' ?

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

        When in tempo sync mode the LFO will "sync" with the host tempo, the frequency knob then goes into tempo sync mode and locks to a note value so you don't need to set it in hertz. Take a look at the knob of the LFO and you will see the different note values.

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

        1 Reply Last reply Reply Quote 0
        • Dark BoubouD
          Dark Boubou
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Dark BoubouD
            Dark Boubou
            last edited by

            Yes I understood it's in division by main tempo, but how to fix its max value?
            I upload a video to show you the bug

            1 Reply Last reply Reply Quote 0
            • Dark BoubouD
              Dark Boubou
              last edited by

              For the moment button colors are inverted, red=off and black=on ^^
              First, the values with max 10, it works.
              Then the values max 15, not sync works; sync bug.

              I didn't understand how to fix that!

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

                You need to switch the mode of the knob when you press the button:

                HiseSnippet 1405.3oc2Xs2aaaCDWxIZaVctacqCX+ofwFfCZlpcR5dzhg7vMtMsIwAUoYCXXniVhNlHRjdRToMoH.6K29+8Qo.6Cv1cTOMhpabZ6ZwDBBDuG7N96Nd2IuWnvkFEIB0zux9mLlpo+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H8XhZ8agmEHg+jxc5mg1Ssqr8TmpvsKn6dMi8v7yp82ZU3uXf3sr+l1rugwlCGRckEN67F894Kam8Kmqb0DW4JFNP+DU6Kki7Ep0V+D4Xp08nbZHBpSYbt+5M+3b8ckf02OjviFKhlXicnAr8gVaQkI93HJV83QXPtL8tBRXkrdwp8fyXk53Pjwgprk0CDwb4DYGycoF1ZxKMkjuhIul+cvfgu4u485WnXtKl69Jlc8Cy7QGVvXe5l7io9vjioUGtaxfe4TekNIz4BZPWP45q8HpOkTNC8qVaaHyhDhiVcIOect3muoEC9RiD20BusY8+ih1y85Vz9R9MPoeyqgALwhxK+DiIlsep93e73G+mqlOcS4N2Xsvs3kOJXUWXf7fD6UDR1ldHXmxTxmNdhhWABgbDie3jUXu9ZciijhfrcWS+qMVZE6IeNtO9Iw2.e8G5pVq8lKos1EL5+4JbMGAQD98770DONO79dhG+tdLiGIhkPZ3NDXT+mAWb1MNvAZu6RAOgyguWC+4UpgsnSV2FWmzem60N62dIkYGbsdJyNYL+OwFAD2PwSbSFvFSj+HEE3byU+VS0M1AWa0IanZDafu9i8DWWDr+F.cpViklYMVdl0XkYViaMyZ7syrFe2Lqw2OEMvQfVOFJtkzrPS6eA+B2m7.
                

                Interesting part:

                inline function onSyncButtonControl(component, value)
                {
                	// set the Sync Mode for the LFO
                	LFOModulator.setAttribute(LFOModulator.TempoSync, value);
                	
                	if(value)
                	{
                		// Switch the knob to tempo sync mode
                		Knob.set("mode", "TempoSync");
                		Knob.set("max", 10);
                	}
                	else
                	{
                		// Switch the knob to frequency mode
                		Knob.set("mode", "Frequency");
                		Knob.set("min", 0.2);
                		Knob.set("max", 50);
                		Knob.set("middlePosition", 5);
                	}
                };
                
                1 Reply Last reply Reply Quote 1
                • Dark BoubouD
                  Dark Boubou
                  last edited by

                  Mmmh... I entered it but doesn't affect the values or anything.
                  I replaced the word 'knob' by my LFO's name [LFOSpeed]

                  Is it because the button has a max value set? I erased it but it changed to 0 or 1... :/

                  1 Reply Last reply Reply Quote 0
                  • Dark BoubouD
                    Dark Boubou
                    last edited by

                    Well it still doesn't work...
                    Here is an adaptation for Delay, with dealy ms / bpm sync...
                    It should work, isn't it?

                    const var Delay = Synth.getEffect("Delay");
                    inline function onDelaySyncControl(component, value)
                    {
                    	// set the Sync Mode for the Delay
                    	Delay.setAttribute(Delay.TempoSync, value);
                    	
                    	if(value)
                    	{
                    		DelaySpeed.set("mode", "TempoSync");
                    		DelaySpeed.set("max", 20000);
                    	}
                    	else
                    	{
                    		DelaySpeed.set("mode", "Frequency");
                    		DelaySpeed.set("min", 0);
                    		DelaySpeed.set("max", 1);
                    	}
                    };
                    

                    Do you read here anything anormal?

                    1 Reply Last reply Reply Quote 0
                    • Dominik MayerD
                      Dominik Mayer
                      last edited by

                      Hi,

                      First of all; Did you check out the Hise Snippet ? You can simply copy it, make a new file in HISE and add it via File > Replace with Clipboard Content (could actually be named a bit more intuitively). There you can look at Christophs Code. I hope this will sort some things out :)
                      (also look at the onControl Tab)

                      Best, d

                      1 Reply Last reply Reply Quote 1
                      • Dark BoubouD
                        Dark Boubou
                        last edited by Dark Boubou

                        Well yeah I opened it, it works but not when I insert it in my code, but I'm sure it's about onctrol.
                        I have found another solution!

                        Add knob, speed LFO knob. When you select 'not sync button' (position 1), the knob has range 0 to 50.
                        Until here that's the same as before.
                        But if I insert this condition:

                        inline function onBUTTONControl(component, value)
                        {
                        KNOBHERTZ.set("visible", value);
                        };
                        BUTTON.setControlCallback(onBUTTONControl);
                        

                        And then add a second knob, with value 0 to 1 for synchro, then add this similar line:

                        inline function onBUTTONControl(component, value)
                        {
                        KNOBSYNC.set("visible", !value); //Inverse value of the other knob
                        };
                        BUTTON.setControlCallback(onBUTTONControl);
                        

                        And then it switches btw the two knobs, but we don't see it! :D

                        I go try it, I hope it works :P

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

                        12

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.4k

                        Posts