Revert inadvertently pushed commit
[ardour.git] / gtk2_ardour / midi_list_editor.cc
index 0a87823f8e577845060f9e2c34a3edd97d1a3f5f..047dcf27a7697d272dcbbb776a2056f6cd8137f0 100644 (file)
@@ -35,6 +35,7 @@
 #include "gtkmm2ext/keyboard.h"
 #include "gtkmm2ext/actions.h"
 
+#include "ardour_ui.h"
 #include "midi_list_editor.h"
 #include "note_player.h"
 
@@ -291,7 +292,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                                                if (note->time() + fdelta >= 0) {
                                                        cmd->change (note, prop, note->time() + fdelta);
                                                } else {
-                                                       cmd->change (note, prop, Evoral::MusicalTime());
+                                                       cmd->change (note, prop, Evoral::Beats());
                                                }
                                                break;
                                        case MidiModel::NoteDiffCommand::Velocity:
@@ -299,10 +300,10 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                                                break;
                                        case MidiModel::NoteDiffCommand::Length:
                                                if (note->length().to_double() + fdelta >=
-                                                   Evoral::MusicalTime::tick().to_double()) {
+                                                   Evoral::Beats::tick().to_double()) {
                                                        cmd->change (note, prop, note->length() + fdelta);
                                                } else {
-                                                       cmd->change (note, prop, Evoral::MusicalTime::tick());
+                                                       cmd->change (note, prop, Evoral::Beats::tick());
                                                }
                                                break;
                                        case MidiModel::NoteDiffCommand::Channel:
@@ -334,7 +335,7 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                                        if (note->time() + fdelta >= 0) {
                                                cmd->change (note, prop, note->time() + fdelta);
                                        } else {
-                                               cmd->change (note, prop, Evoral::MusicalTime());
+                                               cmd->change (note, prop, Evoral::Beats());
                                        }
                                        break;
                                case MidiModel::NoteDiffCommand::Velocity:
@@ -342,10 +343,10 @@ MidiListEditor::scroll_event (GdkEventScroll* ev)
                                        break;
                                case MidiModel::NoteDiffCommand::Length:
                                        if (note->length() + fdelta >=
-                                           Evoral::MusicalTime::tick().to_double()) {
+                                           Evoral::Beats::tick().to_double()) {
                                                cmd->change (note, prop, note->length() + fdelta);
                                        } else {
-                                               cmd->change (note, prop, Evoral::MusicalTime::tick());
+                                               cmd->change (note, prop, Evoral::Beats::tick());
                                        }
                                        break;
                                case MidiModel::NoteDiffCommand::Channel:
@@ -772,11 +773,11 @@ MidiListEditor::redisplay_model ()
                        row[columns.start] = ss.str();
 
                        bbt.bars = 0;
-                       const Evoral::MusicalTime dur = (*i)->end_time() - (*i)->time();
+                       const Evoral::Beats dur = (*i)->end_time() - (*i)->time();
                        bbt.beats = dur.get_beats ();
                        bbt.ticks = dur.get_ticks ();
                        
-                       int len_ticks = (*i)->length().to_ticks();
+                       uint64_t len_ticks = (*i)->length().to_ticks();
                        std::map<int,string>::iterator x = note_length_map.find (len_ticks);
 
                        if (x != note_length_map.end()) {
@@ -797,7 +798,7 @@ MidiListEditor::redisplay_model ()
 void
 MidiListEditor::selection_changed ()
 {
-       if (!Config->get_sound_midi_notes()) {
+       if (!ARDOUR_UI::config()->get_sound_midi_notes()) {
                return;
        }