[CM] problems with common music 'process' and common lisp package system

Heinrich Taube taube at illinois.edu
Thu Mar 29 14:13:32 PDT 2012


as long you can actually run the up-process inside SOME package into  
which cm was loaded then i think this would have to be a pacakge  
inheritance issue. if thats the case im going to guess that all the  
process symbols (such as 'for' 'do' etc) need to be imported from  
whatever package the process macro is defined in to whatever package  
you import into.

but if up-process doesnt work from within the the original cm package  
then there is must be som actual issue in the code and you will have  
to send a back trace. but it looks like a macro expansion issue....

On Mar 29, 2012, at 11:17 AM, hans wrote:

> I can play these 2 functions - with loop and process, if they are
> locally defined.
>
> (defun up-loop ()
>  (loop for key from 60 to 72
>        for beg from 0 by .1
>        collect (make-instance 'midi :time beg
>                     :keynum key
>                     :duration 1)))
>
> (events (up-loop) "myscore.mid")
>
> (defun up-process ()
>  (process for key from 60 to 72
>        for beg from 0 by .1
>        output (make-instance 'midi :time beg
>                     :keynum key
>                     :duration 1)))
>
> (events (up-process) "myscore.mid")
>
>
> When I define the functions in a package, say automatic-jazz,
> and import/load them with quicklisp (ql:quickload :automatic-jazz)
>
> (events (automatic-jazz:up-loop) "myscore.mid")
> loads and runs o.k.
>
> But loading up-process
>
> gives errors like:
> LOOP ERROR: Found 'FOR' where operator expected.
> ERROR: (in macroexpansion of (PROCESS FOR I ...))
> illegal loop syntax
>
> thanks for any advice or help
> Hans
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list