Can you explain to me what do " as if on cue " and whole sentences mean please?

> 
> As if on cue, research from the Duke Cancer Institute, publishing in
>  the journal Urology, revealed that classical music can indeed diminish
>  anxiety.
> 
> 
> And as if on cue, hundreds of migrants swarmed to a plush London
>  suburb for their share of the spoils
> 
> 
> 

The Oxford Online Dictionary says that the meaning of "on cue" is "at exactly the moment you expect or that is appropriate" but all example sentences which are related to **on cue** begin with "as if". 

So when I put together these four words, it seems to have the meaning of "as if planned to happen on a right or same time"..and this meaning fits the second sentence but doesn't fit the first one.. In the first sentence it adds a meaning like, for me, it seems like everybody arranged a time to get and meet there..

Can I say 

> 
> After I got out from the airport, I got to the train station and as
>  if on cue the train was due to move on(I mean it moved on just after I
>  had gotten on it).So I didnt waste any time by waiting.
> 
> 
>