PDA

View Full Version : Neve Style 2 knob setup how too?


RRokkenAudio
01-20-2010, 12:50 AM
Looking to make a knob like the neve 1073 which has a ring and an inside knob. Putting one knob over another, I bet will not work.

Any ideas on how to do this?

EDIT: Look at the Waves 1073 aka VEQ-3

~Rob.

RRokkenAudio
02-11-2010, 08:12 PM
Any ideas? basically a knob on top of a knob, I guesss i have to somehow mod the base knobs "area" where the mouse will effect it to be closer to the outside, grrrr. I just hate having sep knobs for freq/vol.

I know schwa knows how to do this hehe

~Rob.

RRokkenAudio
02-15-2010, 02:06 PM
btw: http://www.uaudio.com/products/software/neve1073/_images/screenshot.jpg

There's what I'm talking about, with the inner and outter knob.

~Rob.

plgrmsprgrs
02-15-2010, 02:12 PM
Wish I knew. You're just kinda flapping out in the breeze here. Someone around here has to know.

junioreq
07-25-2010, 04:42 AM
Cough

http://i42.tinypic.com/zur33s.jpg

RRokkenAudio
07-30-2010, 08:34 PM
Man, theres got to be a way to do this, i'm wracking my brain with things like onmousedown disable bottom knob lol, all kinds of things.

I need a clue!!!

schwa
07-30-2010, 09:20 PM
CMX draws the big ring under the small one, so the small one gets hit tested first. The small one overrides iplug's IsHit method, and returns yes if the mouse is within the circle. If not, the big ring gets the hit (since it's behind the small one).

RRokkenAudio
07-30-2010, 09:52 PM
OMG, that was easy lol. Got it working!! thank you, I musta been over that .h 40 times and never seen IsHit..

RRokkenAudio
07-23-2011, 07:30 PM
I assume using the regular bitmapControl I have to somehow specify a circular target area, Is this correct? Otherwize, the little corners of the image still stick out and act as 'part of the image'.

Tale
07-24-2011, 12:32 AM
Like schwa said:
The small one overrides iplug's IsHit method, and returns yes if the mouse is within the circle.
So your target area should be a rectangular around the whole middle circle. In IsHit() you should return false for the little corners, true otherwise.

How to do this, I don't know straight away... Perhaps you could probe the alpha channel of the bitmap (assuming the circle isn't transparent, but the background is)?

cerberus
07-24-2011, 01:13 AM
it seems one only need know the center of the circle to describe a radius within
which the hit point must lie. i think perhaps that it should be simple to implement
if one hardcoded the centre point for each control. the bitmap is not mapped to
an iRECT in the constructor, but perhaps there is a still way to derive the center
point of an IBitmapControl from it's default target iRECT?

RRokkenAudio
07-24-2011, 03:57 PM
I save my imgs "png with alpha", no extra image.. I totally don't get overriding ishit etc.

If you hit test using the area of a circle and its out of bounds, then set focus to the image behind it? how are you setting focus?

if outside of circle completely void ishit on top one?

Completely lost.

What do you mean return false, return true?

virtual bool IsHit(int x, int y) { return mTargetRECT.Contains(x, y); }


~Rob.

Tale
07-24-2011, 11:09 PM
You can override IsHit() like this:

bool MyControl::IsHit(int x, int y)
{
if (IsInsideCircle(x, y)) // To-do: Code IsInsideCircle()
{
return true;
}
else
{
return false;
}
}

When it returns false, IPlug automatically calls the IsHit() from the control behind it (if any). When IsHit() returns true, IPlug calls OnMouse*() for that control.

RRokkenAudio
07-25-2011, 12:13 AM
Thanks Tale, I was confused on what the ishit was actually returning eg true or false. Was kinda totally lost on how that whole ishit worked..

Thanks, think I got it, will mess with this tomorrow.

~RR.