Forum

    • Register
    • Login
    • Search
    • Categories

    Getting the BPM of the host displayed in a text label

    General Questions
    4
    15
    149
    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.
    • L
      LeeC last edited by LeeC

      I'm trying to get a text label to display the current BPM of a DAW in close to realtime using the timer function.
      The following code works nicely in HISE but not in Logic X or Studio One when testing the exported FX plugin.

      Any ideas what I'm missing here?

      const var BPMTEXT = Content.getComponent("BPMTEXT");
      const var timer = Engine.createTimerObject();
      
      timer.startTimer(100); 
      timer.callback = function()
      {
      
      BPMTEXT.set("text", Engine.getHostBpm());
      	
      	
      };
      
      ulrik 1 Reply Last reply Reply Quote 0
      • ulrik
        ulrik @LeeC last edited by

        Isn't the function

        timer.setTimerCallback = function()
        {
        BPMTEXT.set("text", Engine.getHostBpm());
        };
        

        Hise Develop branch
        MacOs 13, Xcode 14.0.1
        http://musikboden.se

        L 1 Reply Last reply Reply Quote 1
        • L
          LeeC @ulrik last edited by LeeC

          @ulrik Yes you're right, I think I was using an older format.

          However, using this still doesn't work in exported FX though.

          Does it work for you?

          ulrik 2 Replies Last reply Reply Quote 0
          • ulrik
            ulrik @LeeC last edited by ulrik

            @LeeC yes it works in an instrument, (Logic), but I have not tried in a FX

            Hise Develop branch
            MacOs 13, Xcode 14.0.1
            http://musikboden.se

            L 1 Reply Last reply Reply Quote 0
            • ulrik
              ulrik @LeeC last edited by

              @LeeC I just tested it in a FX plugin as well, and it works fine
              In the plugin I built I can adjust the timer freq as you can see
              hostTempo.gif

              I used this code:

              HiseSnippet 985.3ocsV0taiTCE0SZMrYVBhJwCvnH9wDoRTxxtKHUADZZJDw11ncJUveXkiGmLlNicjGO61vpJ3QhGAdj3M.td9NoIkpH0H0JYeuGeN956GyDkjxhikJjUyKWtfgr9Hr2RgNXX.gKPiOAYc.dX.idsyOHi0WxhVHQGubAINl4irr166MtY0beT5u+4aOlDRDTV0VHzURN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geWhVFkUl.aLYT5z.KqQBBjkklQh9O.Ra2DnB
              

              Hise Develop branch
              MacOs 13, Xcode 14.0.1
              http://musikboden.se

              L 2 Replies Last reply Reply Quote 0
              • L
                LeeC @ulrik last edited by LeeC

                @ulrik Well it definitely doesn't work as an FX plugin.

                @Christoph-Hart is this a known issue?

                After attempting both Scriptnode and this method of trying to get tempo synced functionally in an FX plugin it's seems that there isn't a way at the moment. Things work perfectly in HISE but not after exporting and testing in DAWs.

                More than happy to wait patiently for fixes if this is the case but if I'm missing something obvious please help.

                Cheers ☺

                Dan Korneff 1 Reply Last reply Reply Quote 0
                • L
                  LeeC @ulrik last edited by

                  @ulrik said in Getting the BPM of the host displayed in a text label:

                  HiseSnippet 985.3ocsV0taiTCE0SZMrYVBhJwCvnH9wDoRTxxtKHUADZZJDw11ncJUveXkiGmLlNicjGO61vpJ3QhGAdj3M.td9NoIkpH0H0JYeuGeN956GyDkjxhikJjUyKWtfgr9Hr2RgNXX.gKPiOAYc.dX.idsyOHi0WxhVHQGubAINl4irr166MtY0beT5u+4aOlDRDTV0VHzURNk8JdDWWs6jA+HOL7ThO6RdTMue9fwToXnLTl.RZObOzBB8Zxb14DiaMvHqOXjOWKUdZhlEir1+Xo+Ru.46DY9eEOlOMjYVzG4AGT11mJC8MJ1rKZX.OzeRwUOFAmxjp.wdYAhOEeF2mWteU.4SRM3Tgnd7vpw8Iu90kWuGt7rpIu8yj2AXOphuPWYwnsmhGKzL0LB7DTWVY9hZ7WMvCkfGBc2Hx0rSUvhRDtOqWuCcf+04nV1srgGhXsyaIJGyazUjvDlyW6T.eNSOTBYCBXga6ROZavVgzioMl1Jtb6qgpLUaq3J8nclVaYavoyn5k8V4zzvViDy4BVWphAOKFFUWL82XTsaA7V1bQH3hyrDAUykBGoHWbFEnjgtzB5ODNV3p1ok86aY2LmzzsNxrtarlnRQpbMFMTbaJM+Owftwl8SIaHILbJj46ttJxzq13ZJCkNVna2N1u2tYY7w3naaM6Fc6CKhB.8F6GuHxsSmiruE9q1s9bolcQ9wXeqsy5llMai1x0WHbo2j4rvw8.zUjDMkoJhsENB46qVPg2dAU85cZVntliRwXAWewBlXakYn72GSAWtp.W0okaebd4lWH2moPbnppIN+oAkJ4plX+x.zOM9DhlTbPvYB7rfozbyUv5D1agVhY0wMwmvhuVKW.TUlTfr9vLZakS6qHSYgor9TbYsF5lJNGOXY0hOav6395f5JJfwmGnq2n0jSXNtp95nZ7a+.t1Uz+2utF8+4v0o+WuC8iG3ylQRB0WsdnKp97juYPDohkA+QtnsKjfZEM+jsGyptj2Tezzx5ZbMQyuinOOm9JHyfGWO9uyp6C5t8pgIFR+jPhd0wHlYm4FfRgU5Wa5IKh45k0ms9nLa4gJ2CvS3ZZvl0aiMnWH4+wVu4SpagGMaFzLuRr6iO8me7GKidsLQyEyOinUbHuBedRjG7gKTFnDgfEZZWY0vzXIacOyZSjwiI7SW7uvubi8MqsxM1uvHJhPUx2PyZGY9VfmjtCnIQ5mD0DelYsS+htPXbut8PQvmn7FJ0DJ9bP6aFyy1ALewNf446.lWrCXd4Nf4K2ALe08hw70geWhVFkUl.aLYT5z.KqQBBjkklQh9O.Ra2DnB

                  Sorry I missed this...

                  Thanks, I'll try it now ✌

                  1 Reply Last reply Reply Quote 0
                  • L
                    LeeC @ulrik last edited by LeeC

                    @ulrik so this works as an FX plugin in Studio One but not in Logic X (10.3.1).

                    https://imgur.com/Bg3tIr6

                    What version of Logic are you using?

                    ulrik 1 Reply Last reply Reply Quote 0
                    • ulrik
                      ulrik @LeeC last edited by

                      @LeeC Logic Pro X 10.4.8

                      Hise Develop branch
                      MacOs 13, Xcode 14.0.1
                      http://musikboden.se

                      L 2 Replies Last reply Reply Quote 0
                      • L
                        LeeC @ulrik last edited by LeeC

                        Ok thanks for the info.

                        I'll try updating to see if this makes a difference.

                        Massively appreciate the support with this @ulrik 🌟

                        1 Reply Last reply Reply Quote 0
                        • L
                          LeeC @ulrik last edited by LeeC

                          @ulrik So I've just tried with Logic X 10.4.1 and it doesn't work ☹

                          Again this works fine in Studio One and that's using the AU that Logic should have no problems with.

                          If anyone has any thoughts as to what's might be going on please chime in...

                          ulrik 1 Reply Last reply Reply Quote 0
                          • ulrik
                            ulrik @LeeC last edited by

                            @LeeC could it be any sync settings in Logic that has to be activated maybe?

                            Hise Develop branch
                            MacOs 13, Xcode 14.0.1
                            http://musikboden.se

                            1 Reply Last reply Reply Quote 0
                            • Dan Korneff
                              Dan Korneff @LeeC last edited by

                              @LeeC said in Getting the BPM of the host displayed in a text label:

                              After attempting both Scriptnode and this method of trying to get tempo synced functionally in an FX plugin it's seems that there isn't a way at the moment. Things work perfectly in HISE but not after exporting and testing in DAWs.

                              I had a similar question about Engine.getSampleRate() . It worked fine in HISE, but not an exported FX plugin. The trick was to put the code in PrepareToPlay of the scriptFX instead of onInit.
                              Might be the same for your plugin.

                              Dan Korneff - Producer / Mixer / Audio Nerd

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

                                Nah it‘s unrelated, in this case it‘s called periodically and not just at initialisation.

                                1 Reply Last reply Reply Quote 0
                                • L
                                  LeeC last edited by LeeC

                                  Just tested in Ableton Live (9.1.6) and it works fine. This was using both AU & VST....

                                  At @ulrik might be on to something with the "sync settings in Logic" idea so I'll have a look around in Logic X to see if I can find anything.

                                  Very strange!

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

                                  9
                                  Online

                                  1.1k
                                  Users

                                  6.8k
                                  Topics

                                  62.5k
                                  Posts