Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Adding Preset to Edit Box

For general discussion related FlowStone

Re: Adding Preset to Edit Box

Postby Perfect Human Interface » Mon Sep 08, 2014 7:18 am

I'm using the stock preset manager with the preset parameter primitive.

As per the manual: "The VST preset parameter system requires values to be floats in the range 0 to 1 . You must
make sure that you transform any values you want to store into this range before passing them to the
VST Parameter component. "
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Adding Preset to Edit Box

Postby billv » Mon Sep 08, 2014 10:43 am

Perfect Human Interface wrote:As per the manual: "The VST preset parameter system requires values to be floats in the range 0 to 1

Yeh, your right,thanks for pointing that out, although I don't understand it.
I've never had an issue pushing int's through. I always get int's back.
I've built dozens of synths with heaps of selectors for example, and they always have ints.
And this is using stock PM and VST Para prim.
I just don't get this 0..1 range restriction.

I'd really like to see an example of where someone pushes a int into
the VST Parameter prim using the stock PM, and can't get the same int back.
i can't re-create this error.

By all means, stay with the DSPR 0..1 thing.
Probably good reason for the restriction, but I'm not really interested in it.
I'm more interested as to why i can always get a result pushing int's through, if such a restriction exists.
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Adding Preset to Edit Box

Postby tulamide » Mon Sep 08, 2014 11:20 am

billv wrote:I'm more interested as to why i can always get a result pushing int's through, if such a restriction exists.
Because it's not a Flowstone restriction, but a VST restriction: "All parameters - the user parameters, acting directly or indirectly on that data, as automated by the host, are 32 bit floating-point numbers. They must always range from 0.0 to 1.0 inclusive, regardless of their internal or external representation." From the Vst Plug-Ins SDK Documentation. Paragraph "Processing Options"

Additionally an int can always be represented by a float, and Flowstone doesn't seem to check if the values are in the 0-1 range. So it's more of an advice than a restriction on the Flowstone side.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Adding Preset to Edit Box

Postby billv » Mon Sep 08, 2014 1:44 pm

tulamide wrote:more of an advice than a restriction

Ok.
It's just when they use the word "must", this implies a definite restriction.
DSPR use the same word in the manual.
Sort of all means I've been living in a 'loophole' all these years..
tulamide wrote:as automated by the host

Thought for a moment...hey, maybe that's where the grey area was.
Double checked but host still automates my selector.

I'm staying in the 'loophole" till the day i get an error.
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Adding Preset to Edit Box

Postby tulamide » Mon Sep 08, 2014 3:45 pm

billv wrote:It's just when they use the word "must", this implies a definite restriction.
DSPR use the same word in the manual.
I totally agree. This held me back from using any other values than 0-1 for quite some time. And I only accidentally learned that it works with any other value as well :?

I think this is something development teams call an inconsistency.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Adding Preset to Edit Box

Postby Perfect Human Interface » Mon Sep 08, 2014 9:23 pm

I feel uncertain about not following supposed VST specification even if it does seem to work... which it does. I tried changing everything to INT and it works fine now. Hmmm.
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Adding Preset to Edit Box

Postby billv » Mon Sep 08, 2014 10:07 pm

Perfect Human Interface wrote:I feel uncertain about not following supposed VST specification even if it does seem to work... which it does. I tried changing everything to INT and it works fine now. Hmmm.

Yeh I know, its a bit disturbing...yeh ??
Bear in mind i don't know the 'technical" details..I'm just speaking from practical usage.
There's got to be a "guru" reason somewhere for all this...
Got to be a situation somewhere where ints wont work... :?

I'm real glad you finally got a result, but I would be more comfortable if a Guru chipped
in and clarified it a little, get some peace of mind and take away the 'illegal/outlaw" feeling :lol:
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Adding Preset to Edit Box

Postby Exo » Mon Sep 08, 2014 10:11 pm

Perfect Human Interface wrote:I feel uncertain about not following supposed VST specification even if it does seem to work... which it does. I tried changing everything to INT and it works fine now. Hmmm.


Personally I think you should always stick to the spec even if it seems to work. The VST spec in many area is not enforced and so many VST devs over the years have done stuff "wrong". A lot of hosts make special allowances for plugins that are not following the spec correctly, so this could be one of them cases. There might be hosts that are following the spec to the letter and expect 0-1 values which would break your plugin for presets and automation. Saying that it might work in all host but better to be safe, it's not a big deal to scale your values down to 0-1 before the preset primitive and then scale it back afterwards. This is done in the GUI Selector module as an example.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK

Re: Adding Preset to Edit Box

Postby Perfect Human Interface » Mon Sep 08, 2014 11:28 pm

I agree with that Exo. Much rather be safe.

I've removed the Ruby rounding code that KG provided. Now it will save the value correctly except it's off, as if with the rounding error discussed before. My suspicion was that the Ruby code block was overwriting the value on load for some reason and it looks like that is the case. I'm not sure why, or how there could be a rounding error in the first place when I can't recreate it in the schematic in Flowstone. But I might be able to fix this with a different rounding code.
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Adding Preset to Edit Box

Postby billv » Mon Sep 08, 2014 11:35 pm

Perfect Human Interface wrote:I agree with that Exo. Much rather be safe.

i agree too. But I'm still gonna cheat, old habits die hard.
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

PreviousNext

Return to General

Who is online

Users browsing this forum: Google [Bot] and 78 guests