char buf[12];
snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (_primary->note()->note() + dy).c_str(),
(int) floor (_primary->note()->note() + dy));
-
+
+ if (dy) {
+ boost::shared_ptr<Evoral::Note<Evoral::MusicalTime> >
+ moved_note (new Evoral::Note<Evoral::MusicalTime> (*(_primary->note())));
+ moved_note->set_note (moved_note->note() + dy);
+ _region->play_midi_note (moved_note);
+ }
+
_editor->show_verbose_canvas_cursor_with (buf);
}
}
const double note_length_beats = (note->off_event().time() - note->on_event().time());
nframes_t note_length_ms = beats_to_frames(note_length_beats)
* (1000 / (double)route_ui->session()->nominal_frame_rate());
+
+ /* note: we probably should not be binding a shared_ptr<NoteType>
+ here. Since its a one-shot timeout, its sort of OK, but ...
+ */
+
Glib::signal_timeout().connect(sigc::bind(sigc::mem_fun(this, &MidiRegionView::play_midi_note_off), note),
note_length_ms, G_PRIORITY_DEFAULT);
}
private:
friend class EditNoteDialog;
-
+ friend class NoteDrag;
+
/** Play the NoteOn event of the given note immediately
* and schedule the playback of the corresponding NoteOff event.
*/