c@116: c@116: program experiment; c@116: c@116: af = load may.stream.audiofile; c@116: plot = load may.plot; c@116: cm = load may.matrix.complex; c@116: mat = load may.matrix; c@116: vec = load may.vector; c@116: manipulate = load may.stream.manipulate; c@116: syn = load may.stream.syntheticstream; c@116: c@116: { cqt } = load cqt; c@116: { icqt } = load icqt; c@116: c@116: //testStream = manipulate.withDuration 96000 (syn.sinusoid 48000 500); c@116: //testStream = manipulate.withDuration 96000 (syn.pulseTrain 48000 4); c@116: testStream = af.open "sweep-48000.wav"; c@116: //testStream = af.open "sweep.wav"; c@116: c@116: eprintln "have test stream"; c@116: c@116: cq = cqt { maxFreq = testStream.sampleRate/2, minFreq = 50, binsPerOctave = 24 } testStream; c@116: c@116: eprintln "bin frequencies: \(cq.kernel.binFrequencies)"; c@116: c@116: icq = icqt cq; c@116: c@116: eprintln "calculated icq..."; c@116: c@116: outfile = "test-output.wav"; c@116: written = af.write icq outfile; c@116: c@116: eprintln "wrote \(written) to \(outfile)"; c@116: c@116: //for cq.cqSpectrogram do mm: c@116: // for (mat.asColumns mm) (println . strJoin "," . vec.list); c@116: //done; c@116: c@116: /* c@116: bigM = mat.concatHorizontal (map cm.magnitudes cq.output); c@116: c@116: eprintln "overall output size = \(mat.size bigM)"; c@116: c@116: mat.print bigM; c@116: */ c@116: //\() (plot.plot [Contour bigM]); c@116: //\() (plot.plot [Grid bigM]); c@116: c@116: () c@116: