(FILECREATED "31-Jul-84 09:23:27" {ERIS}<SPEECH>NSPECPATCH.;3 8776 changes to: (VARS NSPECPATCHCOMS BFFTBUF1END) (FNS SPECTRUMSCALEDREDISPLAY SPEECHDEMOINIT PATCHINIT) previous date: "31-Jul-84 08:38:44" {ERIS}<SPEECH>NSPECPATCH.;1) (* Copyright (c) by NIL. All rights reserved.) (PRETTYCOMPRINT NSPECPATCHCOMS) (RPAQQ NSPECPATCHCOMS ((FNS PATCHINIT SPECTRUMSCALEDREDISPLAY SPEECHDEMOINIT) (VARS BFFTBUF1END THRESHPAIRS HALFTONE) (P (PATCHINIT) (PUTWINDOWPROP (PROGN (HELP "POINT TO SPECTRUM WINDOW AND TYPE R-E-T-U-R-N") (WHICHW)) 'BWINDOWWEIGHTSSHUFFLED BWINDOWWEIGHTSSHUFFLED) (RESTART.ETHER)))) (DEFINEQ (PATCHINIT [LAMBDA NIL (* edited: "31-Jul-84 09:05") (PROGN (SETQ BSHUFFLE (ARRAYBASE SHUFFLE)) (SETQ BWAVE (ARRAYBASE WAVE)) (SETQ BSUBWAVESHUFFLEDSMALLP (ARRAYBASE SUBWAVESHUFFLEDSMALLP)) (SETQ BSUBWAVESHUFFLEDFLOATP (ARRAYBASE SUBWAVESHUFFLEDFLOATP)) (SETQ BWINDOWWEIGHTSSHUFFLED (ARRAYBASE WINDOWWEIGHTSSHUFFLED)) (SETQ BSUBWAVEWEIGHTEDFLOATP (ARRAYBASE SUBWAVEWEIGHTEDFLOATP)) (SETQ BSUBWAVEWEIGHTEDCOMPLEX (ARRAYBASE SUBWAVEWEIGHTEDCOMPLEX)) (SETQ BHALFTONE (ARRAYBASE HALFTONE)) (SETQ BLOGMAGNITUDE (ARRAYBASE LOGMAGNITUDE)) (SETQ BFFTOUT (ARRAYBASE FFTOUT)) (* pointer to last complex (i.e. last quadword of array) ) (SETQ BFFTBUF1 (ARRAYBASE FFTBUF1)) (SETQ BFFTBUF2 (ARRAYBASE FFTBUF2)) (SETQ BFFTBUF1END (\ADDBASE BFFTBUF1 (IDIFFERENCE (LLSH 4 PASSES) 4))) (SETQ BMAGNITUDESQUARED (ARRAYBASE MAGNITUDESQUARED]) (SPECTRUMSCALEDREDISPLAY [LAMBDA (WINDOW REGION DATALEFT) (* edited: "31-Jul-84 09:07") (DECLARE (LOCALVARS . T)) (PROG ((PASSES (GETWINDOWPROP WINDOW 'PASSES)) (DATAREGION (GETWINDOWPROP WINDOW 'DATAREGION)) (LEFT (fetch (REGION LEFT) of REGION)) (WIDTH (IDIFFERENCE (fetch (REGION WIDTH) of REGION) (SUB1 GWIDTH))) (BHALFTONE (ARRAYBASE HALFTONE)) (BASE (BASEADDROFY WINDOW 0)) [DD (fetch IMAGEDATA of (GETWINDOWPROP WINDOW 'DSP] (WINDOWWIDTHINWORDS 64) (BWINDOWWEIGHTSSHUFFLED (GETWINDOWPROP WINDOW 'BWINDOWWEIGHTSSHUFFLED)) (BFFTTABLE (ARRAYBASE FFTTABLE)) (BARHEIGHT (GETWINDOWPROP WINDOW 'BARHEIGHT)) (WindowToDataFactor (GETWINDOWPROP WINDOW 'WindowToDataFactor)) (BOTTOM.X.SCALE.OFFSET (GETWINDOWPROP WINDOW 'BOTTOM.X.SCALE.OFFSET)) (GWIDTH (GETWINDOWPROP WINDOW 'BARWIDTH)) PASSESMINUS1 START END WINDOWBASE XPOS BARHEIGHT TWICEFFTSHIFT TWICEGWIDTH TWICEARRAYLENGTH ARRAYLENGTH HALFARRAYLENGTH TBL1 TBL2 TBL3 TBL4 TBL5 TBL6 TBL7 TBL8) (SETQ TWICEFFTSHIFT (IPLUS FFTSHIFT FFTSHIFT)) (SETQ ARRAYLENGTH (LLSH 1 PASSES)) (SETQ TWICEARRAYLENGTH (IPLUS ARRAYLENGTH ARRAYLENGTH)) (SETQ TWICEGWIDTH (IPLUS GWIDTH GWIDTH)) (SETQ TBL1 (\GETBASEPTR BFFTTABLE 0)) (SETQ TBL2 (\GETBASEPTR BFFTTABLE 2)) (SETQ TBL3 (\GETBASEPTR BFFTTABLE 4)) (SETQ TBL4 (\GETBASEPTR BFFTTABLE 6)) (SETQ TBL5 (\GETBASEPTR BFFTTABLE 8)) (SETQ TBL6 (\GETBASEPTR BFFTTABLE 10)) (SETQ TBL7 (\GETBASEPTR BFFTTABLE 12)) (SETQ TBL8 (\GETBASEPTR BFFTTABLE 14)) (SETQ BARHEIGHT (GETWINDOWPROP WINDOW 'BARHEIGHT)) (SETQ PASSESMINUS1 (SUB1 PASSES)) [SETQ DATALEFT (OR DATALEFT (GETWINDOWPROP WINDOW 'DATALEFT] (* = (EXPT 2 PASSES)) (TOTOPW WINDOW) (SETQ HALFARRAYLENGTH (HALF ARRAYLENGTH)) [SETQ WINDOWBASE (\ADDBASE BASE (IMINUS (ITIMES (IPLUS (HALF BOTTOM.X.SCALE.OFFSET) (ITIMES BARHEIGHT HALFARRAYLENGTH)) 64] (SETQ XPOS (IPLUS DATALEFT (fetch (REGION LEFT) of REGION))) (SETQ START (FIX (FTIMES (FQUOTIENT FFTSHIFT GWIDTH) XPOS))) [SETQ END (FIX (FTIMES (FQUOTIENT FFTSHIFT GWIDTH) (IPLUS XPOS WIDTH] (for DATAPTR from START to END by TWICEFFTSHIFT as WINDOWPTR from LEFT by TWICEGWIDTH do (\BLKPERM (\ADDBASE BWAVE DATAPTR) BSHUFFLE BSUBWAVESHUFFLEDSMALLP TWICEARRAYLENGTH) (\BLKSMALLP2FLOAT BSUBWAVESHUFFLEDSMALLP BSUBWAVESHUFFLEDFLOATP TWICEARRAYLENGTH) (\BLKFTIMES BSUBWAVESHUFFLEDFLOATP BWINDOWWEIGHTSSHUFFLED BFFTBUF1 TWICEARRAYLENGTH) (* \BLKFLOATP2COMP BSUBWAVEWEIGHTEDFLOATP BFFTBUF1 ARRAYLENGTH) (* for PASS from 0 to PASSESMINUS1 do (FFTSTEP (\GETBASEPTR BFFTTABLE (LLSH PASS 1)))) (FFTSTEP TBL1) (FFTSTEP TBL2) (FFTSTEP TBL3) (FFTSTEP TBL4) (FFTSTEP TBL5) (FFTSTEP TBL6) (FFTSTEP TBL7) (FFTSTEP TBL8) (\BLKSEP BFFTBUF1END BFFTBUF1 BFFTOUT HALFARRAYLENGTH) (\BLKMAG BFFTOUT BMAGNITUDESQUARED ARRAYLENGTH) (* \BLKMAG BFFTBUF1 BMAGNITUDESQUARED ARRAYLENGTH) (\BLKEXPONENT BMAGNITUDESQUARED BLOGMAGNITUDE ARRAYLENGTH) (* IBLT BLOGMAGNITUDE BHALFTONE (\DSPTRANSFORMX WINDOWPTR DD) WINDOWBASE WINDOWWIDTHINWORDS BARHEIGHT GWIDTH HALFARRAYLENGTH) (IBLT2 BLOGMAGNITUDE BHALFTONE (\DSPTRANSFORMX WINDOWPTR DD) WINDOWBASE WINDOWWIDTHINWORDS BARHEIGHT GWIDTH HALFARRAYLENGTH) (IBLT2 (\ADDBASE BLOGMAGNITUDE 1) BHALFTONE (\DSPTRANSFORMX (IPLUS GWIDTH WINDOWPTR) DD) WINDOWBASE WINDOWWIDTHINWORDS BARHEIGHT GWIDTH HALFARRAYLENGTH]) (SPEECHDEMOINIT [LAMBDA (WAVEFILE PASSES FIRSTBYTE) (* edited: "31-Jul-84 09:02") (SETQ SHUFFLE6 (DOUBLEPERMINIT 6)) (SETQ SHUFFLE8 (DOUBLEPERMINIT 8)) (SETQ SHUFFLE (COND ((EQ PASSES 6) SHUFFLE6) (T SHUFFLE8))) (SETQ SUBWAVESHUFFLEDSMALLP (ARRAY 512 'WORD 0 0)) (SETQ SUBWAVESHUFFLEDFLOATP (ARRAY 512 'FLOATP 0.0 0)) (SETQ SUBWAVEWEIGHTEDFLOATP (ARRAY 512 'FLOATP 0.0 0)) (SETQ SUBWAVEWEIGHTEDCOMPLEX (ARRAY 512 'FLOATP 0.0 0)) (SETQ FFTBUF1 (ARRAY 512 'FLOATP 0 0 256)) (SETQ FFTBUF2 (ARRAY 512 'FLOATP 0 0 256)) (SETQ FFTOUT (ARRAY 512 'FLOATP 0 0 256)) (SETQ MAGNITUDESQUARED (ARRAY 256 'FLOATP 0.0 0)) (SETQ LOGMAGNITUDE (ARRAY 256 'WORD 0 0)) (OR WAVE (PROGN (SETQ WAVE (ARRAY 50000 'WORD 0 0)) (READWAVE WAVE 0 35000 WAVEFILE FIRSTBYTE))) (SETQ WINDOWWEIGHTSSHUFFLED (COND ((EQ PASSES 6) KAISER6) (T KAISER8))) (SETQ \FFTTABLE (create FFTTABLE)) (SETQ WAVEFORMSTART 1) (OR WAVEFORMEND (SETQ WAVEFORMEND (PLUS WAVEFORMSTART 300))) (PROGN (SETQ BSHUFFLE (ARRAYBASE SHUFFLE)) (SETQ BWAVE (ARRAYBASE WAVE)) (SETQ BSUBWAVESHUFFLEDSMALLP (ARRAYBASE SUBWAVESHUFFLEDSMALLP)) (SETQ BSUBWAVESHUFFLEDFLOATP (ARRAYBASE SUBWAVESHUFFLEDFLOATP)) (SETQ BWINDOWWEIGHTSSHUFFLED (ARRAYBASE WINDOWWEIGHTSSHUFFLED)) (SETQ BSUBWAVEWEIGHTEDFLOATP (ARRAYBASE SUBWAVEWEIGHTEDFLOATP)) (SETQ BSUBWAVEWEIGHTEDCOMPLEX (ARRAYBASE SUBWAVEWEIGHTEDCOMPLEX)) (SETQ BHALFTONE (ARRAYBASE HALFTONE)) (SETQ BLOGMAGNITUDE (ARRAYBASE LOGMAGNITUDE)) (SETQ BFFTOUT (ARRAYBASE FFTOUT)) (* pointer to last complex (i.e. last quadword of array) ) (SETQ BFFTBUF1 (ARRAYBASE FFTBUF1)) (SETQ BFFTBUF2 (ARRAYBASE FFTBUF2)) (SETQ BFFTBUF1END (\ADDBASE BFFTBUF1 (IDIFFERENCE (LLSH 4 PASSES) 4))) (SETQ BMAGNITUDESQUARED (ARRAYBASE MAGNITUDESQUARED))) (SETQ FFTTABLE (FFTTABLEINIT BFFTBUF1 BFFTBUF2 PASSES]) ) (RPAQQ BFFTBUF1END {}#56,67374) (RPAQQ THRESHPAIRS ((145 . 0) (146 . 2) (148 . 9) (255 . 15))) (RPAQ HALFTONE (READARRAY 256 (QUOTE SMALLPOSP) 0)) (0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 9 9 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 NIL ) (PATCHINIT) (PUTWINDOWPROP (PROGN (HELP "POINT TO SPECTRUM WINDOW AND TYPE R-E-T-U-R-N") (WHICHW)) 'BWINDOWWEIGHTSSHUFFLED BWINDOWWEIGHTSSHUFFLED) (RESTART.ETHER) (DECLARE: DONTCOPY (FILEMAP (NIL (675 7767 (PATCHINIT 685 . 1651) (SPECTRUMSCALEDREDISPLAY 1653 . 5788) (SPEECHDEMOINIT 5790 . 7765))))) STOP