SynthMaker

How measure png file load on CPU

Archive · 2007 5 old posts

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

Hlis93 ·

I am using many Bitmap (PNG actually) and animated knobs in the synths that I am currently working on. I have been doing some experiments to see if I could reduce CPU consumption by loading one bitmap and then sending to all knobs that will use this. I have also made the indication, label and marker universal as well by sending just one set out to all knobs that will use this.

I don't know how to test this to see if it makes a difference?

My assumption is that by having only one bitmap loader contianing this information as oppossed to 45 bitmap containing this information it might reduced CPU. Of course, that is an assumption there might be some built in aspect of SM that checks this and shares this information already (hence its already CPU friendly concerning that...I know that reaktor does this), but I did not see any reference to it in the manual or componant referance, or by forum search...doesn't mean I didn't miss it.

This is what I see on the task manager with a 2 osc, 1 sv3 filter (lp), two stock envs, set to 1 voice (mono). The graph to the right is my experiment, the one to the left is the synth loaded with the bitmap on each knob.

[url]

Any ideas how to measure this?[/url]

oddson ·

You might reduce file size but not likely CPU usage.

Bitmap loaders can/should be made purgable so they won't even make larger exported dll/exe files.

Most of the CPU draw is from the redrawing of the images and not from storage and data retriaval (AFAIK).

About the only savings I can see is not having the actual bitmap stored repeatedly throughout the schematic. But you may have more CPU impact from having a mechanism to load them where needed.

I can't see this being worth while.

Loonie ·

I can see such a measure saving memory, but the CPU is still going to have to render each controller anyway.

If one were to use uncompressed BMP instead of PNG, it might remove a little of the required processing load each controller exhibits, since the image data is already decompressed. Of course, you'd lose the alpha functionality that PNG has, and your images will occupy considerably more memory. It's questionable whether whatever minuscule percentage of CPU one might claw back doing this was worthwhile.

In short, I agree with oddson.

Hlis93 ·

I was thinking it was not the best solution. PNG's are a must I need the alpha layer. Yet, even if I remove them all and make it part of the bitmap background, using controls that only a have an moving indicator, all it will do is reduce file size, since its the controler that is actually using the most CPU.

Am I getting that right?

aliasant ·

There is actually one thing that could be won by using this tech.

If you feel like changing the appearance of your 25, or so, knobs. You only have to load the new knob png in one place. That is if all knobs should look the same. But other then that tiny mini benefit I agree with the rest.

I tried this once and it wasnt really worth the hassle.

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.