having fun with kvr developers

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

you know, i realise it's simply a nonplus for someone to say "but i don't have that file",

i'm sitting here looking at the ui editor app trying to figure out how to put the text options in the option menu object. absolutely no clue. maybe a "title=" tag when i put it in text. it's like trying to tame a forest with a box cutter. maybe all day long, i can figure out how to make an on/off button. that's how it goes.

and you'd think there'd be something online, somewhere, "how to make a list entry" "how to make a knob" it's nice that they have some generic functions for that but dang i'd love to just be able to draw on the screen and detect a pointer on the screen.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

mystran wrote: Sat Dec 11, 2021 3:58 pm
S0lo wrote: Sat Dec 11, 2021 3:06 pm Admittedly, there might be things that VSTGUI won't help you with. (Example: drawing nice cables on screen). Then you'll have to fall back to the OS (and do it per OS). Otherwise, the big chunk of it, like knobs, sliders, containers, frames, labels etc. can be handled well with VSTGUI. It's designed for it.
No, seriously... use some modern toolkit like JUCE or iPlug or whatever that actually supports the stuff you want.. or use a library like nanovg that is more or less trivial to wrap around any API that can push some polygons...
Yeah, That is the simpler and better option as it seams. But xoxos here seams to be already getting into VST3, So VSTGUI would be the closest neighbor. I don't suppose you mean use VST3 then use JUCE for UI only?!!. Probably not.
mystran wrote: Sat Dec 11, 2021 3:58 pm...and even if you choose to instead use native OS functionality, then really the only think you should do against the native API is wrap it into some sort of interface that you can also implement on whatever other OS you want to support. There's like absolutely zero good reason to ever do any high-level things like "drawing cables" by poking native APIs directly.
See if you're going to wrap an interface of your own around multiple OS APIs and make it efficient. Then you're already an expert who have already tried at least one GUI API extensively. Which I don't think is the case with xoxos here. (all respect to xoxos)
Last edited by S0lo on Sat Dec 11, 2021 6:44 pm, edited 1 time in total.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

xoxos wrote: Sat Dec 11, 2021 4:38 pm you know, i realise it's simply a nonplus for someone to say "but i don't have that file",
https://steinbergmedia.github.io/vst3_d ... index.html

Check the section "Class Hierarchy"
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

i'm looking locally at ../VST_SDK/vst3sdk/vst3_doc/vstgui/html/create_your_own_view.html
Create your own view for the WYSIWYG editor in VSTGUI
which appears to discuss a simple way of creating your own graphic region (the example uses DrawLine so i suppose points and circles are supported) which then appears in the drop down options in the ui editor. i've managed to usurp the text for a knob and for a text label but keep failing on a button.

but i'm guessing this is intended to be the way to display a custom region for say spectral data or what have you.
#include "vstgui/vstgui.h"
#include "vstgui/vstgui_uidescription.h"
#include "vstgui/uidescription/detail/uiviewcreatorattributes.h"
#include "MyControl.h"

thanks i'll have a look at that now.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

I found that most (read: ALL!) cross-platform graphics libraries were like using a 30-pound sledgehammer to kill a fly. I ended up writing my own backend for Windows and Mac.

I tried an OpenGL backend at one time using nanoVG and found it took as much time as just using Cocoa/GDI. The only speed up I got was from scaling as the GPU handled that. I still had to draw the GUI on the CPU. Since Apple just then decided to deprecate OpenGL for Metal, I dropped it until there was something better.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

i'm generating this for on off button

Code: Select all

					"COnOffButton": {
						"attributes": {
							"class": "COnOffButton",
							"default-value": "0.5",
							"max-value": "1",
							"min-value": "0",
							"mouse-enabled": "true",
							"opacity": "1",
							"origin": "230, 110",
							"size": "20, 20",
							"transparent": "false",
							"wants-focus": "true",
							"wheel-inc-value": "0.1"
						}
but mystified as to where to eg. describe its postulated visiblity, i can't get it to be visible with a 0 or a 1 set with the default editor. is it intended to be used with some kind of more visible indicator module?
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

If your button is on or off, what does the .5 default value represent? :)

Seeing this hideousness makes me feel better about the hideousness my GUI uses to describe it.

