pouët.net

Synching FX with music

category: general [glöplog]
 
I'm using FMOD to play the music(mp3 format) and I'd like to synch some effects with it.
Does anybody have a link to a tutorial that explains the basics.

Thanks
added on the 2006-09-16 18:32:13 by duffman duffman
I think FSOUND_DSP_getSpectrum will give me what I need.
added on the 2006-09-16 21:55:41 by duffman duffman
duffman: syncing on spectrums alone is a bad idea, as they are quite unstable and unpredictable. coding proper beat-detection etc is really difficult. i suggest using skrebbels sync-tracker! oh, wait! you may not have access to that wonderful tool! too bad, sucker! 4h4hh4h4h4h4!
added on the 2006-09-16 22:29:52 by kusma kusma
Duffman: I did not have a look at FSOUND_DSP_getSpectrum but I guess it's the usual FFT stuff, which alone is not very good as kusma already mentioned it. At best your effects will look like those 90's trancey demos seen 50 times.

Try to implement some timeline based sync with events YOU define and initiate for given time indexes (along with some spectrum analysis driven events)
added on the 2006-09-16 23:34:38 by keops keops
It's not that hard to figure what/how to do it. Learn some music theory... :D
added on the 2006-09-16 23:57:25 by xernobyl xernobyl
some function like that:

Code: U32 CTimeline::QuarterBeatToMillisecs(U32 qb) { return (U32)(((F32)qb)*((60000.f)/(((F32)f32BPM*4)))); }


might be helpful
My suggestion is to avoid FMod's timing functions, they tend to be less-than accurate. Use timeGetTime() or something similar and code a quick time-line tool instead. It's not that time consuming, and it really pays off.

Oh, and also; mp3 playback tends to be a bit laggy on FMods sometimes, so you should use OGG instead. :p
added on the 2006-09-17 01:13:36 by wb wb

login