1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:57:34 +00:00

Piano: Add velocity and pitch support

As Piano will later move to the RollNote defintions of LibDSP, it's a
good idea to already insert velocity and pitch support, even though it's
currently not used.
This commit is contained in:
kleines Filmröllchen 2021-07-05 23:45:16 +02:00 committed by Ali Mohammad Pur
parent fdef6e5f76
commit ad6a332268
3 changed files with 4 additions and 2 deletions

View file

@ -228,7 +228,7 @@ void RollWidget::mousemove_event(GUI::MouseEvent& event)
u32 on_sample = roll_length * (static_cast<double>(min(x0, x1)) / m_num_notes);
u32 off_sample = (roll_length * (static_cast<double>(max(x0, x1) + 1) / m_num_notes)) - 1;
m_track_manager.current_track().set_roll_note(m_drag_note, on_sample, off_sample);
m_note_drag_location = RollNote({ on_sample, off_sample });
m_note_drag_location = RollNote { on_sample, off_sample, (u8)m_drag_note, 0 };
update();
}