Knob dimentions saved in PNG/GIF meta information

Suggest new features, components or other changes to the software

Moderator: electrogear

Does your GUI animation strips go...

horizontal
0
No votes
vertical
6
75%
sometimes horizontal, sometimes vertical
2
25%
 
Total votes : 8

Knob dimentions saved in PNG/GIF meta information

Postby infuzion on Wed Mar 24, 2010 9:32 am

I was just looking inside a knob, & noticed that the knob system that kirkagur & I have reduced from SM's that each knob calculate the strip size & positions at start up. Not an issue for 1-4 knobs, but when you have 30 knobs in a VST, things can start to be worth reducing.

I tend to use a single separate Knob Strip Loader connected via wireless to make it easier to change out the knobs quickly. However, I don't presently use wireless for things that should be calculated only once rather than on a per-knob basis:
Cell Count (number of animations)
Cell Area (static)
Grid height & width
However, I think this info is best stored in the graphics file, & retrieved via a new/revised Animation Bitmap primitive. Until then, how do people build their GUI animations; is each cell joined vertically or horizontally please? Is there already a meta tag for any of this info (cell size, count, direction, etc)?
cheers
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: Knob dimentions saved in PNG/GIF meta information

Postby Acrobat on Wed Mar 24, 2010 10:41 am

That could be useful.... :D

Knobman align cells vertically by default, of course you can change it but most people rely on the
default method, as I've seen in lots of examples here on the forum.

When preparing the math, consider that as long as the CELL (was: strip) has a square form,
Cell Count and Cell Area are not needed as the are values DERIVED from Width and Height of the strip.
When the cell is rectangular (example Sliders) the simplyfing trick will not work.

A.
Last edited by Acrobat on Thu Mar 25, 2010 5:34 pm, edited 1 time in total.
User avatar
Acrobat
smaniac
 
Posts: 1660
Joined: Mon Jun 04, 2007 10:50 pm
Location: Roma, Italia

Re: Knob dimentions saved in PNG/GIF meta information

Postby trogluddite on Wed Mar 24, 2010 5:20 pm

Likewise, I use vertical because it is the knobman standard.
It ought to be relatively simple to make a module that parses the info from the filename. So your file would have a name something like 'Myknob v10 x30 y40', meaning '10 frames arranged vertically, 30 by 40 pixels'. In fact, you could work out the number of frames and their arrangement once you know the frame size anyway, and simplify it to 'Myknob 30x40'
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: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Knob dimentions saved in PNG/GIF meta information

Postby infuzion on Wed Mar 24, 2010 5:46 pm

Ty Acrobat for the insight!

trogluddite wrote:It ought to be relatively simple to make a module that parses the info from the filename. So your file would have a name something like 'Myknob v10 x30 y40', meaning '10 frames arranged vertically, 30 by 40 pixels'. In fact, you could work out the number of frames and their arrangement once you know the frame size anyway, and simplify it to 'Myknob 30x40'
That's a good idea! We just have to make sure that "v" is not used for "version".
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: Knob dimentions saved in PNG/GIF meta information

Postby trogluddite on Wed Mar 24, 2010 6:58 pm

Got a parser for the 'Myknob 30x40.png' format of file name working - I'll try to extend it to work out the number of frames (sorry, can't post attachments in Ideas and Requests - I'll post up the fulll thing elsewhere when finished)
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: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Knob dimentions saved in PNG/GIF meta information

Postby MegaHurtz on Wed Mar 24, 2010 7:18 pm

If it`s a square image you can work it out by size alone.
Visit my website at: http://www.schlukhash.nl
User avatar
MegaHurtz
smaniac
 
Posts: 1514
Joined: Mon Aug 11, 2008 5:29 pm
Location: Eindhoven/Netherlands

Re: Knob dimentions saved in PNG/GIF meta information

Postby trogluddite on Wed Mar 24, 2010 7:20 pm

Cool for knobs but square sliders look a bit silly ;)
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: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Knob dimentions saved in PNG/GIF meta information

Postby stw on Thu Mar 25, 2010 10:03 am

MegaHurtz wrote:If it`s a square image you can work it out by size alone.


You can always work it out by size.
If real x is greater than parsed x it's a horizontal allignment. If y is greater than it's vertical.
Devide the size by the parsed single size ad you'll get the frames.
stw
smanatic
 
Posts: 639
Joined: Mon Jun 30, 2008 2:55 pm

Re: Knob dimentions saved in PNG/GIF meta information

Postby trogluddite on Thu Mar 25, 2010 9:24 pm

Got halfway to that solution, then got distracted by another possibility. :S
I'm going to try making it so the animation frames don't even have to be one single strip, but an X,Y grid of frames.
For a normal knob you could read them like a book a line at a time. That's maybe not so useful, but you could also select the X and Y seperately and have a bitmap display with two dimensions - to show a little frequency plot from the frequency and resonance for example. I'd just really like to see if that's more efficient than using vector graphics.
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: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Knob dimentions saved in PNG/GIF meta information

Postby infuzion on Fri Mar 26, 2010 4:20 am

trogluddite wrote:I'm going to try making it so the animation frames don't even have to be one single strip, but an X,Y grid of frames.
My idea of standardizing either vertical or horizontal is to reduce coding (the number of divides), while this idea will increase coding. I do have another idea for XY grid for animation though.
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: Knob dimentions saved in PNG/GIF meta information

Postby trogluddite on Fri Mar 26, 2010 1:16 pm

infuzion wrote:My idea of standardizing either vertical or horizontal is to reduce coding

Oh yes,like I said, for normal 'one dimensional' knobs, not very useful - the knobman vertical default seems pretty well accepted as standard. But for two dimensions, there shouldn't be significantly more code than extracting X and Y from one very very long strip (whch would definitely need an extra divide). Also, the divides should only have to happen once when the bitmap is loaded - a S&H just after stops them getting re-calculated during animation.
Could be done with a bitmap array of single strips I suppose, need to test to see how efficient the two methods are - but that would mean a lot more bitmap files to manage on disk when doing the design work.
Just need nice software to do X,Y matrices of frames - it's taking me an age to stitch together an example animation in photoshop, and the animation I want isn't suitable for doing in knobman - anyone know of software for this, or a photoshop script, maybe?

Anyway the whole X,Y things is probably is little off topic - I'll move it to another thread when I have something.
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: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK


Return to Ideas and Requests

Who is online

Users browsing this forum: No registered users and 1 guest