ftp.nice.ch/pub/next/unix/music/cmn.sd.tar.gz

ACL3.1-on-NeXT3.n
 
README.cmn
 
accent.lisp
 
akcl-nsi
 
carl.cmn
 
ccarh93.cmn
 
clispcmn.c
[View clispcmn.c] 
cmn-all.lisp
 
cmn-clisp.lisp
 
cmn-ex.lisp
 
cmn-excl.lisp
 
cmn-grfx.lisp
 
cmn-init.lisp
 
cmn-kcl.lisp
 
cmn-mcl-utils.lisp
 
cmn-mcl.lisp
 
cmn-scroll.lisp
 
cmn.rtfd/
 
cmn.txt
[View cmn.txt] 
cmn.wn/
 
cmn0.lisp
 
cmn1.lisp
 
cmn2.lisp
 
cmn3.lisp
 
cmn4.lisp
 
cmnt.lisp
 
cmntocm.lisp
 
duke.cmn
 
franz.cmn
 
fred.cmn
 
fux.cmn
 
gus.cmn
 
henry.cmn
 
jimmy.cmn
 
joe.cmn
 
joh.cmn
 
loop.lisp
 
lyrics.lisp
 
mir.cmn
 
moz.cmn
 
nxtcmn.c
[View nxtcmn.c] 
pedal.lisp
 
percussion.lisp
 
pmn.lisp
 
quarter.lisp
 
rests.lisp
 
ring.lisp
 
transpose.lisp
 
wedge.lisp
 

README.cmn

    C O M M O N    M U S I C    N O T A T I O N


This directory contains the cmn source and documentation.  cmn is
built on Common Lisp, CLOS (pcl), PostScript, and the Adobe Sonata
font.  In this version, I've put everything in the cmn package.
Please send bug reports and suggestions to bil@ccrma.stanford.edu.


You can substitute Finale's Petrucci font for the Sonata font, but
it is not as good a font.  Other music fonts should also work because
nearly all of them follow the Sonata font's mapping of characters to
music symbols.  To try some other font (without doing it the "right"
way, of course, which would be to send me the font so I can fix up
any differences), push :Sonata on the *features* list (this is
the default), replace the line

  #+Sonata (defparameter Music-Font "Sonata")

in cmn-init.lisp with

  #+Sonata (defparameter Music-Font <the name of your font as a pathname>)

and try running cmn.


If you're running a strict level 1 PostScript interpreter (i.e. no
"rectfill" operator), see the comment at the beginning of
cmn-init.lisp -- you need to setf PS-level to 1 so that CMN can
generate replacement code for rectfill.


There's a mailing list for CMN news: cmdist@ccrma.stanford.edu.  To
get your address added to or removed from this list, send the request
to cmdist-request@ccrma.stanford.edu.  (Common Music and CLM use this
same mailing list). The archive of past messages (very incomplete
before June-94) is pub/Lisp/cmdistMail.


This software is available to anyone who is interested, free gratis
for nothing, without warranties of any kind.


Documentation is in cmn.wn (or cmn.rtfd, or in ascii form without
any fancy graphics: cmn.txt).


The examples are:

  carl.cmn     from "Archibald Douglas" by Karl Loewe
  franz.cmn    from a piano trio by Schubert
  fred.cmn     from a piano concerto by Chopin
  fux.cmn      part of a paper on automatic counterpoint
  gus.cmn      opening of last mvt of Mahler's 3rd
  henry.cmn    opening of "Thoreau" mvt of Ives' "Concord Sonata"
  joh.cmn      from Brahms' "A German Requiem"
  mir.cmn      from "Mir ist so wunderbar" in Beethoven's "Fidelio"
  moz.cmn      opening of a piano sonata by Mozart
  cmn-ex.lisp  some cmn code to do various useful things
  cmnt.lisp    the examples in cmn.wn
  duke.cmn     Archduke Trio excerpt for "Computing in Musicology" vol 8
  ccarh93.cmn  Various examples for "Computing in Musicology" vol 9
  jimmy.cmn    "The Blue-tail Fly" (example of lyrics)
  joe.cmn      Haydn op 76, no. 1 in flashy modern layout



The core CMN program is in the files cmn0..cmn4.lisp.  Other features
that are occasionally useful are implemented in:

  wedge.lisp        wedged beams like Bartok used for the bouncing ball rhythm
  pedal.lisp        all three piano pedals 
  accent.lisp       various 20th century articulation marks
  percussion.lisp   random symbols said to be useful in percussion scores
  ring.lisp         "ringing" notes -- i.e. tied off into space
  rests.lisp        various special case rests and abbreviated names for common rests
  lyrics.lisp       songs with multi-verse lyrics
  transpose.lisp    score/part transposition
  pmn.lisp          proportional notation
  quarter.lisp      quarter-tone symbols (non-standard)



