[CM] CM output to CMN

Marcus Pearce Marcus Pearce <m.t.pearce@city.ac.uk>
Mon, 18 Aug 2003 16:32:19 +0100 (BST)


> I think this trouble is related to a possible typo in
> cm-2.4.0/src/cmn.lisp.  Try substituting 'ids for 'data down in
> the method-spec of 'deinitialize-io in cmn.lisp (line 91 in
> cmn.lisp).

That seems to have been it -- thanks very much. 

The next thing I'm having trouble with is sending time and key signature
information from CM to CMN in cases where these change throughout a
composition. I've tried a variety of things: 

	1. creating the appropriate midimsg objects and adding them to the
	   list of events --> but thereis no 'object->cmn' method for
	   midimsg objects; I could write one I suppose but ... 
	2. I noticed the following lines in the function 'write-event' in
	   cmn.lisp: 

	(let (...
	      (data (object->cmn obj))
	      ...
	     )
	...
	(if (= (length data) 2)
            (add-data-1 score staff (cmn-eval (second data)))
	    ...

	Since the method object->cmn is only defined for midi objects 
	it occurred to me that this might exist to allow addition of 
	objects of the form 

	'(0 (cmn::meter 4 4))

	to a score by defining an object->cmn method for lists that simply
	returns the list. But to no avail -- we run across problems in the
	method 'process-events' when calling 'object-time' on some
	derivative of this form. 

It seems to be the case that this is not at present possible in CM but I
wanted to check if I've missed something. 

Cheers, 
Marcus 
--