The problem I'm looking to overcome at the moment is trying to use the minimum (25.1751) and maximum (81) values of a UISlider as the minimum and maximum x coordinates of the grey UIView.
In other words, can I make the left edge of the UIView output 25.1751 and the right edge output 81?
The values of the sliders aren't default on account of converting them to frequency values for an oscillator, and currently the values outputted by the UIView are outside of the range I want. I've tried reducing the maximum output of the UIView using math formulas but I can't raise the minimum.
I hope that made some sense!
Here's where I'm at with the code so far and thanks in advance for any help!
In other words, can I make the left edge of the UIView output 25.1751 and the right edge output 81?
The values of the sliders aren't default on account of converting them to frequency values for an oscillator, and currently the values outputted by the UIView are outside of the range I want. I've tried reducing the maximum output of the UIView using math formulas but I can't raise the minimum.
I hope that made some sense!
Here's where I'm at with the code so far and thanks in advance for any help!
Code:
- (IBAction)sawXYPad:(UIPanGestureRecognizer *)trigger {
float sawpadHeight = sawxyview.bounds.size.height;
float sawpadWidth = sawxyview.bounds.size.width;
CGPoint location = [trigger locationInView:sawxyview];
if ((location.y >= 0) && (location.y < sawpadHeight) && (location.x >= 0) && (location.x < sawpadWidth)) {
float maxX = sawPSlider.maximumValue;
float minX = sawPSlider.minimumValue;
float sawPitchXY = (location.x > minX) && (location.x < maxX);
sawPSlider.value = sawPitchXY;
[PdBase sendFloat:sawPitchXY toReceiver:@"saw_pitch"];
}
}
