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(); initialiseDependentWindows(); }
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(); initialiseDependentWindows(); }
public void stateChanged(ChangeEvent ce) { JSlider source = (JSlider) ce.getSource(); if (!source.getValueIsAdjusting()) { int logfftSize = (int) source.getValue(); int newFftSize = 1 << logfftSize; if (newFftSize != Spectrogram.this.fftSize) { Spectrogram.this.fftSize = newFftSize; Spectrogram.this.window = Window.get(Spectrogram.this.window.type(), newFftSize / 4 + 1); Spectrogram.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 != Spectrogram.this.fftSize) { Spectrogram.this.fftSize = newFftSize; Spectrogram.this.window = Window.get(Spectrogram.this.window.type(), newFftSize / 4 + 1); Spectrogram.this.update(); } } } });
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); int newWindowType = ((Window) cb.getSelectedItem()).type(); if (newWindowType != Spectrogram.this.window.type()) { Spectrogram.this.window = Window.get(newWindowType, Spectrogram.this.window.getLength()); Spectrogram.this.update(); } } });
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); int newWindowType = ((Window) cb.getSelectedItem()).type(); if (newWindowType != Spectrogram.this.window.type()) { Spectrogram.this.window = Window.get(newWindowType, Spectrogram.this.window.getLength()); Spectrogram.this.update(); } } });