Red Clay Demo #1 - CLOS Implementation

indigo> pcl
GCL (GNU Common Lisp)  Version(2.2) Wed Jan 22 09:55:53 EST 1997
Licensed under GNU Public Library License
Contains Enhancements by W. Schelter

>(in-package "pcl" )
#<"PCL" package>

PCL>( load "../clay/clay.l" )
T

PCL>( load "../green/greenclay.l" )
T

PCL>( load "redclay.l" )
T

PCL>( run ( new-red-clay ) )

red> help.

red world
eval - Evaluate a Lisp s-expression.
help - Display the commands of the current world.
load - Load a world and enter it.
monitor - Turn on information monitoring feature.
stop - Terminate Clay execution.
unload - Leave the current world, returning to its parent.
unmonitor - Turn off information monitoring feature.

red> load.
domain? melody
Lisp melody world loaded.

red>melody> help.

melody world
d - Double the duration of the note.
dot - Increase by 50% the duration of the note.
h - Halve the duration of the note.
lp - Lower the pitch of the note one scale degree.
play - Render the note sonicly and/or textually and/or graphicly.
quadruple - Quadruple the duration of the note.
quarter - Quarter the duration of the note.
rest - Play the note silently.
rp - Raise the pitch of the note one scale degree.
third - Third the duration of the note.
triple - Triple the duration of the note.
undot - Decrease by 1/3 the duration of the note.

red>melody> play, rp, play, lp, lp, play, rp, d, play, h.
     1  ----
     2  ----
   L 7  ----
     1  --------

red>melody> monitor.
blue: (reader|parser)? reader


red>melody> play, play.
Natural input line ...
play, play.
Formal input line ...
[ [ play ] [ play ] ]
Expanded input line ...
[ [ play ] [ play ] ]
Tokenized input line ...
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "]";  type = RIGHT-BRACKET

     1  ----
     1  ----

red>melody> unmonitor.
Natural input line ...
unmonitor.
Formal input line ...
[ unmonitor ]
Expanded input line ...
[ unmonitor ]
Tokenized input line ...
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "unmonitor";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET


red>melody> monitor.
blue: (reader|parser)? parser


red>melody> play, rp, play, lp, d, play, h.
Parsing a Green Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
Green Clay command parse failed.
Parsing a Red Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "rp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "lp";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "d";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "play";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "h";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
TOKEN...  name = "]";  type = RIGHT-BRACKET
Red Clay command parse succeeded.
RED CLAY COMMAND
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | rp
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | lp
| GREEN CLAY COMMAND
| | d
| GREEN CLAY COMMAND
| | play
| GREEN CLAY COMMAND
| | h


     1  ----
     2  ----
     1  --------

red>melody> unmonitor.
Parsing a Green Clay command.
TOKEN...  name = "[";  type = LEFT-BRACKET
TOKEN...  name = "unmonitor";  type = ID
TOKEN...  name = "]";  type = RIGHT-BRACKET
Green Clay command parse succeeded.
GREEN CLAY COMMAND
| unmonitor


red>melody> lap.
red>melody> Unknown command.

red>melody> play, lap.
     1  ----
red>melody> Unknown command.

red>melody> play lap.
red>melody> Not of Red Clay form.

red>melody> unload.
melody world unloaded.

red> help.

red world
eval - Evaluate a Lisp s-expression.
help - Display the commands of the current world.
load - Load a world and enter it.
monitor - Turn on information monitoring feature.
stop - Terminate Clay execution.
unload - Leave the current world, returning to its parent.
unmonitor - Turn off information monitoring feature.

red> stop.
NIL

PCL>(bye)
indigo> 

Craig Graci
Last modified: Sun Mar 2 20:58:17 EST 1997