Reading DAW Grid Time Value
-
hey all, im trying to write a juce class to read this value in my hise plugin - -
These work and get called appropriately:
void onTransportChange(bool isPlaying_, double ppqPosition) override
void tempoChanged(double newTempo) overrideThis doesn't work and never gets called:
void onResync(double ppqPosition) override
Does anyone know how to accomplish this?
-
here is the cpp code im working in https://www.mediafire.com/file_premium/666rbfnyuxrxkjn/message%25283%2529.txt/file
-
@Adam_G Why are you writing it in JUCE instead of using HISE's transport handler?
-
@Adam_G as David says, use the Transporthandler for this
Here's an example getting Timesignature, Bar and Beatbtw, 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+Wxi4SC.iPSxXLQopOUF3YPrQKoybdf2n6J+XBlkQ4MixoMiu1d.2iuRedS4KSLPyinX+vpz5vq7ZvqYQ30n.71BjrJ.o8RgzSrG6p3Q5bKF77418EZP4ybWeqI0WRoqKa2QhdHzGFxtBNUgBqhv43FMpSa1nw9+P0pXqOVSayTmOMf9iz6hZFn6HCijBTvoVp4Zn+YtCL885ep87.L63i4yDL8BEbeQtoilTTUAynCkgbTqTsBySNCyROwLt.NzUgqHLQwDwQRk9LlvK.TNXvSN6vXPimwcGH8.GTbjB7AUuawtgfEXxepO8DLbWxbv2QqV.0oO8XiQtH.WAp+BgqlKEzo3JgGLDy.Gye6K7faqS4wCgav1z9U+6pUxJeSRcpoga00pSS5IufV6.pSyCxij9s4U196iqWkzd8FwxTlPiXpX.2FwLLfomenefTpJjqi1HWucUscgncNrSqt75XaUot39PVbBYXcpGf+jTkatUsFjQmNn1Q0NH0crrVgLbSCUsN31bkRQ3VvfApUqtBkRwPoFtP3j.npusJcSS99a0l4vmRFjbFYKlMkl59BzQrHbJnpSu1vNtxQ7V65TA1eXpfhLUto2EJ3nTzWv0WDAhOD+EI6BD9ueueWllY3Oxzg9EAJM2.Aqtv0HYbJaRE6tP7UZYDl0U25P05DqONiq4b1THfvQFkuxdycYxs4L2casLW3mZcC2SOekh28qslC7YyKLAneKeDei4+UA1+Fs.riwRZJVkMmdvtl8IGcho.+3.7Q1o2WJ.q28mOPvJYsdAs4mFxpXmQCTDZ9OPPKcwRv16OBAGdI8VDXt7UbhlYLdlA7r8ZiQLiJDwb8xhi4+eaL2mJDeh8Ht1c91wXosfQ7FvCAFydbvis646Ct5b.tm8o+wCyKAH+lbglKlgz7JNd9wd3hvw36ibS3AEPfgawpjgEHUtgQ1zAFCBuDg+E+xL1zHakYr4cFIgLWk7MtoLZlme7nDMHlDIu7ph8.iLdnJgkqXeNDeMzabcWOUuWfOcWC73cMvS10.+tcMvmsqA97cMvu+iGn4wpubgVFldsgPFLpWxHBKqzW4jbZk7e.q6dWBC
-
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?
-
@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
-
@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?
-
@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...