Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / I would like to create a waveform using darkbasicpro

Author
Message
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 1st May 2010 06:11
How can I create a waveform with zoom capabilities?

is it possible to draw greater than the screen size I mean to extend the width of the drawing off the screen?


I draw the waveform on screen then grab it as an image, but it wont let me go off the screen.


please help

thanks
General Jackson
User Banned
Posted: 1st May 2010 06:55
I dont know what a waveform is but to zoom use camera fov.

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 1st May 2010 08:40
It sounds like you already have some code written...? I assume that you're far enough to be able to grab the amplitude at a point in time in the song?

Basically... You can't just draw the ENTIRE waveform on the screen, and then grab it as one gigantic, long image. I think it would be faster to redraw the waveform every loop (I know that the built in DBPro line commands are very very slow. Look up Cloggy's d3dfunc dll. It has really fast line commands, I've had programs that went from ~10 fps to 100 fps+ using d3d_line). Basically, do something like this (in pseudocode)



something like that should work fine.


paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 1st May 2010 22:03
Easiest way i,ve found for making odd shaped images is to use a bitmap instead.You make the bitmap to the size you require,set it as the current bitmap,do all your drawing,grab the image then set the current bitmap back to 0 and do what ever you want with the new image.I use this method all the time for making textures at runtime and its reasonably quick,and if you save the image out you can then load it into other programs,or texture a plane or any other object and examine it from any position you want.

Login to post a reply

Server time is: 2026-07-26 04:28:10
Your offset time is: 2026-07-26 04:28:10