From the original SynthMaker forum (2004–2014), with its members’ names and dates.
McBarGig ·
This is probably an old question, but, has anyone ever been successful at dynamically skinning a project. Meaning all the bitmaps and such are loaded dynamically at runtime. Also is it possible to change the locations of knobs and things at run time?
KM
bootsy ·
that should be feasible.
McBarGig ·
Well bootsy the way I see it is the problem is going to be moving the controls around. Reszing, and loading the files in the frst place. Store a string in the presets that will store a path to a file that contains paths to the skin files...Is it just me or does that sound stupid?
Disco_Steve ·
start with something simple like the ability to change the background colour based on the value in a text file.
or for very starters depending on an option on the GUI.
once you've worked out how to do this (shouldn't take to long)
move on to the colours of sections, not just the background. and build it up bit by bit learning as you go. jumping into it all, head on, is going to be very hard and painful.
steve
philter5 ·
i´ve tried the move/resize part and it´s definitely possible
aliasant ·
I have been thinking about making a skinable plug. The idea was to have all the images for knobs, button, background and what nots as .png images in a folder that the plugin scans on load to get the images.
That means that anyone can go into that folder and start editing or replacing the images. I guess there needs to be some kind of backup here 😉 I havnt started working it out yet so if anyone else has and has input about this that would be cool.
McBarGig ·
It would be nice to have all Png images sored in a single zip file that can be read directly from in your plug. I have'nt looked into it yet, but I think There is asm code already written for reading and creating zips. I believe its called GZIP or something like that. We're not using the zip to save space, its being used as a holding tank of sorts. Its just that once you start adding tons of images, they can get out of control real fast. Be nice to have a central location that provides a single area for which to get all images fom. In your code you reference the same zip file all the time. Then changing skins would be as easy as renaming. We could just rename the ext to .??? and then we can use the filter for that extension when loading skins.
No need for an exta menu, and, No need for an extra file to point to a file that points to the images(If thats right). Which is an idiotic way of doing things. I'd like to start exploring more into the functions that can be provided through the asm component. There has to be more robust standard file functions hat can be provided through ASM code. First what would be nice is being able to call standard windows API functions like those found in common dialog for example, and just for a start, there is not much in Common dialog thaw we really need, but a good starting point. Being able to create standard windows menus, Pointers, etc.
I will be starting a skinning project very soon..
Philter you still got that code around for resize?
KM
philter5 ·
McBarGig wrote: I will be starting a skinning project very soon..
Philter you still got that code around for resize?
KM
sorry i´ve never written any code at all , 😕
i´ve tried another way instead but i am sure it is not the most
elegant way. when i am back home i will post a osm, perhaps
it can help you anyway. 😉
McBarGig ·
Great I'll look later. Also I'm in the middle of writing an application that will allow you to run your VST as an exe inside a standard windows program. This can be used to setup the Skin files and will allow easier access to windows file handling easier than inside the VST. So all the windows functions are there. I don't know how useful this will actually be, but I'll know more as I progress through it.
Also, Does anyone know how these OSM's are stored? are they encrypted or actually any info on this file type would help.
KM
philter5 ·
...try this, it´s just a small example of how i´ve used it in my project.
In fact just a preset manager, a knob that is connected to the Area XY input
of the knob (or whatever you want to move) thats it.
McBarGig ·
Thanks Philter, I'll check it out later and when I get the source for the skin manager I'll upload that, that will be a while.
KM
Disco_Steve ·
something like this is a start.
!!see latter for latest version!!
This is the standard vst, but with a background rectangle added.
on load, it loads the file c:\SM_VST_GUI_SETTINGS.txt
with this the colours can be set by the user 🙂
the first word is used to find the properties to be loaded. can be any text you want, but must be defined in the loader.
the colours are alpha, red, green, blue in order and must be three digits long.
the semi colon at the end of the line is not important, but I may add features that need it latter.
if the user deletes or edits the file incorrectly, then the incorrect the colours will revert to those set in the properties page on the rectangle background.
hope that helps?
Steve
McBarGig ·
Thanks steve. I'll check that out later...
KM
Disco_Steve ·
Darn you, I'm meant to be revising 🙂
I've updated it so there is an example of a user definable auto resizing knob image 🙂
along with the background colour scheme, and a user defined image.
the files have to all be in the folder where the vst is stored, or a user set temporary location during testing in SM.
you'll see what I mean when you open it up 🙂.
I think it works well, some of it is rather HACKY but it works ok for a first go 🙂
enjoy and feedback would be great.
The knob images need to be pointing to the right, for them to end up pointing in the right direction when inside the knob
Steve
!!See Latter for Latest version!!
I apologise for my poor art skills.
ow I forgot to mention;
if the settings file is missing the knobs load with the last used bitmap, and the background colour reverts to (the bad) defaults.
if the settings file is incorrect (syntax error or file doesn't exist), then the knobs revert to default, along with the colours
McBarGig ·
Steve, you rule! I just took a really quick look but will go over it in detail tonight. I was going to give you some feedback tonight when I finished doing some stuff to the original posting frm you. I was planning on posting what I did to it, But 'll post the next one that I do.
I'm going to write a Windows program that will allow people to skin based on a framework setup by our work here. What I need for this though is the address where the png files are stored in the .hom files. It would be nice to have a GUI where you can just drag and drop images and such and then it generates a file based on your postioning and files used. As far as the control names and number of them is concerned, I may be able to use a preset file to get that data. I need to see if it stores a control type in the preset file or just stores a name...I'll be looking into that tonight as well. I think thsi is a very worthwhile venture, as well as the other thing I want to work on mentioned below.
I found a treasure trove of C++ source code written especially for guitar amp modelling. It was as far as I can tell, written by a professor from Stanford. There is everything you need to creat a good sounding guitar sim. There is even a 12ax7 tube emulation. There is also some legacy guitar effects like a BOSS chorus pedal. Anyways, I don't know SM code or I'd do the port myself, I think these things would make a great addition to what SM already has.
Thanks guys,
km
Disco_Steve ·
Kool 🙂
so you were hoping to allow the user to change almost every aspect of the GUI!
I can add the ability to change the locations of things, using the example earlier in the forum, however if the synth is made in modular chucks, then within synthmaker those knobs can only move within the window they sit in, (if that makes any sense?), so when making the synth, you must ensure that all 'windows' fill the entire screen.
also is it possible to change the size of the window in a vst? if so that would be cool 🙂
what other elements would you like to be user definable? I've done a knob, a rectangle, and an image, any other preferences?
McBarGig ·
I can't think of anything off hand, But is it possible to make things visible or invisible at run time?
i'm trying to figure our a way of allowing the user to change from knob to slider,slider to knob. But that functionality I don't think is possible. Not sure how you get a Knob to become a slider after compile. Unless both were added and you just turned the one on that you wanted...
KM
Disco_Steve ·
I don't know either? I think the existence of both is what would have to be done 🙁.
here is a new version that lets you set the size of the image along with the location of the image and of the knobs.
I have changed the syntax quite allot.
any idea on a better or 'best' syntax would be great
this is all coming together quite nicely I think:)
!!See Later For Latest Version!!
McBarGig ·
What you were saying before about knobs being imbeded in side a module. Then trying to change the position of that module, but referencing the innside knob. I may be able to handle that inside my prog. or at least report to the user what is going on. I wish I could be more involved in this right now, but I've just got some stuff that absolutely has to be done. Its not for lack of interest though and all your help is greatly appreciated...
km
Disco_Steve ·
Okay this one has an example fader in it, which reverts to defaults.
I cant find a way for the GUI to know where it is placed in the view, while it is being moved around during development.
so I cant get it to dynamically update its default location, and store it, so that the object can revert to where it was placed within synthmaker (without the developer losing the ability to use the mouse for element placing during development!).
because of this, at present;
if settings are loaded, but the file either doesn't exist or has incorrect syntax, all the GUI will pile up at the top left corner.
if someone has any ideas on this that would be great 🙂
to reduce the confusion of multiple posts, would people prefer if I made a post that I updated the file to and updated, rather than uploading all differing versions, one after the other? if so I am starting that idea in the next post
I'm also struggling with draw order. is there a way to dynamically control the draw order, post 'render' to VST?
Steve
Disco_Steve ·
Latest Skinner OSM
McBarGig ·
K Steve I got my other project finished, While you're figuring the SM stuff I'm starting on the external Skin prog. I'll Look into those questions you have as well. Don't know If I'll get the answer as I'm not that good at SM gui stuff, but I'll tryu nonetheless.
KM
Wrote something here? To have a post removed or your name hidden, write to [email protected].