Engine.getPlayHead() Examples?
-
Okey i Found this
@dustbro said in The things we all want to see in HISE 3.0:
@d-healey said in The things we all want to see in HISE 3.0:
I'd also like to be able to get some feedback from the DAW about start/stop transport state.
You can do this right now if you don't want to wait for v3.0.
in HISE source code hi_core/MainController.cpp, un-comment the features you need.void MainController::storePlayheadIntoDynamicObject(AudioPlayHead::CurrentPositionInfo &/*newPosition*/) { //static const Identifier bpmId("bpm"); //static const Identifier timeSigNumerator("timeSigNumerator"); //static const Identifier timeSigDenominator("timeSigDenominator"); //static const Identifier timeInSamples("timeInSamples"); //static const Identifier timeInSeconds("timeInSeconds"); //static const Identifier editOriginTime("editOriginTime"); //static const Identifier ppqPosition("ppqPosition"); //static const Identifier ppqPositionOfLastBarStart("ppqPositionOfLastBarStart"); //static const Identifier frameRate("frameRate"); //static const Identifier isPlaying("isPlaying"); //static const Identifier isRecording("isRecording"); //static const Identifier ppqLoopStart("ppqLoopStart"); //static const Identifier ppqLoopEnd("ppqLoopEnd"); //static const Identifier isLooping("isLooping"); //ScopedLock sl(getLock()); //hostInfo->setProperty(bpmId, newPosition.bpm); //hostInfo->setProperty(timeSigNumerator, newPosition.timeSigNumerator); //hostInfo->setProperty(timeSigDenominator, newPosition.timeSigDenominator); //hostInfo->setProperty(timeInSamples, newPosition.timeInSamples); //hostInfo->setProperty(timeInSeconds, newPosition.timeInSeconds); //hostInfo->setProperty(editOriginTime, newPosition.editOriginTime); //hostInfo->setProperty(ppqPosition, newPosition.ppqPosition); //hostInfo->setProperty(ppqPositionOfLastBarStart, newPosition.ppqPositionOfLastBarStart); //hostInfo->setProperty(frameRate, newPosition.frameRate); //hostInfo->setProperty(isPlaying, newPosition.isPlaying); //hostInfo->setProperty(isRecording, newPosition.isRecording); //hostInfo->setProperty(ppqLoopStart, newPosition.ppqLoopStart); //hostInfo->setProperty(ppqLoopEnd, newPosition.ppqLoopEnd); //hostInfo->setProperty(isLooping, newPosition.isLooping); }
These extend the Playhed functionality. For instance:
Engine.getPlayHead().isPlaying
So I need to comment out Some of the lines in Source code to Make this Working Right?
Can someone Help with The lines that I Need to Make the plugin Look At The Playing Transport Of Host, and And once It Stopped What I Could I Supposed to Use?
Thank You
-
Okay I'm Uncommented These Lines:
/*newPosition*/ //static const Identifier isPlaying("isPlaying"); //ScopedLock sl(getLock()); //hostInfo->setProperty(isPlaying, newPosition.isPlaying);
Compiled Succefully.
And...Is This the Way I Can Recall The Playhead?
Example:if(Engine.getPlayHead().isPlaying ) { // Some Codes Here }
Thanks
-
Okey, I Connected The Play Head to A Simple Gain Module To Check If It Works Correctly:
But Not Sure No Idea if This is Correct Or Not:
if(Engine.getPlayHead().isPlaying ) { PlayHead.setBypassed(1); } else { PlayHead.setBypassed(0); }
Any Help Is such Appreciated
-
Use the TransportHandler I've added a few hours ago.
https://docs.hise.audio/scripting/scripting-api/transporthandler/index.html
-
@Christoph-Hart Thank you Christoph :) God bless you man
Recompiling Now :) -
@Christoph-Hart said in Engine.getPlayHead() Examples?:
e the TransportHandler I've added a few hours ago
Christoph, Do you have a minimal Example Of How to Enable/Disable A Module Based on DAW TransportHandler?
Thank in advance -
@Christoph-Hart
Excellent job :) I Found how :) -
-
@Christoph-Hart Can we now use the gain modulator without latency or mess problem? to create a sidechain effect for example?
-
@Natan Can we use this to get LFOs in sync with FX Plugins?
-
@DanH I Used this for My Graphic Ideas
Not Sure if this can help to sync The LFO Latency :/
@Christoph-Hart