!include once #1018630 // Spectro Edit import javax.sound.sampled.*; // I guess the ranges are in spectro-edit frames (44.1/1024Khz by default) svoid spectro_intRangesToWAV(Clip clip, L parts, File wavFile) ctex { new L l; int frames = 0; for (IntRange r : parts) { if (nempty(l)) { int n = 44100/2; // half a second l.add(ZerosInputStream(n*2)); frames += n; } int n = r.length()*clip.getFrameTimeSamples(); l.add(clip.getAudio(r.start*clip.getFrameTimeSamples(), n)); frames += n; } writeInputStreamsToWAV(l, frames, wavFile); }