Introduce a macro for imprecise configurations
[ardour.git] / libs / ardour / transform.cc
index ddf23aeeccada3f3bbbe11809426b8ac87c04454..9f029829deb4e4cd3044a33fadaeaeeb0cb605dd 100644 (file)
@@ -62,6 +62,8 @@ Transform::Value::eval(const Context& ctx) const
        case RANDOM:
                return Variant(g_random_double());
        }
+
+       return Variant();
 }
 
 void
@@ -104,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;
        }
 
@@ -113,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;