- for (const_iterator i = const_begin(); i != const_end(); ++i) {
- char buf[64];
-
- XMLNode *pointnode = new XMLNode ("point");
-
- snprintf (buf, sizeof (buf), "%" PRIu32, (jack_nframes_t) floor ((*i)->when));
- pointnode->add_property ("x", buf);
- snprintf (buf, sizeof (buf), "%f", (*i)->value);
- pointnode->add_property ("y", buf);
+ root->add_property ("id", _id.to_s());
+
+ snprintf (buf, sizeof (buf), "%.12g", default_value);
+ root->add_property ("default", buf);
+ snprintf (buf, sizeof (buf), "%.12g", min_yval);
+ root->add_property ("min_yval", buf);
+ snprintf (buf, sizeof (buf), "%.12g", max_yval);
+ root->add_property ("max_yval", buf);
+ snprintf (buf, sizeof (buf), "%.12g", max_xval);
+ root->add_property ("max_xval", buf);
+
+ if (full) {
+ root->add_property ("state", auto_state_to_string (_state));
+ } else {
+ /* never save anything but Off for automation state to a template */
+ root->add_property ("state", auto_state_to_string (Off));
+ }