From 46e1610c9166266ae8b7d9c4511d92e1cb081853 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Thu, 13 Jan 2022 11:25:14 -0500 Subject: [PATCH] delete scratch paper file --- ...luidWaveform spectrogram scratch paper.scd | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 test/FluidWaveform spectrogram scratch paper.scd diff --git a/test/FluidWaveform spectrogram scratch paper.scd b/test/FluidWaveform spectrogram scratch paper.scd deleted file mode 100644 index 06e7792..0000000 --- a/test/FluidWaveform spectrogram scratch paper.scd +++ /dev/null @@ -1,52 +0,0 @@ -// FluidWaveform - -( -s.waitForBoot{ - // b = Buffer.read(s,FluidFilesPath("Tremblay-AaS-AcousticStrums-M.wav")); - b = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav")); - m = Buffer(s); - - // https://colorcet.com/ - ~csv_colors = CSVFileReader.readInterpret(PathName(thisProcess.nowExecutingPath).pathOnly+/+"CETperceptual_csv_0_1/CET-L16.csv"); - - ~colors = ~csv_colors.collect{ - arg row; - Color.fromArray(row); - }; - - s.sync; - FluidBufSTFT.processBlocking(s,b,magnitude:m); - s.sync; - - m.loadToFloatArray(action:{ - arg mags; - - // mags.clump(m.numChannels)[105].plot; - - mags = (mags / mags.maxItem).ampdb.linlin(-120.0,0.0,0,255).asInteger; - - // [0,1,2].do{ - // arg amt; - // "# of %s in mags: %".format(amt,mags.count({arg val; val == amt})).postln; - // }; - - ~img = Image(m.numFrames,m.numChannels); - - mags.do{ - arg mag, index; - ~img.setColor(~colors[mag], index.div(m.numChannels), m.numChannels - 1 - index.mod(m.numChannels)); - }; - - // ~img.plot; - - w = Window("est",Rect(0,0,1200,300)); - - u = UserView(w,w.bounds) - .drawFunc_{ - ~img.drawInRect(u.bounds); - }; - - w.front; - }); -}; -) \ No newline at end of file