getYValueFromToco method
- int bpm
Returns the Y-coordinate on the screen for the given TOCO value. [bpm] is the TOCO value. Returns the Y-coordinate on the screen.
Implementation
double getYValueFromToco(int bpm) {
double adjustedBPM = bpm.toDouble();
adjustedBPM = adjustedBPM / 2; //scaled down version for mobile phone
double yValue = yTocoOrigin - (adjustedBPM * pixelsPerOneMM!);
//Log.i("bpmvalue", bpm + " " + adjustedBPM + " " + y_value);
return yValue;
}