HISE Logo Forum
    • Categories
    • Register
    • Login

    Reading DAW Grid Time Value

    Scheduled Pinned Locked Moved Scripting
    8 Posts 3 Posters 278 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.
    • Adam_GA
      Adam_G
      last edited by

      hey all, im trying to write a juce class to read this value in my hise plugin - Screenshot_2024-07-15_at_9.11.58_PM-time.png -

      These work and get called appropriately:

      void onTransportChange(bool isPlaying_, double ppqPosition) override
      void tempoChanged(double newTempo) override

      This doesn't work and never gets called:

      void onResync(double ppqPosition) override

      Does anyone know how to accomplish this?

      Adam_GA ulrikU 2 Replies Last reply Reply Quote 0
      • Adam_GA
        Adam_G @Adam_G
        last edited by

        here is the cpp code im working in https://www.mediafire.com/file_premium/666rbfnyuxrxkjn/message%25283%2529.txt/file

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

          @Adam_G Why are you writing it in JUCE instead of using HISE's transport handler?

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

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

            @Adam_G as David says, use the Transporthandler for this
            Here's an example getting Timesignature, Bar and Beat

            btw, the "Hise controller" is buggy, it doesn't count the beats right if you have another key signature then 4/4, and some more strange things is happening

            HiseSnippet 1033.3ocsV01aaaCDlxNZn1aEXcX66DFX.JHFI1MYsCcXat9kzXrXGuYuzArOTPKcxlHRjBTzIwan.8m79GrcTRwR10MsvXQew9dkO2QxmiiTRWHNVpHVUlrLBHVeg83kB87NyYbAoeWh02X28kul9JE2iNgGBzKYAK.R6kQr3XviXYU9UFWsprGI46e941r.lvExUQHWJ4tv47PtNW6nV+BOH3TlGXxat9SZ02UJ5HCjKPXU1tAIh4dEaFLjYbqjMw5y54w0R0XMSCwDq8ZK8VNdt7FQp+Wxi4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WBC
            

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

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

              thank you @ulrik and @d-healey

              yes i have some existing c++ modules written in juce that i want to add to hise.

              @ulrik this seems to be code for getting the beatChange and timeSignatureChange in HISE, what i actually need is for the Host's/Daw's exact time in samples to be passed down to my C++ DSP's processor block. is this possible?

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

                @Adam_G would it be possible to use

                Engine.getSamplesForQuarterBeats()
                

                You'll have the amount of beats from the Transport handler, and if you use the

                TH.setOnGridChange()
                

                you should be able to read the samples every 1/64T I think

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                Adam_GA 1 Reply Last reply Reply Quote 1
                • Adam_GA
                  Adam_G @ulrik
                  last edited by Adam_G

                  @ulrik no unfortunately this wouldn’t work as I need the time in samples to be passed and perfectly synced with DSP’s audio buffer. In my second comment there’s a media fire link you can download and
                  you can see im using the hise:TempoListener in C++

                  this is a very simple and easy thing to do in juce by just calling getAudioPlayhead on the plugin processor and passing it to the dsp processors. But hise doesn’t seem to expose this info in c++ unless im missing it. maybe @Christoph-Hart could clarify that?

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

                    @Adam_G Ok, I understand.
                    Have you checked out this?
                    Maybe it contains the accurate sample information?
                    I couldn't find any information about this in the documentation except for what the image says...
                    Skärmavbild 2024-07-17 kl. 11.14.42.png

                    Hise Develop branch
                    MacOs 15.3.1, Xcode 16.2
                    http://musikboden.se

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

                    39

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    102.0k

                    Posts