+ case FloatAuto::FREE: return _("Disjoint");
+ case FloatAuto::BUMP: return _("Bump");
+ }
+ return _("Error");
+}
+
+void FloatAuto::bump_update(int64_t pos, float dv, int edge, int span)
+{
+ float *mins = autos->edl->local_session->automation_mins;
+ float *maxs = autos->edl->local_session->automation_maxs;
+ int group = autos->autogrouptype;
+ float min = mins[group], max = maxs[group];
+ int last_edge = edge;
+ FloatAuto *fauto = this;
+ fauto->position = pos;
+ if( fauto->is_bump() && span ) {
+ do {
+ float v = fauto->get_value(edge) + dv;
+ bclamp(v, min, max);
+ fauto->set_value(v, edge);
+ fauto = (FloatAuto*)(!edge ? fauto->next : fauto->previous);
+ } while( fauto && !fauto->is_bump() );
+ last_edge = !edge ? 1 : 0;
+ }
+ if( fauto ) {
+ float v = fauto->get_value(last_edge) + dv;
+ bclamp(v, min, max);
+ fauto->set_value(v, last_edge);
+ }
+}
+
+void FloatAuto::bump_value(float v, int edge, int span)
+{
+ float dv = v - get_value(edge);
+ bump_update(position, dv, edge, span);