Is there way to recognize playing music in host?


#1

i am studying and developing vst plugin.

i have wondered 

"    void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) override"

i try this, it was called after i added to the channel.

so this means that if i did not played that track, vst plugin process that data ( 0.000000, 0.0000000)

do i have right concept??

 

or is there any concept or way to recognize the track playing??


#2

Sorry, your engish isn't so great, and I'm stuggling to understand what you're asking...

But in general the answer to questions of the type "Does the host do [x]?" is that hosts are all different and will do things their own way. There'll always be a wierd one that does things in an unexpected way.


#3

if i add my plugin, (i dont play track yet.)

but "processbloack" function is called.

 

so  i wondered that is there any flag something like that?

i want to get data not 0.000000

do i make flag my own?

 


#4

You'll get whatever data the host chooses to send you. Not sure what kind of flag you're expecting there to be?


#5

looks like they're asking if there's some sort of flag sent to the plugin when a block is silent.  I would have to assume the answer is no. 

plugins don't add latency do they (unless you build it in, for some reason)?  I would assume they just process the block in series, at the same time as the host's audio processing...so there would be literally no way to know if i block is silent or not, without making at least 1 block delay.

does that sound about right?

 


#6

i have the same idea too.

i wonder exactly,  if i play pure sine wav file via daw(cubase, reaper)

so are there any differces with original wav file and sum of buffer(through daw).

 

 


#7

Sorry, but I really have no idea what you're all trying to say/ask!


#8

sjnam asked "Does the host notify you if the block to be processed is silent (presumably for an effect plugin)?"

i answered "No, i doubt it."

 

 


#9

Well, it can be done this way:

inside processBlock():

AudioPlayHead* playHead = getPlayHead();

Then the playhead can be used to retrieve information about the current playing condition:

CurrentPositionInfo pos;
playHead->getCurrentPosition (pos);

now, the pos struct contains a lot of useful information one of which is 

pos.isPlaying

which is a boolean telling if the host is idle or currently playing the song.

Check this page for the documentation of CurrentPositionInfo: https://www.juce.com/doc/structAudioPlayHead_1_1CurrentPositionInfo

 


#10

thank you! your reply!

this is what i want to know it.

i spend the time about a few days.

you save me.

 

thank you again.