mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
add Beatbox::edit_note_number()
This commit is contained in:
parent
c7bf2de88c
commit
8befa73d00
2 changed files with 13 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ class BeatBox : public ARDOUR::Processor {
|
|||
|
||||
void add_note (int number, int velocity, Timecode::BBT_Time at);
|
||||
void remove_note (int number, Timecode::BBT_Time at);
|
||||
void edit_note_number (int old_number, int new_number);
|
||||
|
||||
void set_measure_count (int measures);
|
||||
void set_meter (int beats, int beat_type);
|
||||
|
|
|
|||
|
|
@ -421,10 +421,21 @@ BeatBox::get_last_time() const
|
|||
return last_time;
|
||||
}
|
||||
|
||||
void
|
||||
BeatBox::edit_note_number (int old_number, int new_number)
|
||||
{
|
||||
for (Events::iterator e = _current_events.begin(); e != _current_events.end(); ++e) {
|
||||
if (((*e)->buf[0] & 0xf0) == MIDI_CMD_NOTE_OFF || ((*e)->buf[0] & 0xf0) == MIDI_CMD_NOTE_ON) {
|
||||
if ((*e)->buf[1] == old_number) {
|
||||
(*e)->buf[1] = new_number;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BeatBox::remove_note (int note, Timecode::BBT_Time at)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue