list* == unbound variable

View: New views
7 Messages — Rating Filter:   Alert me  

list* == unbound variable

by Denis Fitzpatrick-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

print list*(1,2,3, {a b c}) ; from lists.sal
produces
 >>> Error: list*: unbound variable

in:

FOMUS 0.1-alpha (c) 2009 David Psenicka
Grace 3.3.0 (c) 2009 Todd Ingalls, Rick Taube
JUCE v1.46 (c) 2009 Julian Storer
SndLib 21.0 (c) 2009 William Schottstaedt
 /\\\
---\\\---------
----\\\--------
----/\\\------- Common Music 3.3.0
---/--\\\------
--/----\\\-----
 /      \\\/

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: list* == unbound variable

by Heinrich Taube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

oh thats a mistake in cm.html, i replaced 'list*' with the more  
general 'concat', which sticks lists and non-lists together.

your example:

print concat(1, 2, 3, {a b c})

any input can be a list:

print concat( 1, {2 3}, 4 ,{a b c})

On Aug 11, 2009, at 10:43 PM, Denis Fitzpatrick wrote:

> print list*(1,2,3, {a b c}) ; from lists.sal
> produces
>>>> Error: list*: unbound variable

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: list* == unbound variable

by Rune Boutroue Bekkhus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Denis Fitzpatrick-2 wrote:
print list*(1,2,3, {a b c}) ; from lists.sal
produces
 >>> Error: list*: unbound variable
unbound variable-messages are also produced by:
*scale*
hertz
keynum
interval
print
pprint

(in Grace (lisp)).

Probably more as I get through my "Metalevel" book.
Comprehensive list of solutions somewhere?

Re: list* == unbound variable

by Heinrich Taube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> unbound variable-messages are also produced by:
> *scale*
> hertz
> keynum
> interval
> print
> pprint
>
> (in Grace (lisp)).


these are very old common lisp names.


> *scale*

this global is no longer necessary/needed -- just use the (scale ... )  
function if you want to create an alternate tuning or mode)

> hertz

its  called hz, eg    (hz 60)

> keynum

its called key  , eg (key 'c4)

> interval

not necessary/needed just use ints 0 1 2 3  etc


> print


(define (print x)
    (format #t "~S~%" x)
    (void))

> pprint

hmm. maybe s7 has this now, ill look

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: list* == unbound variable

by Bill Schottstaedt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> pprint
> hmm. maybe s7 has this now, ill look

No, but it's probably easy to add.  There's a pretty print
function in scheme floating around the web, I think.

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: list* == unbound variable

by Heinrich Taube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 27, 2009, at 5:21 AM, Rune Boutroue Bekkhus wrote:

>> print list*(1,2,3, {a b c})

>> produces
>>>>> Error: list*: unbound variable
>


forgot theis one:  use 'concat'    its will do pretty much anything

cm> (concat 1 2 3 4 5)
(1 2 3 4 5)
cm> (concat 1 '(2 3) 4 5)
(1 2 3 4 5)
cm> (concat  '(1 2 3) '(4 5))
(1 2 3 4 5)

cm> (concat  1 2 3 '(a b c))
(1 2 3 a b c)


so in sal you example would be:

print concat(1,2,3, {a b c})

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: list* == unbound variable

by Bill Schottstaedt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For pprint, I added a lightly edited version of Marc Feeley's
pretty printer to the Snd distribution: pretty-print.scm.  
(This is for s7 -- the Guile version comes with Guile).

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist