[CM] update to "Nudruz" CM library

Drew Krause drkrause@mindspring.com
Tue, 09 Jan 2007 22:13:47 -0500


Hello all Common Music users,

I've updated my repository of Common Music functions at

http://www.wordecho.org/code/cmcode/cmusic.html

including:

1) Making existing functions compatible with CM 2.9.1;
2) Adding lots of functions;
3) Fixing a zillion or so bugs.

By way of a 'teaser', I've grepped the main "nudruz.lisp" file below. Enjoy!

Drew Krause

(defun aaron3pt (dux b-pit s-pit &optional (consvec '(0 3 4 7 8 9)))
(defun aaron4pt (dux b-pit a-pit s-pit &optional (consvec '(0 3 4 7 8 9)))
(defun abs-intv (x y &optional (modlen 12))
(defun all-combos (inlists &optional (flatflag nil))
(defun all-contours-in-set (contourlist a-list)
(defun allrowperms (a-list)
(defun allrows (a-list)
(defun allrows-bytype (a-list trtype)
(defun all-sections-with-dur (dur)
(defun all-subsequences (a-list)
(defun alltransp (alist &optional (modlen 12))
(defun alternate (lists)
(defun any-eql (a b)
(defun any-lcm (&rest nums)
(defun apply-across (op list1 list2)
(defun apply-perm (permlist a-list)
(defun arpegg (alist pitnums atknums &optional (notflat 'nil))
(defun array->list (ary)
(defun atkpts (totalen indurs &optional (offset 0))
(defun au-contraire (melody duxpoint &optional
(defun avg-chdpit (chd)
(defun avoidurs (pladur backdur &optional (use-lcm nil))
(defun bestpath (alist &optional (ordered-flag nil))
(defun bins-by-val (alist func)
(defun bottomline (a-list)
(defun bumpup (alist &optional (octsize 12))
(defun bzms-chain (chd1 chd2 &optional (chainlen 2))
(defun bzms-shadow (chd1 chd2)
(defun bzmult-simple (chd1 chd2)
(defun c-distance (acontour)
(defun chain-contour-util (list1 list2)
(defun chdheight (achord)
(defun chdinv-down (alist &optional (oct-size 12))
(defun chd-inversion (alist index &optional (oct-size 12))
(defun chdinv-up (alist &optional (oct-size 12))
(defun chdmatch (chd1 chd2)
(defun chds->lines (chdlist)
(defun c-height (acontour)
(defun chooser (idxs alist)
(defun chordints (alist)
(defun chrom (alist)
;; (defun city-blocks (list)
(defun clip-hi (num a-list)
(defun clip-lo (num a-list)
(defun closest (list1 list2)
(defun closest-mod (list1 list2 &optional (modlen 12))
(defun combine-pits (pitlist tplist)
(defun concorde-edgeweights (chdlist)
(defun conjunct-fragments (melody &optional (jumpsize 12))
(defun consmatch (blist alist &optional (fill-rests 't) (consvec '(3 4 8 
9)))
(defun consn-p (x y &optional (consnlist '(3 4 8 9)))
(defun containsv (chd tstform &optional (prime-only-flag nil))
(defun contour-chain (contourlist)
(defun contour-equiv (inpits inlens)
(defun copylist (a-list mult)
(defun correct-pitlist (pits)
(defun curved-path (start end curve-idx totalen)
(defun c-width (acontour)
(defun dia (alist)
(defun diachrom (alist)
(defun diachrom-filt (alist diachromval)
(defun directions (melody)
(defun divver (divnum &optional (bignum 1))
(defun divvy-up (mlen subdiv &optional (numtype 'float))
(defun doubler (alist tlevel &optional (op #'+))
(defun drunkvec (startpit len &optional (stepsize 1))
(defun dur-density (durs)
(defun durfunc (totalen points funct)
(defun durs->slots (pits durs)
(defun durs->tpvec (int-list &optional (startplace 0) (tplen 12))
(defun durweight (pitvec &optional (basedur 1))
(defun each-distance (list &optional (ordered-flag nil))
(defun embed (targetmel figure &optional (flatp nil))
(defun embell-triad (triad &optional (steps 3))
(defun end-with (input item)
(defun entropy (vec &optional (iflag nil))
(defun eql-summer (targetnum componentnums)
(defun erasedurs (edurs basedurs &optional (use-lcm nil))
(defun every-pctransp (chd)
(defun expand (lists &optional (flatp nil))
(defun expwarp (pits factor &optional (bassnote nil))
(defun extract (alist etest)
(defun extractdurs (edurs basedurs &optional (use-lcm nil))
(defun fastspace (&optional (initval 0))
(defun fast-tact (a-list)
(defun ferncyc (mlens subdivs &optional (durs '(1)))
(defun ferney (mlens subdivs &optional (durs '(1)) (numtype 'rat))
(defun fillin (alist)
(defun filt-by-melint (amel intvs)
(defun filter (alist etest)
(defun fixrhythm (a-melody rhyt-pairs)
(defun flatten (x)
(defun floats->rats (input)
(defun frag (pits durs len)
(defun frags (pits durs lengths)
(defun fromto (list1 list2)
(defun fromto-stepper (slist elist)
(defun gather-pits (binaryfunc melody)
(defun get-densities (durlists)
(defun get-x (aplot)
(defun get-y (aplot)
(defun give-contour-to-mel (contour mel)
(defun give-contour-to-set (contourlist a-list)
(defun heapvec (len &optional (modlen 12) (transplevel 0))
(defun higherchord (chd1 chd2)
(defun histplot (histog)
(defun hits->ints (a-list)
(defun holes (alist)
(defun hz->keys (input)
(defun inbetween (anumber alist)
(defun indices (len &optional (base 0))
(defun interlock (list1 list2 num1 num2 &optional (notfullcyc nil))
(defun intv (x y)
(defun inverse-idx (a-chd &optional (modlen 12))
(defun invert-chd (chd)
(defun iso (pits durs)
(defun is-palindrome (alist)
(defun itranspvec (chd &optional (wsubl nil))
(defun ivec (alist)
(defun jumpy->smooth (cntrlist)
(defun layout (factor pitlist)
(defun leapdur (pitvec &optional (basedur 1) (melscale 1))
(defun len-eql (list1 list2)
(defun lenfit (alist len)
(defun like-flat (alist)
(defun line-from-mels (offset ints)
(defun listdist-mod (lst1 lst2 &optional (modlen 12))
(defun listdist (pits1 pits2 &optional (ordered-flag nil))
(defun list-eql (list1 list2)
(defun listinv (a-list)
(defun list> (list1 list2)
(defun listmean (alist)
(defun list>place (list1 list2)
(defun list<sort (lists)
(defun listsub (news olds inlist)
(defun list>-util (list1 list2)
(defun lowerchord (chd1 chd2)
(defun make-poly (mel texture)
(defun make-ties (mel)
(defun match2lists (inlist1 inlist2 &optional (flatflag nil))
(defun matchreg-chds (chdlist &optional (ordflag nil))
(defun matchreg (thing1 thing2 &optional (ordflag nil) (mlen 12))
(defun melint-count (a-melody intv)
(defun melint->line (startnum int-vector)
(defun melint (list &optional (skip 1))
(defun mel-stress (mel stresslist &optional (skewfactor 8))
(defun menses (a-list rate)
(defun merge-poly (mels texture)
(defun merge-slots (&rest lists)
(defun midi-in (midifile)
(defun midline (a-list)
(defun minmax-filt (a-list &optional (filtmin 21) (filtmax 108))
(defun mod12 (input)
(defun mod-intv (x y &optional (ordflag nil) (modlen 12))
(defun modlist (input &optional (modlen 12))
(defun modmult (input multnum modnum)
(defun modsum (x y &optional (modlen 12))
(defun morph-arpegg (chds inlens durs
(defun morph-arpg-pair (chd1 chd2 len durs &optional (perlen1 1) 
(perlen2 1))
(defun mr (a b &optional (modlen 12))
(defun mt-rhyareas (int1 int2 lens &optional (mtinit 0))
(defun mt-rhyvec (int1 int2 len &optional (mtinit 0))
(defun mtrptlen (tactlen int1 int2)
(defun mtspacef (&optional (initval 0))
(defun mts-subs (inlist rpvec)
(defun multievent (class arg &rest args)
(defun multiple-assoc (thing alist)
(defun multquant-atx (divs &optional (bignum 1))
(defun multquant (divlist &optional (bignum 1))
(defun myhand (a-list an-intvl dblint &optional (dbltype 'start))
(defun nearest-mult (input modnum)
(defun nearest-pcform (chd pcform &optional (ordflag nil))
(defun neighbor-compl (num alist)
(defun neighbor (num alist)
(defun nextcons (y x movement &optional (oblq nil) (consvec '(3 4 8 9)))
(defun no-nils (a-list)
(defun norests (alist)
(defun normal-form (chd)
(defun norpt (melody)
(defun norpt-rand (alist)
(defun norpt-randpatt (alist &optional (periodlen 1))
(defun norpt-weights (alist)
(defun not-flat (alist)
(defun ntn->clist (antn)
(defun ntn->clists (antn binsize)
(defun octavespread (pit &optional (spreadmin 21) (spreadmax 108) 
(modlen 12))
(defun ois (chd)
(defun ornadurs (inpits indurs)
(defun pad-pitches (smallchd largechd)
(defun parse-by-reg (melody &optional (octsize 12) (base 0))
(defun patt-to-sum (patt len)
(defun pcsubset (chd1 chd2)
(defun permutations (a-list)
(defun permutelist (aperm amel)
(defun pick-by-val (val binlist)
(defun pick-stress (len numvec stresslist &optional (skewfactor 8))
(defun pitseq (pits levels)
(defun placereg (inpits reg &optional (modindex 12) (regbase 24))
(defun play-sd (slotsdurs basedur)
(defun plists (inpits indurs)
(defun plot1d (indata)
(defun poisson->code (fact len div &optional (treeflag nil))
(defun poissonvec (p n)
(defun poly-stress (mel stresslist &optional (skewfactor 8))
(defun popin (alist &optional (fills 1))
(defun popout (alist &optional (holes 1))
(defun populate (nuthings oldthings)
(defun positions (num alist)
(defun prebump (contour melody)
(defun prep-rhythms (dlist)
(defun primefilt (alist pcvec &optional (prime-only-flag nil))
(defun proper-subsets (a-list)
(defun ptcollect-util (pt combos)
(defun quantdurs (indurs qval-in &optional (give-polyvec nil))
(defun quantdurs-patt (durlist qlev-in)
(defun quantranplay (input-pits rsegs quants &optional (flat-output nil))
(defun quantranplot (input-pits rsegs quants &optional (flat-output nil))
(defun quantran (rsegs quants &optional (returnpoly nil))
(defun rand-arpegg (alist lens)
(defun randdur (maxdur)
(defun randmel (list-len &optional (modlen 12))
(defun random-indices (len)
(defun randrests (inlist totalen)
(defun randscaley (minindex topindex totalen)
(defun randsteps-single (startpit length &optional (lobound 0) 
(highbound 128))
(defun randsteps (startpit length &optional (lobound 0) (highbound 128))
(defun randvec (len &optional (modlen 12) (transplevel 0))
(defun rarpegg (alist len)
(defun relgraph (biglen
(defun rel-primes (alist &optional (len 2))
(defun remove-rpts (inlist)
(defun reorder-by-melint (a-list mel-intv)
(defun repeater (inlist rpter)
(defun replace-intv (a-list a-int rplc-int)
(defun resclassvec (&rest rclasses)
(defun resultant (durlist)
(defun rhytpairvec (int1 int2)
(defun rowperms-bytype (a-list trtype)
(defun ryte (pits durs &optional (atx 100) (chan 9))
(defun safesort (a-list)
(defun same-diachrom (alist &optional (lens (length alist)))
(defun same-shape (frag alist)
(defun scf (newbies target-list)
(defun scrunch (alist newlen)
(defun sections (vals durs changedurs)
(defun self-expand (mel indx &optional (flatp nil))
(defun self-stretto (mel vcs intvl &optional (waitlen 1))
(defun seq-eql (list1 list2)
(defun shuffle-all (alist)
(defun shufflebymod (alist factor &optional (modlen 12))
(defun siftout (a-list modlen places)
(defun slonim (firstacc melody &optional (nomerge nil) (nomatch nil))
(defun slots->durs (melody)
(defun slots->tpoints (slotvec &optional (modlen 12))
(defun slowline (alist durvec &optional (offset 0))
(defun smooth->jumpy (cntrlist)
(defun smooth (list1 list2)
(defun smoothlist (alist)
(defun smorph (chds inlens &optional (perlen 1))
(defun smorph-pair (chd1 chd2 len &optional (perlen1 1) (perlen2 1))
(defun snake (height len &optional (direction 'up))
(defun sort-by-start (listlist)
(defun sort-by-width (cntrlist)
(defun sort-every (alist)
(defun splay (inpits indurs &optional (chan 0))
(defun splotter (inpits indurs)
(defun spsequence (inpits indurs levels)
(defun squeezedurs (durs len)
(defun stack-by (a-list intv &optional (oct-size 12))
(defun stack-up (a-list &optional (oct-size 12))
(defun startingrestnum (alist)
(defun step-increm (slist elist)
(defun stravrot (alist &optional (nestp 'nil))
(defun strumfit (durlist max-upatx)
(defun strums (iters min-db max-db min-upatx max-upatx &optional (mval 1))
(defun stutlist (pitsndurs stutlen &optional (endtype 'long))
(defun stutter (pit len stutlen &optional (endlen 'long))
(defun subsequences (a-list subseqlen)
(defun subsets-len (a-list len)
(defun sum-across-all (baselist durlist)
(defun sum-across (baselist durlist)
(defun sumpatt (len patt &optional (nosqueeze nil))
(defun sumsort (alist)
(defun sumsort-dn (alist)
(defun sumvec (alist &optional (modlen 12))
(defun take-contour (a-list)
(defun take-ntn-contour (alist)
(defun take-poly (a-list)
(defun takereg (input &optional (basepit 0) (modlen 12))
(defun take-subcontours (alist clens)
(defun tempo-shape (divlist totlen)
(defun tendreg (chdlist &optional (ordflag nil) (basepit 0) (modlen 12))
(defun thinout (alist)
(defun tievec (alist)
(defun timefunc (points funct)
(defun tn-type (chd)
(defun topline (a-list)
(defun topsort (alist)
(defun topsort-dn (alist)
(defun topsumsort (alist)
(defun topsumsort-dn (alist)
(defun total-distances (list &optional (ordered-flag nil))
(defun tpoints (vec places &optional (tplen 12))
(defun transp (input level &optional (op #'+))
(defun transp-to (level input)
(defun transpvec (chd &optional (wsubl nil))
(defun traverse-pts (list1 list2)
(defun tr-by-grp (a-list nums levels &optional (op #'+))
(defun trichord-p (a-list pit trich)
(defun tricp (duo pit trich)
(defun trimatch (blist alist trich &optional (fill-rests 't))
(defun tr-insert (alist levels op)
(defun trope (inpits indurs tropits trodurs test &optional (testpd nil))
(defun valbytime (changedurs vals durs)
(defun vec->list (avec)
(defun wiggle (startnum len allowed-ints)
(defun wiggle-to (startnum endnum steps allowed-ints)
(defun wigline (a-line durlist intvs)