call Note::set_velocity() at an appropriate time

This commit is contained in:
Paul Davis 2018-07-03 11:28:01 -04:00
parent 644a05f60b
commit a1df752095
3 changed files with 9 additions and 0 deletions

View File

@ -1765,6 +1765,7 @@ MidiRegionView::update_sustained (Note* ev, bool update_ghost_regions)
y1 = y0 + std::max(1., floor(note_height()) - 1);
ev->set (ArdourCanvas::Rect (x0, y0, x1, y1));
ev->set_velocity (note->velocity()/127.0);
if (!note->length()) {
if (_active_notes && note->note() < 128) {

View File

@ -145,3 +145,10 @@ Note::set_ignore_events (bool ignore)
{
_note->set_ignore_events (ignore);
}
void
Note::set_velocity (double fract)
{
_note->set_velocity (fract);
}

View File

@ -64,6 +64,7 @@ public:
void set_ignore_events (bool);
void set_velocity (double);
void move_event (double dx, double dy);
private: