[CM] Loop bug?

Rick Taube taube at illinois.edu
Thu Feb 12 06:04:31 PST 2015


that’s wierd, it sure seems like a  bug — ill take a look at it.

in  the meantime someting like this should work

(let (( chord (transpose (pick '(0 3 7)
                                   '(0 4 7)
                                   '(0 3 7 10)
                                   '(0 4 7 10)
                                   '(0 4 7 11))
                             (between 48 80))))
  (loop for foo in chord …)



On Feb 12, 2015, at 7:10 AM, Richard Wentk <richard at wentk.com> wrote:

> I’m working through the examples using the Mac App Store version of Grace. 
> 
> This example in midioutput.scm produces an unbound variable error for ‘chord':
> 
> (loop with chord = (transpose (pick '(0 3 7)
>                                    '(0 4 7)
>                                    '(0 3 7 10)
>                                    '(0 4 7 10)
>                                    '(0 4 7 11))
>                              (between 48 80))
>      for k in chord
>      do (mp:midi :key k))
> 
> A simplified version does the same thing for q:
> 
> (loop with q = '(1 2 3) for i in q do (print i))
> 
> Is this a bug, or am I missing something obvious? AFAICT the code is valid in Scheme and should work...
> 
> The equivalent SAL example works fine.
> 
> Thanks!
> 
> Richard
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist




More information about the Cmdist mailing list