Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: get_bpm and get_browsed_song 'bpm'

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

I have the following functions in my plugin, and they don't seem to be delivering the values I had hoped for. Could someone wiser in such things tell me how to fix them, or how to go about getting bpm values a better way?


double RevesPlugin1::getActiveBPM()
{
double qRes;
HRESULT hr;
hr = GetInfo("deck active get_bpm", &qRes);

return qRes;
}

double RevesPlugin1::getBrowsedBPM()
{
double qRes;
HRESULT hr;
hr = GetInfo("get_browsed_song 'bpm'", &qRes);

return qRes;
}

 

Mensajes Tue 25 Feb 20 @ 6:29 pm
locoDogPRO InfinityModeratorMember since 2013
what are you getting as a result? a number in the '1000s ?
 

Mensajes Tue 25 Feb 20 @ 6:57 pm
NicotuxHome userMember since 2014
I just tried averything seems to be OK

deck active get_bpm
will give 120 by default and the bpm currently display by the "active" deck
Maybe the active deck is the problem: Active deck is the last one (selected or not) which started to play something or loaded something
Maybe you want to try other pseudo decks such as current or default or playing

get_browsed_song 'bpm' gives the bpm of the currently browsed song which can be the one in any browsable area
song, sidelist, automix, karraoke, any clone ... or search
Maybe select the correct browser_window may give the wanted result
browser_window 'songs'
 

Mensajes Tue 25 Feb 20 @ 6:57 pm
Thanks for your help my friends,
The functions work great, and to my embarrassment, I just wasn't calling them right.
 

Mensajes Tue 25 Feb 20 @ 7:16 pm
Actually, get_bpm is working great, but get_browsed_song 'bpm' is always giving me a value of 0.
 

Mensajes Tue 25 Feb 20 @ 8:47 pm
locoDogPRO InfinityModeratorMember since 2013
looks like it is returning a string
try this
char qRes[8]
GetStringInfo("get_browsed_song 'bpm'", &qRes[0], 8);

keep in mind this only returns what the browser is reporting the bpm is, not the actual bpm tag. so for a 122.50 track you might get 123 dependant on your browserBpmDigits setting
 

Mensajes Tue 25 Feb 20 @ 9:00 pm


(Los tópicos y foros antiguos son automáticamente cerrados)