getYValueFromBPM method

double getYValueFromBPM(
  1. 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 getYValueFromBPM(int bpm) {
  double adjustedBPM = (bpm - scaleOrigin).toDouble();
  adjustedBPM = adjustedBPM / 2; //scaled down version for mobile phone
  double yValue = yOrigin - (adjustedBPM * pixelsPerOneMM!);
  //Log.i("bpmvalue",bpm+" "+adjustedBPM+" "+y_value);
  return yValue;
}