place snapped notes at the start of the region.
*/
- framecnt_t const len = (framecnt_t) fabs (f - grab_frame () - 1);
+ framecnt_t const len = (framecnt_t) fabs ((double)(f - grab_frame () - 1));
_region->set_length (len < 1 ? 1 : len);
}
}
double x1 = _editor->sample_to_pixel (start);
double x2 = _editor->sample_to_pixel (end);
+ const double min_dimension = 2.0;
_editor->rubberband_rect->set_x0 (x1);
if (_vertical_only) {
_editor->rubberband_rect->set_x1 (x1 + 10);
} else {
if (x2 < x1) {
- x2 = min (x1 - 5, x2);
+ x2 = min (x1 - min_dimension, x2);
} else {
- x2 = max (x1 + 5, x2);
+ x2 = max (x1 + min_dimension, x2);
}
_editor->rubberband_rect->set_x1 (x2);
}
_editor->rubberband_rect->set_y0 (y1);
if (y2 < y1) {
- y2 = min (y1 - 5, y2);
+ y2 = min (y1 - min_dimension, y2);
} else {
- y2 = max (y1 + 5, y2);
+ y2 = max (y1 + min_dimension, y2);
}
_editor->rubberband_rect->set_y1 (y2);
uint8_t new_note = min (max (_primary->note()->note() + note_delta, 0), 127);
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (new_note).c_str(),
- (int) floor (new_note));
+ (int) floor ((double)new_note));
show_verbose_cursor_text (buf);
}
}
framepos_t const start = min (_note[0], _note[1]);
- framecnt_t length = (framecnt_t) fabs (_note[0] - _note[1]);
+ framecnt_t length = (framecnt_t) fabs ((double)(_note[0] - _note[1]));
framecnt_t const g = grid_frames (start);
double const one_tick = 1 / Timecode::BBT_Time::ticks_per_beat;