MusicalTime => Beats.
[ardour.git] / libs / ardour / transform.cc
index 775b6bce5208a4740d772b0f920732b2f6ffd60e..9f029829deb4e4cd3044a33fadaeaeeb0cb605dd 100644 (file)
@@ -63,7 +63,7 @@ Transform::Value::eval(const Context& ctx) const
                return Variant(g_random_double());
        }
 
-       return Variant ();
+       return Variant();
 }
 
 void
@@ -106,6 +106,12 @@ Transform::Operation::eval(Context& ctx) const
                }
                value /= rhs.to_double();
                break;
+       case MOD:
+               if (rhs.to_double() == 0.0) {
+                       return;  // Program will fail safely
+               }
+               value = fmod(value, rhs.to_double());
+               break;
        default: break;
        }
 
@@ -115,7 +121,7 @@ Transform::Operation::eval(Context& ctx) const
 
 Command*
 Transform::operator()(boost::shared_ptr<MidiModel> model,
-                      Evoral::MusicalTime          position,
+                      Evoral::Beats                position,
                       std::vector<Notes>&          seqs)
 {
        typedef MidiModel::NoteDiffCommand Command;