Sorry I can't answer your question...
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

It's also worth while looking at Nanovg before making a final decision on the UI.

Also, There is only one situation where I think DirectX may make sense in your case more than VSTGUI. That is:

1. If you are 100% sure that you don't want to and will never port your code to mac or linux. Such as, if your doing this as a hobby, freeware or your employer just doesn't require it.

2. AND if you trust Microsoft to be more backward compatible than Steinberg. Truth be said, although Microsoft did throw GDI+ away, they only (as it seams) stopped support for hardware acceleration (silently if I may say). GDI+ does still work today!!. As opposed to Steinberg when they moved from VSTGUI3 to VSTGUI4, loads of things just didn't work any more. If Steinberg does that again moving from VSTGUI4 to potential VSTGUI5!!?? then.... ouch. Although somehow I doubt that they will do that after all the heat they got from the community.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

S0lo wrote: Sun Dec 12, 2021 9:15 am Truth be said, although Microsoft did throw GDI+ away, they only (as it seams) stopped support for hardware acceleration (silently if I may say). GDI+ does still work today!!.
GDI+ has never been accelerated, you're confusing it with GDI (the native API), which was no longer accelerated in Vista 'cos the new driver model dropped the traditional 2D acceleration stuff that IHVs were (supposedly) forced to emulate in their drivers.. but then when it became apparent that Vista's GUI performance was worse than expected, some basic acceleration for the more important stuff (eg. things like bitmap copies I guess) was reintroduced in Win7... but like none of this has anything to do with GDI+ which is just a library no different from any other library.

Post

mystran wrote: Sun Dec 12, 2021 9:47 am
S0lo wrote: Sun Dec 12, 2021 9:15 am Truth be said, although Microsoft did throw GDI+ away, they only (as it seams) stopped support for hardware acceleration (silently if I may say). GDI+ does still work today!!.
GDI+ has never been accelerated, ............
Read here:

https://docs.microsoft.com/en-us/window ... -gdi-start

It says: "Applications based on the Microsoft Win32 API do not access graphics hardware directly. Instead, GDI+ interacts with device drivers on behalf of applications"
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

sorry wrong post
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

that's the script that steinberg generates. i then turn it into the format i find preexisting in .uidesc

Code: Select all

	<view class="CKnob" control-tag="octave" origin="25, 40" size="49, 49"
		opacity="0.5"	corona-color="~ GreyCColor"	corona-dash-dot="false"
		corona-inset="5"	corona-line-cap-butt="false"
		corona-outline="true"	corona-outline-width-add="0"
		handle-color="~ WhiteCColor"	handle-line-width="7"	skip-handle-drawing="false"	value-inset="14"
		transparent="true"
	/>
	<view class="CTextLabel" origin="29, 20" size="40, 20"
		font-antialias="true" text-alignment="center"	text-outline="false"
		title="octave" opacity=".65"
	/>	
that makes a decent "octave" knob and label for the control. i've failed (two days fruitlessly invested in this) to implement a button or any kind of non-knob display since the only way i have to discern the script is to get the ui app to spit out an example, and i don't understand how you're supposed to make the button control work with it apparently, or which control is appropriate for a text list like modulation assignment, polyphony or filter selection.

ideally i'd use gdi because srsly i am never going to develop for another os beyond windows, it's nice of you to think that way but it took me a decade to flip $200 for this laptop. if someone could say, which function i am supposed to put gdi graphics commands in then i could do that i guess, but maybe that's not how it works.

one thing i'm trying to figure out is why saved presets only load the first two params. there seem to be two different places where parameters are loaded. my getstate and setstate in propcessor.cpp look like this:

Code: Select all

tresult PLUGIN_API knotProcessor::setState (IBStream* state)
{
	// called when we load a preset, the model has to be reloaded
	IBStreamer streamer(state, kLittleEndian);
	float savedParam1 = 0.f;
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	poly = savedParam1;
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	octave = savedParam1;
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	bend = savedParam1;
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	glide = savedParam1;

	return kResultOk;
}

