0
0

Hi.

I use the GetSpectrum to show 32 spectrum bars.

Can anyone help me with which frequencies I should include ?

Only taking the first 32 values is not the best solution I think.

And can anyone tell me how these frquencies are related to the 512 values returned by GetSpectrum ?

I looked in the documentation, and if the output rate is 44100 then the value interval would be 22050 / 512 = 43 Hz

Am I way off here ?

But the most important issue is input on the values I should include in my spectrum bars.

David

  • You must to post comments
0
0

Hmm, what do you mean by gravity dropoff?? I would be very interested in seeing your code, currently the code I use is a little unreliable and it doesn’t perform as good as I would like it too. Thanks.

  • You must to post comments
0
0

Hi Wilksy.

Still waiting for the code ๐Ÿ˜†

And I will contribute when I have a better library.

David

  • You must to post comments
0
0

Blitting is acutally slower then using rectfill, and other api draw routines. If you go with a do loop its better to use sleep(x) api then in a constant loop, otherwize you will eat up lots of cpu constantly. A good engine might do something like…

[code:ry97tkuc]
Do
x = GetTimer
Do Drawing...
xx = GetTimer
xxx = xx – x
sleep(xxx)
Loop
[/code:ry97tkuc]

This will cause the app to sleep for the same amount of time it takes to preform the drawing, Thus for slower comps it wouldn’t eat mass cpu time, you could further expand the rountines to use less cpu based if it is a extremly fast machine, ect…

As for speeding up your drawing routines, you might want to look at the DirectX SDK, or other such Graphics SDK’s.

Just a thought.

++Cire.[/code]

  • You must to post comments
0
0

Read through this post:
[url:3b2bf7i3]http://www.fmod.org/forum/viewtopic.php?t=986[/url:3b2bf7i3]

There is a reply in there explaining how to simplify the spectrum values to give you only 16 or 32 values.

  • You must to post comments
0
0

Thanks for the Speed advice, i’ll give that a shot soon. I use the blt function rather than recfill because i can get nice gradients and then even the eq display is skinnable,( if your into that thing), Re: the Gravity dropoff, if you pump the normal specturm into say 30 bars jumping up and down, it looks good, however i wanted a smoother display, so i made the bars will gradually decend after peaking until a highter value is received, the effect is the whole display will jump around in time to the music, and yes it might not be as acurate , but it looks very nice. Also i’ve taken to manipulating to values – Thats is-adjusting each bar according the values of the bars next to it. This way the eq will be nice and smooth and rounded. I think i’ll have to post i piccy and the code. You’d be suprised how fast this runs in vb. oh – my pc specs are p3-400, 128megs,1 inch dust.

  • You must to post comments
0
0

Yes, I tried that one…..but it uses an extreme amount of processing power.

70% on my machine, 25% without.

So any other suggestions ?

David

  • You must to post comments
0
0

Lol, 1 inch of dust. hehe. Yeah, I do somewhat of the same thing with my VU, because if I just output the raw values it goes way too fast and sloppy. But, I think the spectrum I have is smooth enough, so I kept it like that. Also, I think blitting it would decrease speed so my bars are a solid color.

  • You must to post comments
0
0

[quote="David":z7vo42bu]Yes, I tried that one…..but it uses an extreme amount of processing power.

70% on my machine, 25% without.

So any other suggestions ?

David[/quote:z7vo42bu]

If you use delphi, see the code I put in this forum….

  • You must to post comments
0
0

Hi Wilksy.

I sent you an email requesting the code for the spectrum analyzer.

Could you mail it to me ?

david@de-bono.com

Thanks,
David

  • You must to post comments
0
0

Hmm, it works fine on my computer. If I have the Spectrum on the CPU usage is usually about 12-15%.

Heres my specs:
PII 233 mhz
96mb RAM
Windows 98

My computers old and the spectrum runs pretty fast…

  • You must to post comments
0
0

I would also be interested in seeing your code. Thanks!

  • You must to post comments
0
0

Gabriel,

You were right, and I was wrong ๐Ÿ˜†

I have a big spectrum window function in my program. When using the small one, it uses 7-8%, with the big one it uses 27-33%, and in full screen 75-80%

I use a PIII-450MHz
Windows XP
640 MB RAM

So it seems like it’s the FillRect routine that’s slow.

Any suggestions how to speed this up ?

  • You must to post comments
0
0

To the people who requested the spectrum or scratching effect code, please be patient, had a heavy weekend with my mate Jack Daniels and his sister Sambooka. Computer remained OFF whilst in recovery. I don;t bother with the Internet thing at home, Will post the stuff tomorrow.

…RE….Anybody done any serious Audio development with fmod like building a sample sequencer etc, have started development of a 16 track audio sequencer . Everybody just seems to be trying to build the perfect MP3 Player? (pst. it’s been done!)

  • You must to post comments
0
0

Well, fillrect is a lot faster than internal VB functions I think. But if you want to try it out you could always mess around with the Line function of VB. And also, If you are using the Timer control for the spectrum analyzer, you might try using an API timer, which are a lot more reliable than VB timers.

  • You must to post comments
0
0

Yeah, lol. I believe the perfect MP3 player is Sonique, which is not powered by FMOD. It uses AudioEnlightenment, which is a kickass mpeg decoder written by Tony Million I think… Anyways, I’m not really trying to make the perfect MP3 player, I’m just working on it because I’d rather use a program that I wrote and know what’s in it than some 3rd party program with spyware and crap like that.

  • You must to post comments
0
0

I use a API timer.

Also using the Rect API function.

If there are any graphics wizards out there I would appreciate input. I got the processor load down to around 50% when in full screen (looking in the task manager)

  • You must to post comments
0
0

Wise word’s indeed Mr Android.

I guess i’ll start sending my code out now, i got 25 requests, and yet nobody contributes to the forum???

….anyway back to work

  • You must to post comments
0
0

You could probably gain some speed if you used BitBlt to blit the spectrum analyzer to your picture box instead of using FillRect, a lot less code as well.

  • You must to post comments
0
0

[quote:sozbo5so]
…I got 25 requests, and yet nobody contributes to the forum???[/quote:sozbo5so]

What do you mean by this???

  • You must to post comments
0
0

This may not be the best way to create a specturm, i’ve been using fmod in my own player for awile. My spectrum runs in a constant loop . Ie

loopStart:
~Draw some stuff

Doevents

goto loopstart

I also use Bltbit to construct my specturm, I also calculate a nice gravity dropoff and an option to smooth the apperance of the display, looks very nice and fast as hell. Email me @ wilksy101@hotmail.com is you would like the whole source -code,

Wilksy

  • You must to post comments
Showing 1 - 20 of 21 results
Your Answer

Please first to submit.