[CM] mark-explode modifications

cristopher pierson ewing cewing@u.washington.edu
Thu, 24 Jun 2004 15:57:09 -0700 (PDT)


Thanks a ton for the pointers there.  I was using some scheme manual
on-line at MIT and didn't find any of those things.  I'm a LISPer just
getting started coding scheme, any suggestions on good references I can
keep handy so i don't waste time re-inventing the wheel?

Thanks,

C

********************************
Cris Ewing
CME and Telehealth Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************


On Thu, 24 Jun 2004 rm@fabula.de wrote:

> On Thu, Jun 24, 2004 at 01:57:47PM +0200, rm@fabula.de wrote:
> > On Wed, Jun 23, 2004 at 12:19:35PM -0700, cristopher pierson ewing wrote:
> > > So here's my stab at the facility of naming exploded sounds after the
> > > original sound they were created from:
> > >
> > > ;;;------find-char
> > > (define (find-char string char)
> > > 	(do ((position 0)
> > > 		 (i 0 (+ i 1)))
> > > 		((= i (string-length string)) position)
> > > 	  (if (char=? char (string-ref string i))
> > > 	  	(set! position i))))
> >
> >
> > You might want to use 'string-index'
> >
> >  guile> (string-index "A long and uggly string" #\i)
> >  20
> >
> > You can find such gems with:
> >
> >  (apropos "string")
> >
> >  ......
> >
> > For string handling i suggest using the SRFI module for strings:
> >
> >  guile> (use-modules (srfi srfi-13))
> >  guile> (define (trim-name name)
> >  ...      (string-drop-right name (- (string-length name) (string-index name #\.))))
> >  guile> (trim-name "a-sound.afi")
> >  "a-sound"
>
> Hate to follow up my own posts:
>
>   guile> (use-modules (srfi srfi-13))
>   guile> (define (trim-name name)
>   ...      (string-take name (string-index name #\.)))
>   guile> (trim-name "a-sound.aif")
>   "a-sound"
>
> HTH RalfD
>
>
> > HTH Ralf Mattes
> >
> > _______________________________________________
> > Cmdist mailing list
> > Cmdist@ccrma.stanford.edu
> > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>