Is there a way to render ridicilous amounts of graphs?

Hints, tips and discussion about graphics and user interface elements

Moderators: electrogear, exonerate

Is there a way to render ridicilous amounts of graphs?

Postby alphanimal on Mon Jun 14, 2010 10:24 pm

I'm trying to build a spectral pan/phase display (Tubular Bells.PNG)

Also can you look at the OSM attached and point aout any "mistakes" or things that could be done better?
Thanks!
Attachments
band_graph.osm
(3.37 KiB) Downloaded 137 times
16 band split.PNG
16 band split.PNG (31.62 KiB) Viewed 1580 times
Tubular Bells.PNG
Tubular Bells.PNG (721.03 KiB) Viewed 1589 times
alphanimal
essemer
 
Posts: 42
Joined: Mon Jun 01, 2009 12:57 am

Re: Is there a way to render ridicilous amounts of graphs?

Postby Disco_Steve on Mon Jun 14, 2010 10:52 pm

I have no idea how you have converted your audio into an array for plotting, but I bet you have simply used the. Mono to graph perim, and assumed that these will get triggered together unfortunately this is not the case, and you will need to buffer the audio in very clever ways to ensure that all the different feeds are plotted in sync.
I think your graphs will look much better once you have worked out how to do that. I need To Finnish some stuff to morrow, but I think I can find an ohm where I had to fix the not drawing in sync problem.

How to make the drawing efficient? The best thing would be to draw all the lines in a loop using the loop perm, and then only update the screen when the eye could notice a change, also remember that their is no point having more samples being plotted than can change without one video frame as you will be displaying the same data again if you do that. From frame to frame.

Once you have fixed these issues, I think you might have quite a meet little visualiser in your arsenal of

Helpful? It's been a long day!
Steve
- the future sounds better.
User avatar
Disco_Steve
essemilian
 
Posts: 396
Joined: Sun May 27, 2007 10:02 am
Location: UK

Re: Is there a way to render ridicilous amounts of graphs?

Postby aliasant on Tue Jun 15, 2010 9:04 am

I hink I made it so that all channels are drawn in sync but it only looks good if I use the ASIO Direct X Full Duplex.
If I use my MOTU ASIO at 48kz the image flickers a lot. I have always had this and hoped that Malc would fix it someday.
Never tried to use that Full Duplex driver and was pretty surprised when I saw how stable and nice it looks.

Made a video that shows the difference since it might not be the same for you guys.
I konw its a very ugly url....
http://martin.rodensjo.se/assets/Stable%20or%20not%20stable.%20Thats%20the%20horse/Stable%20or%20not%20stable.%20Thats%20the%20horse.swf

If anyone knows why it behaves like this I would love that insight.

Attached the osm as well so you can play around with it :)
Attachments
band_graph 2b.osm
(451.24 KiB) Downloaded 160 times
It's never to late to be late.....
http://martinrodensjo.smugmug.com/
User avatar
aliasant
smunatic
 
Posts: 2386
Joined: Sat Dec 30, 2006 5:49 pm
Location: Sweden

Re: Is there a way to render ridicilous amounts of graphs?

Postby alphanimal on Tue Jun 15, 2010 9:32 pm

Thanks for your replies!

Is there something like a bitmap buffer, where I can draw those lines and then make the bitmap scroll, instead of rendering the single graphs from the audio buffers?

also I'd like to make the band split with a variable number of bands (512 for example). Is there a way to process arrays of buffers?

I should propably go with a procedual programming technique.... but I'm not firm when it comes to low level graphics and the like.

@ aliasant: I'll take a look at your OSM now!

cheers!
alphanimal
essemer
 
Posts: 42
Joined: Mon Jun 01, 2009 12:57 am

Re: Is there a way to render ridicilous amounts of graphs?

Postby Disco_Steve on Tue Jun 15, 2010 9:54 pm

