CHANGE {objects} {newclass} {new old}*

Use commas to delimit more than one object.

Arguments:

  {objects}             One or more objects to change.
  {newclass}            New class for objects.
  {new old}*            Optional slot specification.

Overview:

The CHANGE command changes the class of {objects} to {newclass}.
Slots that exist in both the old and new class keep the same
value in the newly redefined object.  Slots in the new class
that do not exist in the old class are initialized according to
the optional {new old}* list, where each new slot in the
redefined instance receives the corresponding old slot value
from the old instance.

Examples:

Change all objects in Foo to be Pluck objects and
set the freq slot to the old note value:

	change * pluck freq note

Change the class of only midi-notes:

	{map * when (eq $class midi-note) 
               change pluck freq note}

See also:

MAP