Draw overlaid animation only?

Hints, tips and discussion about graphics and user interface elements

Moderators: electrogear, exonerate

Draw overlaid animation only?

Postby nix on Tue Feb 14, 2012 10:23 pm

hey,
I have built a basic audio editor.
It has a cursor which is a line.
Myco helped me with a trick to draw just the line-
the area it is on and last area it passed,
triggered by tick25.
This works good.
I have a problem though.
Behind the line/cursor there is the waveform image.
As I zoom on the image to edit in more detail,
CPU used by the line goes up.
It is redrawing a more complex waveform.
Is there any way I can get SM to draw just the line-
and not the waveform behind it?
One workaround is to have the cursor in a blank patch
of space...
but the visual cue isn't as effective-
I would like an overlaid line.
hmm- can I render the 'drawgraph' out,
so it is not an intricate vector or something?
I can pm the .osm,
it's not open source.
All success 8D
User avatar
nix
smaniac
 
Posts: 1174
Joined: Wed Nov 02, 2005 11:25 am
Location: Australia

Re: Draw overlaid animation only?

Postby attic on Wed Feb 15, 2012 12:01 pm

can I render the 'drawgraph' out, so it is not an intricate vector or something?


I was just messing with the same the problem, in my tests the graphs do not render in the output vst. The graph I'm working with doesn't zoom but its still to cpu heavy. I don't know if its just my setup but in Reaper on Win7 64 I have not been able to render a drawgraph to png. It renders fine in the SM environment. I also considered placing the line in an empty area but decided against it ... visually it just wasn't as helpful a cue for the end user. I'm really underwhelmed by SM's graphic performance.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

North Bay Music Attic
User avatar
attic
essemilian
 
Posts: 472
Joined: Sat Feb 13, 2010 12:40 pm
Location: San Francisco California

Re: Draw overlaid animation only?

Postby infuzion on Thu Feb 16, 2012 3:33 am

There are other ways to optimize graphics-CPU speed. Such as slowing down the refresh rate; 10-20FPS is just fine for most cases. Seems my heartbeat system gives the most stable trigger flow for this range.
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: Draw overlaid animation only?

Postby attic on Thu Feb 16, 2012 8:40 am

Agreed .. your heartbeat system works well, yet even with that in place it takes very little to max out the cpu with GUI stuff. :(
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

North Bay Music Attic
User avatar
attic
essemilian
 
Posts: 472
Joined: Sat Feb 13, 2010 12:40 pm
Location: San Francisco California

Re: Draw overlaid animation only?

Postby nix on Fri Feb 17, 2012 2:49 am

I'm happy to solve my issue.
Thanks much stw!
It was an added view cache on my waveform,
that entirely minimized the cursor draw.
Now I just have to figure out how to make my zoom
always max at 1 sample, whatever length sample is in there.
I need to try and set up the cache myself,
to figure out what is entirely,
but I think it's that it renders to .bmp.

Thanks fer the redraws minimizing tip,
hmm,
the problem with that is that on zoomed samples,
the 25 is jumpy already.
I will look at the heartbeat system again,
essentially triggers are more accurate iterations?
not flurrying?

U r welcome to my schematic infuzion.
User avatar
nix
smaniac
 
Posts: 1174
Joined: Wed Nov 02, 2005 11:25 am
Location: Australia

Re: Draw overlaid animation only?

Postby attic on Fri Feb 17, 2012 8:34 am

OK ...but if the cache renders to bitmap does it actually work when you go to Vst? I have had issues with having a png render in Reaper, can you confirm that it will render the bitmap in a Vst?
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

North Bay Music Attic
User avatar
attic
essemilian
 
Posts: 472
Joined: Sat Feb 13, 2010 12:40 pm
Location: San Francisco California

Re: Draw overlaid animation only?

Postby nix on Fri Feb 17, 2012 8:59 am

Will render & run at 0% when zoomed on form here when exported as VSTi
in Orion 8.5 beta.
This is down from maxing a core.
Let me know if u want the cache module I have,
I think it's OK to share.
ooh!
I have had problems with graphics too,
generally I think it's pretty run of the mill to use a lot of CPU when moving controls.
This was too much though, how much the cursor was using.
I want to animate the waveform for another project,
a soft DJing program.
hmm, I'm not sure this will work there.
You can test my project if u like,
can pm it to you.
User avatar
nix
smaniac
 
Posts: 1174
Joined: Wed Nov 02, 2005 11:25 am
Location: Australia

Re: Draw overlaid animation only?

Postby attic on Fri Feb 17, 2012 4:18 pm

I have several projects eating cycle's like crazy even with the Heartbeat system in place. On one of the projects the reason is obvious, 10 autoknobs going so no surprise there. On the one that's similar to yours it renders a drawgraph at wav load but in Vst form it just show's a blank region where the wav should have rendered. It does render fine in Synthmaker and did cut the CPU usage down, so it would be nice to know why it won't render in Reaper.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

North Bay Music Attic
User avatar
attic
essemilian
 
Posts: 472
Joined: Sat Feb 13, 2010 12:40 pm
Location: San Francisco California

Re: Draw overlaid animation only?

Postby nix on Fri Feb 17, 2012 6:15 pm

hmm, I have sent u the project.
If, after chopping out stw's module,
it still won't display,
u can send me ur .osm if u like.
I hope this is your fix too.
I can try in Reaper.
User avatar
nix
smaniac
 
Posts: 1174
Joined: Wed Nov 02, 2005 11:25 am
Location: Australia

Re: Draw overlaid animation only?

Postby stw on Fri Feb 17, 2012 8:15 pm

Just to clarify (because i don't want take false credits) the used view cache module is part of "mwdlees" missing link toolbox. Though the method was introduced before and was already part of some older modules he organized and added some valuable stuff in that collection of useful goodies.

@attic: Maybe you have some purgeable modules inside your VST? E.g. a purgeable color picker prim could lead to these missing graphics.
stw
smanatic
 
Posts: 639
Joined: Mon Jun 30, 2008 2:55 pm

Re: Draw overlaid animation only?

Postby nix on Fri Feb 17, 2012 10:32 pm

that's cool it was ok to share,
should have cleared it though prolly.
Thanks so much mwdlee!
here is the component in question->
cache.png
cache.png (72.16 KiB) Viewed 1381 times

The flow doesn't seem that intuitive,
but I see now,
it draws the view onto the blank .bmp that's been created.
Such a neat device in my instance.
All success
User avatar
nix
smaniac
 
Posts: 1174
Joined: Wed Nov 02, 2005 11:25 am
Location: Australia

Re: Draw overlaid animation only?

Postby trogluddite on Sat Feb 18, 2012 1:53 pm

I don't think there is a fundamental problem with bitmap caches and Reaper - Reaper is my regular DAW, and I use the view caching method with a few of my projects without any display problems.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3024
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Draw overlaid animation only?

Postby attic on Wed Feb 22, 2012 2:24 pm

It looks like its just me with the issue. That's good! Means there is a fix. ;) Thanks Nix & Trog.
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

North Bay Music Attic
User avatar
attic
essemilian
 
Posts: 472
Joined: Sat Feb 13, 2010 12:40 pm
Location: San Francisco California

Re: Draw overlaid animation only?

Postby trogluddite on Wed Feb 22, 2012 7:22 pm

stw wrote:E.g. a purgeable color picker prim could lead to these missing graphics

Something similar that I just remembered - the 'Colour Switch' primitive (used inside some other modules posted on the forum) does not remember its value when a schematic is saved or exported. More details HERE.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3024
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK


Return to Graphics

Who is online

Users browsing this forum: No registered users and 0 guests