SynthMaker

any tips on reducing graphic CPU ?

Archive · 2006 15 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

angstrom ·

Hi, I have had a few problems recently with graphics in synthmaker projects where I think I am doing fine for CPU until I look at taskman and see that even simple graphic redraws are causing huge leaps in usage .. IE 0 % to 80% .

here's an unfinished example that exhibits the issue. It's going to be a dropdown menu but right now simply rolling up and down the options could slow a DAW down! synthmakers internal CPU meter only seems to register the audio path usage, but get taskman up and then quickly move the mouse over the menu items repeatedly. I get around 70% peak on that.

does anyone have any tips on reducing this massive use when doing graphics? Obviously an 80% spike when simply selecting from a menu is not going to cut it in a softsynth or effect.

as a note - I try and use redraw area where possible and call redraws only when necessary, but still I get issues.

infuzion ·

I don't have much experience with the View Loop; I'd make another version w/o it to compare (I'm courious also).

I usually just swap colors of items to show highlighting with a String Switch or Selector. Here's my Trigger Flipper:

I suspect swaping out the entire View as you've done isn't the most CPU efficent; I'm just updating, like a value readout.

sambean ·

Can't test now, but a good debug technique is to attatch a counter to the trigger signal to the redraw then start fiddling with the controls, you should get a reasonable value only in the redraw sections necessary

skOre ·

I'll go with inf here - lots of redraws and loops can really eat lots of cpu. if you fix some of these things, like making a static amount of options, it will most likely run a lot better.

angstrom ·

Hi guys, I didi test on this one without the loop - simply by removing the V connection to the loop container, but I also tried deleting it completely. It didn't change much!

That leaves us with a blue highlight box & text which only redraws when the int changes, IE when we go to 'next box' it moves the box and redraws. so I think that would be the minimum (one redraw a selection), yet it is still very high on CPU usage.

stefan ·

I tried hooking up a counter to the redraw trig. You redraw the entire thing every time the mouse is updated, regardless of if the display changes or not. Maybe you could filter the redraw triggers so that you only redraw when the value actually has changed?

angstrom ·

thanks, a good debug idea there. I thought I was only passing trigger on change , that connecting Integer to trigger would only update when the Int changed - but you are right the mouse moves are passing through too.

that seems odd, but probably necessary in some circumstances.

I'll try and eliminate those passed-through events. I can think of a complicated way, but the simple way (trigger block) seems to stop all my value changes so that won't work 😕

sambean ·

This may help 😉

http://magalov.myweb.hinet.net/toolkit/ValCngTrig.osm

Cheers

Sam

angstrom ·

aha, yes I can see myself getting a lot of use out of those. Thanks Sam!

😀

Kabel ·

iam realy new to sm (since yesterday) and from this reason not deep enough into it, to fix it with your tips.

so, please, has anybody an example (a complete knob) where it is implenented allready?

btw: i guess this redraw-bug is into the whole sm-code: the loop-slicer example (white the "moving" seqeunzer) needs permanet this much cpu, or if you move your mouse into any schematic, you get the same horrobil cpu-peaks. (only shown in the windows-meter, not in the sm-meter).

sunsynth ·

I look 4 a Level-Meter so i found Unk's LM...

If i'm inside the Comp. Module and disable the Tick25 it uses 25% CPU-Power in my Taskmanager (Hole Appl.)

If i enable the Trigger it uses around 38%

When i go back to main appl. it now uses nearly all CPU (95%) - Power... :-(

Is sm only good 4 static Graphic???

Are there plans to optimize this?

luisi ·

Is sm only good 4 static Graphic???

nope,

The Sonic Ball: a fun toy

that's a simple example

Tom7777 ·

Is sm only good 4 static Graphic???

No of course not the tick25 and tick100 can be used for movement just like luisi says as well as many other things.

When i go back to main appl. it now uses nearly all CPU (95%) - Power... :-(

This sounds like a bug though and yes i hope the graphic side of things gets optimized at some point myself. I have noticed CPU levels going up a great deal after leaving SM and returning to it later before and not just for graphics but for just audio as well so this is something i hope gets optimized also 🙂

malc ·

Hi sunsynth,

If you send me your schematic I'll have a look.

Malc.

sunsynth ·

Hi malc,

i killed my try to convert and optimize UNK's LED Levelmeters...

I'm 2 new in SM programming...

Every knob or slider i try in SM killed 2 much CPU Power in my Trial-Tests... :-(

I want to use up to 6 Levelmeters and Leds and > 6 Sliders plus knobs.

Automated Sliders and some knobs via MIDI (EC33) used simultaneous...

If you have Tips how i can optimize the CPU-Load - please let me know!

SUNsynth

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.