Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

101
Vistas
Weird crackling during playback - web audio api

I am using Web Audio API + extended Karplus-Strong algorithm to generate plucked string sound and play it.
The problem that I face is sometimes there's a weird crackling sound/thump when playing some particular chords, see example here https://demiurg.app/player/MetallicA/Fade-To-Black/?id=117. First 20 or so measures generate such problem.
At first I thought that this is an effect of a DC offset, so I applied a high-pass filter, but nothing really changed.
While searching over the internet I've found some examples that resemble my case, there's a bunch of youtube videos about changing the buffer size (rendering quantum size) for different DAWs to overcome such effect, but there's no way of doing it in Web Audio API atm. The default on all browsers should be 128.
Interestingly enough, when I apply a slight distortion via cubic curve, the crackling effect is mitigated, but it doesn't go away.

Has someone else encountered this issue with generated sound? How can this be solved or mitigated without signal distortion?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

So, apparently this is the way the web audio works, it cannot handle smooth transitions when playing back sound, which results in such clicks or crackling.
This, this and this links helped me come to a conclusion that a custom ADSR envelope is needed. When I applied such envelope to gradually but very fast increase the amplitude of the sound at the beginning and rapidly decrease it at the end the clicks went away.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda