variable plugin port config.
[ardour.git] / libs / ardour / legatize.cc
index d1892e0bbb26853bbd5d78d13862b9da02a06091..4d3d0f7d0e78e3b0341b0abb0f912355af6b6cb2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 20014 Paul Davis
+    Copyright (C) 2014 Paul Davis
     Author: David Robillard
 
     This program is free software; you can redistribute it and/or modify
@@ -31,10 +31,10 @@ Legatize::~Legatize ()
 
 Command*
 Legatize::operator()(boost::shared_ptr<ARDOUR::MidiModel> model,
-                     Evoral::MusicalTime                  position,
+                     Evoral::Beats                        position,
                      std::vector<Legatize::Notes>&        seqs)
 {
-       MidiModel::NoteDiffCommand* cmd = new MidiModel::NoteDiffCommand(model, "legatize");
+       MidiModel::NoteDiffCommand* cmd = new MidiModel::NoteDiffCommand(model, name ());
 
        for (std::vector<Legatize::Notes>::iterator s = seqs.begin(); s != seqs.end(); ++s) {
                for (Legatize::Notes::iterator i = (*s).begin(); i != (*s).end();) {
@@ -43,10 +43,10 @@ Legatize::operator()(boost::shared_ptr<ARDOUR::MidiModel> model,
                                break;
                        }
 
-                       const Evoral::MusicalTime new_end = (*next)->time() - Evoral::MusicalTime::tick();
+                       const Evoral::Beats new_end = (*next)->time() - Evoral::Beats::tick();
                        if ((*i)->end_time() > new_end ||
                            (!_shrink_only && (*i)->end_time() < new_end)) {
-                               const Evoral::MusicalTime new_length(new_end - (*i)->time());
+                               const Evoral::Beats new_length(new_end - (*i)->time());
                                cmd->change((*i), MidiModel::NoteDiffCommand::Length, new_length);
                        }