The following describes how to get cmn going on:
  
  A NeXT with Allegro CL 3.1.20 and PCL, or Allegro CL 4.1
  An SGI Indigo with Allegro CL 4.1
  A NeXT or SGI with KCL (version 615 or later) and PCL (March 92 or later)
  Any machine running NeXTStep and KCL (known to work on a Pentium machine)
  A Mac II (system 7) with MCL 2.0.1
  A NeXT with Clisp (or presumably any machine with Clisp)

  or any computer with Common Lisp, CLOS, a music font, and a
    Postscript printer.

  AKCL is now known as Gnu Common Lisp, so replace AKCL with GCL below.


For most cases, you can probably use cmn-all.lisp to get everything
compiled and loaded.  There is a huge difference in performance in
the various systems -- see the end of cmn-init.lisp for some timing
data.



-------------------------
NeXT or SGI with ACL:

In Franz Allegro CL, in a shell or terminal, type

  NeXT:
         cc nxtcmn.c -c -O
  SGI Indigo:
         cc nxtcmn.c -c -G 0

and (if necessary) fix the pathname pointing to this .o file in
cmn-excl.lisp -- it's at the start of the file in the line 

 (load (merge-pathnames "nxtcmn.o" excl::*source-pathname*) ...)

Then fix the various pathnames in cmn-all.lisp and

:ld cmn-all

pcl and cmn assume you're running a case-insensitive lisp (I use
case-insensitive-upper in ACL). In ACL 3.1, you'll need to activate
the loop and pcl compile/load at the start of cmn-all.lisp).

"pcl" (or "pcl2c") in cmn-all.lisp stands for the pre-ACL 4.1 CLOS
implementation.  It is available free at ccrma-ftp.stanford.edu
as pub/Lisp/pcl.tar.Z.  Before compiling pcl, make sure the line 
in defsys.lisp defining the excl file extension is correct.  It 
should be:

	     #+excl                              ("lisp"  . "fasl")

Once loaded, 

  :pa cmn 

and you're ready to go

It takes a long time (ca 30 minutes) to compile, load, and run cmn the
first time, but after that it seems to be ok.

If you have ACL that worked on NeXT 1.n or 2.n, and want it to run on
NeXT 3.n, see the file ACL3.1-on-NeXT3.n.

There is a primitive previewer for cmn output on the NeXT -- Yap and
Preview are the "right" things to use, but if you just want a quick
automatic check, set *cmn-preview* to t, and remember to click in the
resulting window before doing anything else -- this window is not a
"real" NeXTStep window, so it is a bit dangerous to use.  If you want
to set the window to appear in a different location on the screen, set
the variables *preview-X0* and *preview-Y0*.

You can save the cmn image by calling (excl:dumplisp :name "cmn") --
it's probably best to compile cmn, then start lisp again and load it
before:

(gc t)
(in-package :cmn)
(excl:dumplisp :name "cmn" 
	       :restart-function #'(lambda (&rest args)
				     (declare (ignore args))
				     (tpl:setq-default *package*
						       (find-package :cmn))))



------------------------- 
NeXTStep with AKCL or GCL:

The following became out-of-date in August 94 when GCL replaced
AKCL.  See further below.

In akcl (available free at sonata.cc.purdue.edu as
pub/next/2.0-release/binary/AKCL-1-586.bin.tar.Z or
pub/next/2.0/binaries/akcl615.tar.Z, or at rascal.ics.utexas.edu
(128.83.138.20) as: pub/NeXT-akcl-1-605.tar.Z, pub/kcl.tar.Z, and
pub/akcl-1-605.tar.Z):

First get the latest pcl (the one mentioned above -- earlier versions
don't compile).  You also need the loop facility -- it's included in
the cmn release just in case you don't have it.  Also, you have to
increase kcl's process size: before making kcl, change BIG_HEAP_SIZE
in kcl/akcl/h/NeXT.h to #x2000000, then run add-defs and so on).

Fire up kcl in the pcl directory, make sure the kcl file extensions
are correct in defsys.lisp -- it should be:

             #+KCL                               ("lisp"   . "o")

Then check the various directory pathnames in cmn-all.lisp, choose
which music font you want, and

  (load "cmn-all.lisp")

When this finishes, exit kcl, and do it again (the first pass compiles
all the files, and the second loads them -- kcl doesn't have room to
do both in one pass).  Finally,

  (in-package "CMN")

and you're ready to go.  This process takes a VERY long time (i.e.
measured in hours).  I've noticed that the kcl version of cmn makes
odd line/page break decisions -- I don't know why.

