You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried using the FFT example sketch to visualize the monitor output of my computer's sound card.
But I've noticed that there is a 2~ second delay between the audio output, and the visualization on the screen.
Any ideas what could be causing this?
I'm using Processing 3.3.7 and version 2.0.1 of processing-sound
Using GNU/Linux with ALSA&PulseAudio.
If you need any specific details, please tell me. I can't think of anything else to add.
publicclassAudioVisualizerextendsPApplet {
privateFFTfft;
privateAudioInin;
privateintbands = 16;
privatefloat[] spectrum = newfloat[bands];
publicstaticvoidmain(String[] args) {
PApplet.main(AudioVisualizer.class.getCanonicalName());
}
@Overridepublicvoidsettings() {
size(512, 360);
}
@Overridepublicvoidsetup() {
background(255);
// Create an Input stream which is routed into the Amplitude analyzerfft = newFFT(this, bands);
in = newAudioIn(this);
// start the Audio Inputin.start();
in.play();
// patch the AudioInfft.input(in);
}
@Overridepublicvoiddraw() {
background(255);
fft.analyze(spectrum);
for(inti = 0; i < bands; i++){
// The result of the FFT is normalized// draw the line for frequency band i scaling it up by 5 to get more amplitude.line( i, height, i, height - spectrum[i]*height*5 );
}
}
}
The text was updated successfully, but these errors were encountered:
I've tried using the FFT example sketch to visualize the monitor output of my computer's sound card.
But I've noticed that there is a 2~ second delay between the audio output, and the visualization on the screen.
Any ideas what could be causing this?
I'm using Processing 3.3.7 and version 2.0.1 of processing-sound
Using GNU/Linux with ALSA&PulseAudio.
If you need any specific details, please tell me. I can't think of anything else to add.
The text was updated successfully, but these errors were encountered: