((Phasogram) graph).update(); super.updateGraph(graph, "Phasogram at " + new PrintfFormat("%.3f").sprintf(x) + " s");
((Phasogram) graph).update(); super.updateGraph(graph, "Phasogram at " + new PrintfFormat("%.3f").sprintf(x) + " s");
public void update(double x) { if (Double.isNaN(x)) return; int centerIndex = (int) (x * samplingRate); assert centerIndex >= 0 && centerIndex < signal.length; int windowLength = 1024; int leftIndex = centerIndex - windowLength / 2; if (leftIndex < 0) leftIndex = 0; double[] signalExcerpt = new HammingWindow(windowLength).apply(signal, leftIndex); double[] spectrum = FFT.computeLogPowerSpectrum(signalExcerpt); if (graph == null) { graph = new FunctionGraph(300, 200, 0, samplingRate / windowLength, spectrum); } else { graph.updateData(0, samplingRate / windowLength, spectrum); } super.updateGraph(graph, "Spectrum at " + new PrintfFormat("%.3f").sprintf(x) + " s"); }
lpcResidueAtCursor.update(usableResidue, samplingRate); super.updateGraph(lpcResidueAtCursor, "LPC residue at " + new PrintfFormat("%.3f").sprintf(x) + " s");
lpcResidueAtCursor.update(usableResidue, samplingRate); super.updateGraph(lpcResidueAtCursor, "LPC residue at " + new PrintfFormat("%.3f").sprintf(x) + " s");
graph.updateData(0, samplingRate, realCepstrum); super.updateGraph(graph, "Cepstrum at " + new PrintfFormat("%.3f").sprintf(x) + " s"); cepstrumSpectrumAtCursor.updateData(0, samplingRate / real.length, cepstrumSpectrum); super.updateGraph(cepstrumSpectrumAtCursor, "Cepstrum spectrum (cutoff " + cepstrumCutoff + ") at " + new PrintfFormat("%.3f").sprintf(x) + " s");
graph.updateData(0, samplingRate, realCepstrum); super.updateGraph(graph, "Cepstrum at " + new PrintfFormat("%.3f").sprintf(x) + " s"); cepstrumSpectrumAtCursor.updateData(0, samplingRate / real.length, cepstrumSpectrum); super.updateGraph(cepstrumSpectrumAtCursor, "Cepstrum spectrum (cutoff " + cepstrumCutoff + ") at " + new PrintfFormat("%.3f").sprintf(x) + " s");
public void update(double x) { if (Double.isNaN(x)) return; int centerIndex = (int) (x * samplingRate); assert centerIndex >= 0 && centerIndex < signal.length; int windowLength = 1024; int leftIndex = centerIndex - windowLength / 2; if (leftIndex < 0) leftIndex = 0; double[] signalExcerpt = new HammingWindow(windowLength).apply(signal, leftIndex); double[] spectrum = FFT.computeLogPowerSpectrum(signalExcerpt); if (graph == null) { graph = new FunctionGraph(300, 200, 0, samplingRate / windowLength, spectrum); } else { graph.updateData(0, samplingRate / windowLength, spectrum); } super.updateGraph(graph, "Spectrum at " + new PrintfFormat("%.3f").sprintf(x) + " s"); }