[CM] debuggin ligeti

Dave Phillips dlphilp@bright.net
Tue, 12 Nov 2002 12:34:15 -0500


Hi Rick, hi Tobias:

  Here's the part of ligeti.cm that has me stumped now:

;;;
;;; Add octaves and a fake background

(defun desordre-woctaves (mode ntes rhys)
  (let ((fg-time 0)
        (fg-eighths 0)
        mode-degree)
    (list
     ;; foreground process
     (process with dur and keynum
              do
              (setf fg-time (now)
                    mode-degree (next ntes)
                    keynum (keynum mode-degree :from mode)
                    fg-eighths (next rhys)
                    dur (eighth-time fg-eighths))
              output (new midi time fg-time
                          keynum keynum
                          duration (- dur .01)
                          amplitude fg-amp)
              output (new midi time fg-time
                          keynum (+ keynum 12)
                          duration (- dur .01)
                          amplitude fg-amp)
              wait dur
              until (eop? rhys))
     ;; background process fills in 8th note pulses with
     ;; randomly selected mode notes based on current
     ;; foreground note.
     (process with pat = (new range
                              :from (new pval :of mode-degree)
                              :stepping (new random
                                            :of '((1 weight 3)
                                                 2
                                                 (3 weight .5 max 1)))
                              :for (new pval :of fg-eighths))
              repeat 1064
              for k = (keynum (next pat) :from mode)
              unless (or (= (now) fg-time)
                         (not (<= 0 k 127)))
              output (new midi
                          time (now)
                          keynum k
                          duration (- eighth-pulse .01)
                          amplitude bg-amp)
              wait eighth-pulse))))

(events (append
         (desordre-woctaves white-mode
                             (make-white-fg-notes 'b3)
                             (make-white-fg-rhythms))
         (desordre-woctaves black-mode
                             (make-black-fg-notes 'ds3)
                             (make-black-fg-rhythms)))
        "/home/dlphilp/tmp/test4.mid")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Compiling yields the following error:


Compiling: /home/dlphilp/CCRMA/cm-2.4.0/etc/examples/ligeti.cm 12 NOV 02
12:19:50 pm

Converted EIGHTH-TIME.
Compiling DEFINE (EIGHTH-TIME NUMBER-OF-EIGHTHS): 
Byte Compiling Top-Level Form: 
Byte Compiling Top-Level Form: 
Byte Compiling Creation Form for #<KERNEL::CLASS-CELL MODE>: 
Converted MAKE-WHITE-FG-NOTES.
Compiling DEFINE (MAKE-WHITE-FG-NOTES NOTE): 
Byte Compiling Top-Level Form: 
Compiling Creation Form for #<KERNEL::CLASS-CELL TRANSPOSER>: 
Compiling Creation Form for #<KERNEL::CLASS-CELL CYCLE>: 
Compiling Creation Form for #<KERNEL::CLASS-CELL RANGE>: 
Converted MAKE-WHITE-FG-RHYTHMS.
Compiling DEFINE (MAKE-WHITE-FG-RHYTHMS): 
Byte Compiling Top-Level Form: 
Converted MAKE-BLACK-FG-NOTES.
Compiling DEFUN MAKE-BLACK-FG-NOTES: 
Byte Compiling Top-Level Form: 
Compiling Creation Form for #<KERNEL::CLASS-CELL LINE>: 
Converted MAKE-BLACK-FG-RHYTHMS.
Compiling DEFUN MAKE-BLACK-FG-RHYTHMS: 

File: /home/dlphilp/CCRMA/cm-2.4.0/etc/examples/ligeti.cm

In: DEFUN DESORDRE-WOCTAVES
  (PROCESS WITH
           PAT
           =
           (NEW RANGE :FROM (NEW PVAL :OF MODE-DEGREE) :STEPPING ...)
           ...)
--> LET* FUNCTION BLOCK IF 
==>
  (#<NAMED-TYPE T>)
Error: Illegal function call.

Byte Compiling Top-Level Form: 
Compiling Creation Form for #<NAMED-TYPE T>: 
Converted DESORDRE-WOCTAVES.
Compiling DEFUN DESORDRE-WOCTAVES: 
Compiling Creation Form for #<KERNEL::CLASS-CELL MIDI>: 
Compiling Creation Form for #<KERNEL::CLASS-CELL PVAL>: 
Compiling Creation Form for #<KERNEL::CLASS-CELL RANDOM>: 
Byte Compiling Top-Level Form: 

File: /home/dlphilp/CCRMA/cm-2.4.0/etc/examples/ligeti.cm

In: DEFUN DESORDRE-WOCTAVES
  (PROCESS WITH DUR AND KEYNUM ...)
--> LET* FUNCTION 
==>
  (BLOCK :PROCESS
    (SETF FG-TIME (NOW) MODE-DEGREE (NEXT NTES) ...)
    (OUTPUT (NEW MIDI TIME FG-TIME KEYNUM ...))
    (OUTPUT (NEW MIDI TIME FG-TIME KEYNUM ...))
    ...)
Warning: Undefined variable: FUNCALL


Warning: This variable is undefined:
  FUNCALL


Compilation unit finished.
  1 error
  2 warnings


/home/dlphilp/CCRMA/cm-2.4.0/etc/examples/ligeti.x86f written.
Compilation finished in 0:00:00.

#p"/home/dlphilp/CCRMA/cm-2.4.0/etc/examples/ligeti.x86f"
T
T
*


Any suggestions ? I'm getting MIDI files from the first three event
calls, so I've commented out their calls to isolate the next problem.
I've also commented out the desordre-voices section until I resolve this
one (which will probably make fixing desordre-voices easier, I'm
guessing).

Best regards,

== Dave Phillips

	The Book Of Linux Music & Sound at http://www.nostarch.com/lms.htm
	The Linux Soundapps Site at http://linux-sound.org