COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 07-25-2017, 04:55 PM   #1
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 79
Default Negate Value from Parameter?

I am controlling a hardware synthesizer from my VST -- and when my Resonance IParam is at 100%, the Synth Resonance is 0. When my IParam is 0%, the Synth Resonance is 100%.

It's reversed...is there a way I can handle this situation with some methods that already exist in the framework?

I already found and tried setting GetParam()->NegateDisplay(), but this is not what I need....

Thoughts?
Opcode 7 is offline   Reply With Quote
Old 07-25-2017, 11:07 PM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Are you processing parameter changes using OnParamChange()? Because then couldn't you simply do something like:

Code:
case kResonance:
{
  double synthValue = 100 - GetParam(kResonance)->Value();
  // ...
  break;
}
Tale is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.