19 Jun '13 - 14:49 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: I can't use 'BASS_ChannelGetAttribute(chan, BASS_ATTRIB_MUSIC_BPM, &value);'  (Read 284 times)
manzachu
Posts: 1


« on: 28 Feb '12 - 11:29 »
Reply with quoteQuote



I really wannt get BPM of the music.

I tried to use the code
"BASS_ChannelGetAttribute(chan, BASS_ATTRIB_MUSIC_BPM, &value);"

however it always return 'BASS_ERROR_ILLTYPE'.

here is my code.

HMUSIC chan; //global variable

if (!(chan=BASS_StreamCreateFile(FALSE,file,0,0,0))
      && !(chan=BASS_MusicLoad(FALSE,file,0,0,BASS_MUSIC_POSRESET|BASS_MUSIC_PRESCAN,0))) {
      Error(_T("Can't play file"));
      return FALSE; // Can't load the file
}


after loading music, playing music is really well.
But I can't get BPM...

how can I get BPM??? I don't wanna see 'BASS_ERROR_ILLTYPE' anymore..

is there something wrong to use the function BASS_ChannelGetAttribute?
Logged
Ian @ un4seen
Administrator
Posts: 15363


« Reply #1 on: 28 Feb '12 - 14:47 »
Reply with quoteQuote

The BASS_ATTRIB_MUSIC_BPM attribute only applies to "HMUSIC" channels that have been created via BASS_MusicLoad, that is tracker file formats like MOD/XM/etc. If you would like to detect the BPM of stream file formats, you could take a look at the BASS_FX add-on and its BPM detection functions.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines