Thanks. Just for old times sake, here's how to do it in OpenVMS DCL.
Invoke: @UnJazz clip.txt clip.out, where clip.txt holds the input clip and... well, you figure it out.
How this must be rewritten for pairs of (16.,32) and others is left as an exercise for the reader.
/Wilm
File UnJazz.COM
$ get := read infile /end=EOI
$ put := write outfile
$!
$ open /read infile 'P1'
$ open /write outfile 'P2'
$ LOOP:
$ have_rec2 = 0
$ get rec
$ if F$element(1,"|",rec).nes."Note" then goto PUT
$ if F$element(2,"|",rec).nes."Dur:8th,Dotted" then goto PUT
$!
$! Now we have a dotted 8th, read the next record...
$!
$ get rec2
$ have_rec2 = 1
$ if F$element(1,"|",rec2).nes."Note" then goto PUT
$ if F$element(2,"|",rec2).nes."Dur:16th" then goto PUT
$!
$! Now we have a pair of [dotted 8th,16th], modify the records...
$!
$ fr = "8th,Dotted"
$ to = "8th"
$ di = F$len(fr)-F$len(to)
$ ifrom = F$loc(fr,rec)
$ rec = F$ext(0,ifrom,rec)+to+F$ext(ifrom+F$len(to)+di,255,rec)
$!
$ fr = "16th"
$ to = "8th"
$ di = F$len(fr)-F$len(to)
$ ifrom = F$loc(fr,rec2)
$ rec2 = F$ext(0,ifrom,rec2)+to+F$ext(ifrom+F$len(to)+di,255,rec2)
$ PUT:
$ put rec
$ if .NOT.have_rec2 then goto LOOP
$ put rec2
$ goto LOOP
$ EOI:
$ close infile
$ close outfile