//------------------------------------------------------------------------
tresult PLUGIN_API knotProcessor::getState (IBStream* state)
{
	// here we need to save the model
	float toSaveParam1 = poly;
	IBStreamer streamer(state, kLittleEndian);streamer.writeFloat(toSaveParam1);
	toSaveParam1 = octave;	streamer.writeFloat(toSaveParam1);
	toSaveParam1 = bend;	streamer.writeFloat(toSaveParam1);
	toSaveParam1 = glide;	streamer.writeFloat(toSaveParam1);

	return kResultOk;
}
these variables are declared in processor.h:

Code: Select all

protected:
	Steinberg::Vst::ParamValue poly = 0.;
	Steinberg::Vst::ParamValue octave = 0.5;
	Steinberg::Vst::ParamValue glide = 0.;
	Steinberg::Vst::ParamValue bend = 0.;
i guess declaring a variable as a "steinberg variable" enumerates it for whatever it's doing in this next thing.

i've got this business going on in controller.cpp:

Code: Select all

tresult PLUGIN_API knotController::setComponentState (IBStream* state)
{
	// Here you get the state of the component (Processor part)
	if (!state)
		return kResultFalse;

	IBStreamer streamer(state, kLittleEndian);
	float savedParam1;

	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	setParamNormalized(100, savedParam1);//repeat for each param
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	setParamNormalized(101, savedParam1);
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	setParamNormalized(102, savedParam1);
	if (streamer.readFloat(savedParam1) == false) return kResultFalse;	setParamNormalized(103, savedParam1);

	return kResultOk;
}
i'm just following instructions, i'm not thinking too deeply about what "state of the component (processor part)" means, or how it is different from loading patch parameters, but i do know that when i load a patch, only poly and octave are set to the stored values, the others zero out.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

My experience is limited to VSTGUI3. Something like this:

Code: Select all

COnOffButton *kbut;
CRect r(CPoint(10,10),CPoint(50,50));
const long tag = 100;
CBitmap *bitmap;

bitmap = new CBitmap("image.png");  // or somthing like that
kbut = new COnOffButton(r,listener,tag,bitmap,COnOffButton::kPostListenerUpdate); 
addView(kbut);
Not sure how that would be in VSTGUI4
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

thanks, i don't know how far it will get me either but thank you anyway,

eg. atm i'm becoming aware that sample accuracy for parameters requires ungauged amounts of crap (at least making sense of a source that seems to be in part duplicate with no explanation). i thought updating input was handled in the loop with pointers the same as outputs in vst2, being familiar with what i thought was a similar setup in synthedit's sdk, but now i'm trying to invoke something i can't estimate the size of because the instructions say "go check the source for aGain sample accurate edition" which is one undertaking. i know they've made it more complicated but i can't tell how much it requires restructuring everything you've already written just to do the one thing yet. it really exhibits the dystopian theme sdk update discussion can tend towards. i was real alright with *in1.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

i have managed to get to the point of implementing a "unique audio algorithm" from the paul bourke 3d knots in vst3 with rotation for continuous oscillator variance. but boy i tell ya this experience is uninspiring, SE was such a doddle to use. without "sample accurate parameterisation" it's pretty terrible to actually use. i'm sure obscuring all the useful things to know is just some kind of gentlemanly challenge.

it's just the type of thing a real software developer would anticipate - no amount of typing in all those ridiculous headers is going to validate ProcessDataSlicer slicer (8); because it's just not in anywhere. i'm a real person. i really read, that there is no mention of how to qualify that instruction to your compiler. just you'll figure it the f**k out i guess huh.

if you're going to show people how to add a thing you need to, show, people, where, to, add, a, thing. say the necessary headers. in text. in one place. because i just can't infer why nothing i do validates anythingslicer from not being explicit.

i constantly feel like i'm being tested for some aryan club where you properly know what unmentioned things are to be expected of you. no. when you give a tutorial, list the header, and then say the things, there, in the one place. i don't want to have to show up at a social club to have someone touch me on the shoulder and say "silly, didn't you know?" like that's a valid dissemination ontology. jesus it is gonig ot cost weeks and weeks of my life to add stupid parameters that don't zipper and really respond on a piece of software it should take me half a f**king hour to drop. and that's if i'm lucky.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post Reply

Return to “DSP and Plugin Development”