Forum
    • Categories
    • Register
    • Login

    Milliseconds to Hz for LFO TempoSync Rate

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 30 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.
    • JulesVJ
      JulesV
      last edited by JulesV

      How about converting milliseconds to Hz to extend the TempoSync Rate value in an LFO, like 8/1 or 4/1 or 2/1? I'm trying to find a way without modifying the source code.

      Is 1 Hz equal to 1000 ms?

      Oli UllmannO 1 Reply Last reply Reply Quote 0
      • Oli UllmannO
        Oli Ullmann @JulesV
        last edited by

        @JulesV
        Yes, 1Hz means 1 cycle per second.

        JulesVJ 1 Reply Last reply Reply Quote 0
        • JulesVJ
          JulesV @Oli Ullmann
          last edited by

          @Oli-Ullmann said in Milliseconds to Hz for LFO TempoSync Rate:

          @JulesV
          Yes, 1Hz means 1 cycle per second.

          1 cycle doesn't mean 1 bar, right?

          Oli UllmannO 1 Reply Last reply Reply Quote 0
          • Oli UllmannO
            Oli Ullmann @JulesV
            last edited by

            @JulesV
            No, it just means that it happens once per second. With an LFO, for example, it is one cycle.
            I just looked in the API and found Engine.getMilliSecondsForTempo(int tempoIndex). That might help you.

            If you insert this into your script and press compile, you will see the milliseconds for the specified tempo index of the currently selected tempo:

            Console.print(Engine.getMilliSecondsForTempo(5));
            

            Do this once, change the tempo of HISE, and then compile again. You will then see how the value changes.

            Tempo index 5 is quarter notes.

            If you want to know all the tempo indexes, load an LFO, switch it to tempo sync, and look at the values. Note: The index starts at 0.

            This function might also be helpful:

            Engine.getMilliSecondsForQuarterBeatsWithTempo(double quarterBeats, double bpm)
            
            JulesVJ 1 Reply Last reply Reply Quote 1
            • JulesVJ
              JulesV @Oli Ullmann
              last edited by

              @Oli-Ullmann Oh, that's great thank you.

              I will try this, I hope when the DAW tempo changes, the values would be updated automatically.

              Oli UllmannO 1 Reply Last reply Reply Quote 0
              • Oli UllmannO
                Oli Ullmann @JulesV
                last edited by

                @JulesV
                I've never worked with it before. If it doesn't work right away, you could maybe use a broadcaster for it. But @David-Healey probably knows more about that! :-)

                If there are any problems, it definitely makes sense to compile HISE as a plug-in and then load the project directly into the DAW to try it out.

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

                13

                Online

                2.2k

                Users

                13.3k

                Topics

                115.9k

                Posts