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;
}
geposted Tue 25 Feb 20 @ 6:29 pm
what are you getting as a result? a number in the '1000s ?
geposted Tue 25 Feb 20 @ 6:57 pm
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'
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'
geposted 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.
The functions work great, and to my embarrassment, I just wasn't calling them right.
geposted 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.
geposted Tue 25 Feb 20 @ 8:47 pm
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
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
geposted Tue 25 Feb 20 @ 9:00 pm