On a NeXT 3.0 system, you have to make the following
changes to the 615 kcl version:

In akcl/c/NeXTunixsave.c, the declaration:

  extern struct section *getsectbyname(char *, char *);

causes a fatal compiler error.  The new declaration
(in /NextDeveloper/Headers/bsd/lib.h) is:

  extern const struct section *getsectbyname(
	 const char *segname, 
	       const char *sectname);

Later versions appear to have incorporated this change.  
Also, the library /usr/lib/libg.a is not included in the 3.0 release,
so remove the -lg switch from the LIBS statement in akcl/h/NeXT.defs.
(Do this before running add-defs and making kcl).  If you want the
NeXT previewer to work, you'll need to add "dpsops" to the library
list and the various identfiers required by that code (in nxtcmn.c) -- 
I'll make this list soon.

To run akcl under NeXTStep on Intel hardware, see the file
akcl-nsi.  You'll also need a later version of pcl -- contact
me if you can't find one that compiles.

You can save the cmn image by calling (si:save-system "cmn").

gcl is available from ftp.cli.com (for more info, download the file
"gcl.README" from prep.ai.mit.edu:/pub/gnu).  In gcl, get pcl-gcl-1.0
for CLOS.  Currently, you have to uncompress other/kcl-low.lisp.gz,
copy it to the main pcl directory, and compile and load it with the
rest of pcl -- I assume this will be fixed in later releases.



------------------------- 
Mac with MCL 2.0.1:

If you don't have MacCompress and Tar (for the Mac), they are
available in macunix.sit.hqx found on the pub/Lisp directory at
ccrma-ftp.stanford.edu.  You'll want to read the associated readme
files before un-tarring CMN (the main thing is to make sure the Unix
ctrl-J's become Mac ctrl-M's -- this happens automatically if you set
the "kind" field to TEXT.  Since every cmn file starts with a comment,
if you forget this translation, cmn will compile very rapidly and do
nothing).

Before starting the compilation process, give the lisp image more heap
space: select the lisp image, hit APPLE-i (i.e. FILE menu option "Get
Info"), type in 8000 in the little field in the lower right hand
corner of the pop-up window (the one labelled "perferred size" on my
Mac).  Then fire up MCL, fix up the cmn pathnames in cmn-all.lisp, and
load cmn-all.lisp.  Once compiled and loaded, you can save the state
of MCL with save-application; there's an example in the Common Music
file utilities.lisp. Once I become a Mac wizard, tomorrow maybe, I'll
make this easier to do in CMN.

The output pathname defaults to "aaa.eps" which is ok on a Unix
system, but doesn't make much sense on a Mac -- you'll want to reset
*cmn-output-pathname* to your take local directory into account --
(setf *cmn-output-pathname* "HD:bil:cmn:aaa.eps") for example.

I plan to make an editor for CMN on the Mac someday.  In the meantime,
there's a previewer -- set (output-type :quickdraw) and CMN outputs a
lisp quickdraw program.  If the output fits on one page, a scrollable
window with a ragged approximation to the PostScript results is
displayed.  I don't plan to try to improve the Quickdraw rendition --
just remember that to a large extent, what you see is a lot worse than
what you'll get on a printer.

You can save the cmn image by calling (save-application "<cmn image name>").


------------------------- 
NeXT with Clisp:

Clisp is a free lisp available via anonymous ftp from
ma2s2.mathematik.uni-karlsruhe.de [129.13.115.2], directory
/pub/lisp/clisp/.  For the NeXT, get the precompiled form in the clisp
directory binaries/next. 

Next, get the clisp version of pcl (Clisp's built-in CLOS support is
inadequate for CMN).  It's on the clisp directory packages as
something like pcl.sept92f.clisp.tar.z (uncompressed with the Gnu
program Gzip or Gunzip).  You'll also need the "real" loop -- it's
included in the cmn files.

In cmn-all.lisp fixup the pathnames that point to the pcl directory,
the loop file (default is the cmn directory), and the cmn directory
itself ("cmn-dir").  If you have a version of Clisp with a
foreign function interface, cc clispcmn.c -c -O.  

Finally, fire up Clisp in the cmn directory, and (load "cmn-all.lisp").
Toward the start of the process it will stop and ask which ITERATE
you want -- choose ITERATE::ITERATE (normally choice 1).  After
about a half hour, it will stop and complain about loading pcl.
Type abort and (bye), restart Clisp, and (load "cmn-all.lisp")
again.  Once it's done (after about an hour or so), you can save 
the cmn image by calling (saveinitmem).


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.