+LY_DEFINE (ly_performance_write, "ly:performance-write",
+ 3, 0, 0, (SCM performance, SCM filename, SCM name),
+ "Write @var{performance} to @var{filename} storing @var{name} as "
+ "the name of the performance in the file metadata.")
+{
+ LY_ASSERT_SMOB (Performance, performance, 1);
+ LY_ASSERT_TYPE (scm_is_string, filename, 2);
+ LY_ASSERT_TYPE (scm_is_string, name, 3);
+
+ unsmob<Performance> (performance)->write_output (ly_scm2string (filename),
+ ly_scm2string (name));
+ return SCM_UNSPECIFIED;
+}