Add XOSC Viewer, use this as destination for xform
This commit is contained in:
@ -103,6 +103,9 @@
|
||||
((:menu
|
||||
(("OSN File"
|
||||
:callback 'application-interface-new-osn
|
||||
:callback-type :interface)
|
||||
("XOSC File"
|
||||
:callback 'application-interface-new-xosc
|
||||
:callback-type :interface))
|
||||
:title "New")
|
||||
("Open ..."
|
||||
@ -184,15 +187,8 @@
|
||||
(defmethod export-osn-to-xosc ((viewer osn-viewer))
|
||||
(let ((osn (first (capi:graph-pane-roots (slot-value viewer 'osn-graph-pane)))))
|
||||
(when osn
|
||||
(multiple-value-bind (pathname ok)
|
||||
(capi:prompt-for-file "Export OSN To XOSC"
|
||||
:operation :save
|
||||
:filters '("XOSC Files" "*.XOSC")
|
||||
:filter "*.XOSC")
|
||||
(when ok
|
||||
(capi:with-busy-interface (viewer)
|
||||
(with-open-file (stream pathname #+(or) (ensure-pathname-type pathname "xosc")
|
||||
:external-format :utf-8
|
||||
:element-type :default
|
||||
:direction :output :if-exists :supersede)
|
||||
(osn-os10:write-os10-stream osn stream))))))))
|
||||
(application-interface-new-xosc
|
||||
viewer
|
||||
:content
|
||||
(with-output-to-string (stream)
|
||||
(osn-os10:write-os10-stream osn stream))))))
|
||||
|
||||
Reference in New Issue
Block a user