COCKOS CONFEDERATED FORUMS Cockos : REAPER : NINJAM : Forums Forum Home : Register : FAQ : Members List : Search :

 Cockos Incorporated Forums IKnobMultiControl MiddlePosition/StartValue
 User Name Remember Me? Password
 Register Projects Search Today's Posts Mark Forums Read

 Thread Tools Display Modes
 02-12-2018, 09:57 AM #1 jan hase Human being with feelings   Join Date: Jul 2017 Posts: 16 IKnobMultiControl MiddlePosition/StartValue Hey everyone, I recognized that in IPlugEffect the Gain initial Value is set to 50. (max Value = 100, min Val = 0) so i expect the GainKnob to point 12 oclock, but it points somewhere at 2 oclock http://www.martin-finke.de/blog/arti...rst-plugin.jpg so that from 0 t0 50 it turns around 120° but from 50 to 100 only 70°, so the values from 0 to 100 are note equally (linearly) spread across the Knobs circumference. so i want, that when the defaultval is set to 50 and the maxval is set to 100 and minVal to 0, that the knob points 12 oclock(north), i mean that all values are spaced linearly across the circumference of the knob. oh boy, i hope you get what i mean ^^
 02-12-2018, 11:02 AM #2 Qrchack Human being with feelings     Join Date: May 2016 Location: Poland Posts: 4 Have a look inside IPlugEffect.cpp Code: ``` GetParam(kGain)->InitDouble("Gain", 50., 0., 100.0, 0.01, "%"); GetParam(kGain)->SetShape(2.);``` We're initializing at 50 with a range of 0-100, however straight away we're calling SetShape() to achieve a logarithmic response. The reason for that is a few lines later: Code: ``` double* in1 = inputs[0]; double* in2 = inputs[1]; double* out1 = outputs[0]; double* out2 = outputs[1]; for (int s = 0; s < nFrames; ++s, ++in1, ++in2, ++out1, ++out2) { *out1 = *in1 * mGain; *out2 = *in2 * mGain; }``` The value of mGain is taken as-is, and we're using the linear to logarithmic conversion built right into parameters in IPlug. SetShape() isn't yet documented on the live documentation (I have it almost done on my local machine), but I talked with Oli about it and the response is y = x^(1/shape), with a default value of 1. so it just passes through. No wonder you got about 2 oclock, a value of 0.5 (50/100) gives 0.5^(1/2)=0.7 Here's a graph of what we're doing:
 02-13-2018, 04:01 AM #3 jan hase Human being with feelings   Join Date: Jul 2017 Posts: 16 Hey QrChack, Thank you for detailed awesome answer! i just set "setshape(2.)" to GetParam(kGain)->SetShape(1); then y = x^(1/1) which is y = x. et voila! works just fine
 02-14-2018, 01:44 PM #4 Qrchack Human being with feelings     Join Date: May 2016 Location: Poland Posts: 4 You can get rid of SetShape(1), it's the default value anyway
 02-18-2018, 01:13 PM #5 jan hase Human being with feelings   Join Date: Jul 2017 Posts: 16 even better, ty

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General Discussion     General Discussion (aka spam trap) REAPER Forums     REAPER General Discussion Forum     newbieland     REAPER Q&A, Tips, Tricks and Howto     Recording Technologies and Techniques     REAPER Compatibility     REAPER Color Themes and Icon Sets     MIDI Hardware, Control Surfaces, and OSC     REAPER Non-English Speaking User Forums         Forum de REAPER en français         Foro de REAPER en Español         Fórum do REAPER em português         Forum di REAPER in italiano         Deutschsprachiges REAPER Userforum         Pyccкоязычный фopyм REAPER     REAPER Bug Reports     REAPER Feature Requests     Dstruct's Casa De Nitpicks     REAPER for Live Use     REAPER for Video Editing/Mangling     REAPER for Ambisonic and 3D positional audio uses     ReaScript, JSFX, REAPER Plug-in Extensions     REAPER for macOS X     REAPER for Linux     REAPER Pre-Release Discussion     REAPER Music/Collaboration Discussion     REAPER lounge NINJAM Discussion     NINJAM User Discussion     NINJAM Developer Discussion Other Software Discussion     WDL users forum     LICEcap Discussion     OSCII-bot forum     Old Cockos Products Forum

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

 -- Cockos ---- REAPER 5 ---- Reaper 3 ---- Reaper 2 ---- Reaper 1 Contact Us - Çockos Incorporated - Archive - Top