If you go above 16 bins, a more standard graphing technique will be your better bet, like an fft plot.
Ithink you will find that your approach becomes more and more useless as you have more and more bins.
I would recomend critical band frequency splits, so you will have 24 in total with each one giving a much more musical graph of what is happening

But yes their is a bitmap tool you can draw to and then render in a single triger, it's a great way to save CPU, however scrolling bitmaps is VERY high on CPU so it's probaly best to draw multiple bitmaps each a different distance along and then rernder each of those in turn, just like a movie, pushing the intier bitmap and then rerendering is really slow!!

Why do I keep posting near midnight! My brain never works properly at these times of day!

Steve
- the future sounds better.
User avatar
Disco_Steve
essemilian
 
Posts: 396
Joined: Sun May 27, 2007 10:02 am
Location: UK

Re: Is there a way to render ridicilous amounts of graphs?

Postby infuzion on Wed Jun 16, 2010 6:00 am

aliasant wrote:Attached the osm as well so you can play around with it :)
Nifty, thanks! Actually not too bad on CPU considering what is going on. Of course there is always room for improvement ;)
alphanimal wrote:Is there something like a bitmap buffer, where I can draw those lines and then make the bitmap scroll, instead of rendering the single graphs from the audio buffers?
MyCo's & my OSMs are what you need.
Need help? First search the forum & WiKi, then post in the help forum with a clear topic, request, & OSM. Then please WiKi the correct solution. If you want my personal assistance, I charge by the hour or for an exchange of services.
infuzion
smstar
smstar
 
Posts: 6163
Joined: Wed May 04, 2005 8:02 pm
Location: Earth, USA, CO, Denver

Re: Is there a way to render ridicilous amounts of graphs?

Postby aliasant on Wed Jun 16, 2010 8:24 am

infuzion wrote:
aliasant wrote:Attached the osm as well so you can play around with it :)
Nifty, thanks! Actually not too bad on CPU considering what is going on. Of course there is always room for improvement ;)
alphanimal wrote:Is there something like a bitmap buffer, where I can draw those lines and then make the bitmap scroll, instead of rendering the single graphs from the audio buffers?
MyCo's & my OSMs are what you need.



You know that you have to back that up now dont you ? :)
Prooooof I scream :)

Seriously. I didnt even try to make is fast. I just did what I normally do.
There are probably other ways then using 1 graph/channel and redrawing it all on every frame but what I aimed at was to get all graphs to draw synced. To be honest I dont exatly know why I succeded. I have to study it some more.

What I would like to know is if there is a way to draw ONLY the pixels that has actually changed since last frame.
That might mean, render the whole first frame, then prerender/calculate the current frame without redrawing and compare the pixels to the last frame and finally redraw only what has changed but I dont think we can do that fast. Or?
It's never to late to be late.....
http://martinrodensjo.smugmug.com/
User avatar
aliasant
smunatic
 
Posts: 2386
Joined: Sat Dec 30, 2006 5:49 pm
Location: Sweden

Re: Is there a way to render ridicilous amounts of graphs?

Postby alphanimal on Sat Jun 19, 2010 5:46 pm

I think it's generally not efficient. Comparing which pixels have changed requires much more CPU than to just draw the whole bitmap. Seems logical to me.

You as the programmer have to take care to render only the things that have changed.

I will probably try this kind of thing in C# (have worked with VST.NET already)
Just the DSP (filter etc.) and DirectX graphics are new to me.
alphanimal
essemer
 
Posts: 42
Joined: Mon Jun 01, 2009 12:57 am

Re: Is there a way to render ridicilous amounts of graphs?

Postby hansdump on Thu Sep 09, 2010 2:52 am

Vocoder?????
User avatar
hansdump
essemist
 
Posts: 95
Joined: Mon Feb 09, 2009 2:26 am


Return to Graphics

Who is online

Users browsing this forum: Google [Bot] and 0 guests