[CM] Hacking mark-explode

cristopher pierson ewing cewing@u.washington.edu
Wed, 23 Jun 2004 10:52:46 -0700 (PDT)

Okay, I figured out how to change the output file type and I've rewritten
mark-explode in my copy of marks.scm to write out filenames ending in aif.

Now I'd like to hack it a bit further so that I can have the names of the
output files be based on the name of the input file.  In other words, a
file name my-sound.aif, with 10 marks in it, will result in output files
named my-sound-0.aif, my-sound-1.aif, . . ., my-sound-9.aif.

In fact, I think it'd be nifty if I could have it so that the sound output
type was set according to the type of the input file, .snd would write
.snd files, .aif would write .aif files, etc.  Maybe it would be cool to
have an optional argument that would over-ride this behavior in the case
that you wanted to write out files in a different format than the

I can write the switches and the name extraction code myself for this,
in fact, it'd be a good excercise in learning scheme, but I'm unsure how
to get at the data for the soundfile.  The code for (mark-explode) doesn't
take any arguments, and yet it finds the marks in the audiofile.  How is
this magic performed?

learning slowly but surely,


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