protected void initialise(double[] aSignal, int aSamplingRate, Window aWindow, int aWindowShift, int aFftSize, int width, int height) { this.signal = aSignal; this.samplingRate = aSamplingRate; this.window = aWindow; this.windowShift = aWindowShift; this.fftSize = aFftSize; super.initialise(width, height, 0, (double) aWindowShift / aSamplingRate, new double[10]); update(); }
protected void initialise(double[] aSignal, int aSamplingRate, Window aWindow, int aWindowShift, int aFftSize, int width, int height) { this.signal = aSignal; this.samplingRate = aSamplingRate; this.window = aWindow; this.windowShift = aWindowShift; this.fftSize = aFftSize; super.initialise(width, height, 0, (double) aWindowShift / aSamplingRate, new double[10]); update(); }
public void stateChanged(ChangeEvent ce) { JSlider source = (JSlider) ce.getSource(); if (!source.getValueIsAdjusting()) { int logfftSize = (int) source.getValue(); int newFftSize = 1 << logfftSize; if (newFftSize != Cepstrogram.this.fftSize) { Cepstrogram.this.fftSize = newFftSize; Cepstrogram.this.window = Window.get(Cepstrogram.this.window.type(), newFftSize / 4 + 1); Cepstrogram.this.update(); } } } });
public void stateChanged(ChangeEvent ce) { JSlider source = (JSlider) ce.getSource(); if (!source.getValueIsAdjusting()) { int logfftSize = (int) source.getValue(); int newFftSize = 1 << logfftSize; if (newFftSize != Cepstrogram.this.fftSize) { Cepstrogram.this.fftSize = newFftSize; Cepstrogram.this.window = Window.get(Cepstrogram.this.window.type(), newFftSize / 4 + 1); Cepstrogram.this.update(); } } } });
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); int newWindowType = ((Window) cb.getSelectedItem()).type(); if (newWindowType != Cepstrogram.this.window.type()) { Cepstrogram.this.window = Window.get(newWindowType, Cepstrogram.this.window.getLength()); Cepstrogram.this.update(); } } });
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); int newWindowType = ((Window) cb.getSelectedItem()).type(); if (newWindowType != Cepstrogram.this.window.type()) { Cepstrogram.this.window = Window.get(newWindowType, Cepstrogram.this.window.getLength()); Cepstrogram.this.update(); } } });