Hello! I’m using C++ .Net 7.1 in a Win32 app. I’m quite joyous at the ease of getting the DSP working to get the frequency amplitudes of a playing sample by using FSOUND_DSP_GetSpectrum(); However, I’d like to have free reign over which time slice I’m analyzing of the sample. I’ve never used FMOD before this, so I really have no idea what to do. Currently all I can do is get the spectrum of .. whatever is playing right? While it’s playing. I’m looking to analyze the frequency spectrums of really long files, but hopefully without having to wait for the whole thing to play 😀 I’d appreciate any guidance, hints, help! Thanks very much!
- Neff asked 12 years ago
I also use a 24x cd-rom in a laptop and can’t get much faster that 1x. But if I save the cd as an image and put it into a virtual drive (I am using Alcohol 120%) it will rip at incredible speeds. But surly reading off of a 24x cd-rom should be a little bit faster than 2x?
You’d think you can get faster wouldn’t you but I have now tested this extensively and it seems as though you cant stream from a CD much faster than 2X.
I guess I’ll have to live with it for now but perhaps it is something FMOD could look at? What do you think guys?
Can anyone please post an example-code of how to use FSOUND_Update() to make a Spectrum Analysis of a large wav-file in non-realtime. I don’t want to play the file in normal 1x speed to make the Spectrum Analysis.
The file is located on a harddrive and it’s too large to be loaded into memory.
And maybe someone can describe how the FSOUND_Update() works.
I would be really happy if anyone can write a small example in C/C++.
Firstly apologies for the hijack but this is relavent.
I have a simular problem to Neff in that I want to analyse sizeable samples in advanced of playing the samples.
I have tried using FSOUND_Update() but the speed increase seems to be fixed at 2x.
I am reading the data from CD and processor use is virtually 0 on both machines I have tested it on and the program speed is not limit by vsync or anything simular.
So I can only conclude that FSOUND_Update() is somehow limited.
Is it? and what limits it?
cd_stream = FSOUND_Stream_Open( filename, 0, 0, 0);
FSOUND_Stream_Play( 0, cd_stream);
//in your loop
spectrum_buffer_ptr = FSOUND_DSP_GetSpectrum();[/code:3gs0ixri]
hope it helps[/code]
I was able to do what Brett said (with a loaded sample, not a stream yet, though) with success. I can run through about 200 seconds of the song per second of running program at max speed, and this should be suitable for my purposes at the moment. So thanks Brett!
If I were to require even faster processing speeds, would I end up having to write my own frequency analysis code? I would imagine that I would have ultimately slower speeds if I did this anyway 😛
Good luck on your issue trager 😛
- Neff answered 12 years ago
YupI am streaming CDDA and I assumed that the speed of the CD drive would be the limit of the FSOUND_Update() function.
One of the drives Ive tested on is 24x and the over is much newer and should be about 50x.
So far I’ve only been able to analyse songs about twice as fast asual were as I thought I should be able to get at least 24x the speed.
Glad to see Jeff mangaged 200x I’m going to try and analyse something of the HDD and see how quick that goes maybe I’m doing something stupid.
What I gave you would not play the sound in real time and you would not be able to hear it.
It should allow you to analyse the stream many tens of times the normal rate. (unless you are using CDDA )
Please login first to submit.