home.social

#webaudioapi — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #webaudioapi, aggregated by home.social.

  1. Streaming audio to OpenAI in your browser is cool… until you deal with PCM16.

    The browser gives you Float32 audio. The API expects PCM16 at 24kHz.

    That means:

    Float32 → clamp → Int16 → base64 → send to realtime api

    If you don’t handle the conversion properly, you’ll hear it right away — crackling, silence, or wrong pitch.

    Wrote a quick guide on how to do it correctly: l.zfir.dev/6rbGCiN

    #PCM16 #WebAudioAPI #OpenAI #OpenAIRealtime #JavaScript

  2. Streaming audio to OpenAI in your browser is cool… until you deal with PCM16.

    The browser gives you Float32 audio. The API expects PCM16 at 24kHz.

    That means:

    Float32 → clamp → Int16 → base64 → send to realtime api

    If you don’t handle the conversion properly, you’ll hear it right away — crackling, silence, or wrong pitch.

    Wrote a quick guide on how to do it correctly: l.zfir.dev/6rbGCiN

    #PCM16 #WebAudioAPI #OpenAI #OpenAIRealtime #JavaScript

  3. Streaming audio to OpenAI in your browser is cool… until you deal with PCM16.

    The browser gives you Float32 audio. The API expects PCM16 at 24kHz.

    That means:

    Float32 → clamp → Int16 → base64 → send to realtime api

    If you don’t handle the conversion properly, you’ll hear it right away — crackling, silence, or wrong pitch.

    Wrote a quick guide on how to do it correctly: l.zfir.dev/6rbGCiN

    #PCM16 #WebAudioAPI #OpenAI #OpenAIRealtime #JavaScript

  4. Streaming audio to OpenAI in your browser is cool… until you deal with PCM16.

    The browser gives you Float32 audio. The API expects PCM16 at 24kHz.

    That means:

    Float32 → clamp → Int16 → base64 → send to realtime api

    If you don’t handle the conversion properly, you’ll hear it right away — crackling, silence, or wrong pitch.

    Wrote a quick guide on how to do it correctly: l.zfir.dev/6rbGCiN

    #PCM16 #WebAudioAPI #OpenAI #OpenAIRealtime #JavaScript

  5. Streaming audio to OpenAI in your browser is cool… until you deal with PCM16.

    The browser gives you Float32 audio. The API expects PCM16 at 24kHz.

    That means:

    Float32 → clamp → Int16 → base64 → send to realtime api

    If you don’t handle the conversion properly, you’ll hear it right away — crackling, silence, or wrong pitch.

    Wrote a quick guide on how to do it correctly: l.zfir.dev/6rbGCiN

    #PCM16 #WebAudioAPI #OpenAI #OpenAIRealtime #JavaScript

  6. #TIL from building a web audio player (for the mixes):

    #Safari's #opus support is still quirky. With a #webm container, playback works but AnalyserNodes won't receive anything to compute frequency data with. With #ogg, `getByteFrequencyData()` works, but the audio element calculates the wrong duration, prob. b/c it always assumes CBR. Also if you build the audio pipeline before the first user interaction in Safari, nothing will get routed to the speakers

    But still, the #WebAudioAPI is awesome!

  7. I just released the alpha of Web Audio Studio.

    It's a browser-based tool for writing real Web Audio API code and visualizing the runtime graph it produces. You can inspect connections, follow signal flow, and insert analysers to see what's happening between nodes.

    Everything runs locally in the browser. No signup. Desktop-only for now.

    Would love feedback from anyone working with #WebAudio or #DSP.

    webaudio.studio

    #webaudio #webaudioapi #dsp #webdev #creativecoding

  8. I've worked out how to output discrete values from an LFO’s continuous wave. I can use these multipliers to fluctuate any prop over time. Pretty endless possibilities. In this case, I'm altering a ratio that controls probability (chance) of playback. #WebAudioAPI

  9. Daniel's deep dive into the Web Audio API attempts to bring retro Gameboy vibes to life, proving that nostalgia is only a square wave away 🎮➡️📈. Who knew that painfully recreating 8-bit sounds could be the pinnacle of modern web development? 👾🔊 Let's all pretend we needed another reason to procrastinate with audio nerdiness! 🎶💻
    danblack.co/blog/variable-duty #WebAudioAPI #RetroGaming #8BitNostalgia #AudioNerd #Procrastination #HackerNews #ngated

  10. #WebAudioAPI question, or audio related in general. I get a replay gain value from my library API for each track. It ranges from -11.8 to 17.2 with my current library. It seems to just be a float with no explanation in the docs. Does anyone know immediately how this should be plugged into a GainNode? I.e. is it obvious and just something I don't know or do I need extra information?

    Just setting the value as the GainNode's gain directly is... not good.
    😅

    #WebDev

  11. today i tried to get rid of the signal attenuation

    i set the value of a gainnode to an unchanging value and i checked the second audio channel but still the signal would cut out or attenuate randomly. the two channels don't seem to be unique, either. it is a single microphone, after all.

    #javascript #webaudioapi #audiophysics

  12. audioworkletprocessor and webaudio seem to reduce the input amplitude nearly immediately. it's like it's designed to filter noise and it thinks any long-lasting sound is noise. so if i play it a 100 hz tone the amplitude of the waveform starts out how i expect it to, but either gets cut off completely or the waveform reduces in amplitude over the course of ten seconds.

    super weird. i'm open to suggestions.

    #javascript #webaudioapi #audiophysics

  13. Any #WebAudioAPI experts out there, I've got a question: is it possible to schedule "too many" notes, and how do I know I'm about to do this?

    #JavaScript JSFiddle: jsfiddle.net/Lv84woph/

    This creates a pattern of 12 chords and plays through them. You can change the slider to have the pattern repeat.

    Now here's the question. When I turn the knob up too far, it leads to problems (freezing up, not playing, stuttering, playing only a bit then stopping, etc). But this is odd, because repetitions are being scheduled at the *end* of the sequence, so it's not a polyphony issue. They should just make the song play longer, and don't even really "exist" (no start()) until much later. So why are they causing early problems?

    I can think of workarounds, e.g. timed loop that feeds a few notes at a time, but it seems like this is contrary to what #WebAudio spec encourages ("create lots of nodes! one for every note! they're practically free!") that I gotta wonder if I'm doing something wrong.

  14. After fighting a bit with CORS and the AudioContext, I finally made it possible to just import the js-mod-player script from any web site and play any MOD file from anywhere (like the MOD Archive for example). Look at atornblad.se/js-mod-player to see how you can use it. I'm off to bed now, but will write something for the blog about it tomorrow. #retrocomputing #demoscene #javascript #cors #webaudioapi

  15. Die Audio-API ist nun ein offizieller W3C-Standard zum Erstellen und Bearbeiten von Musik und anderen Klanginhalten für den Browser. Klangvolleres Web: W3C empfiehlt Web Audio API als Standard für das Audiodesign
  16. I've been working on adding video chat on my website using WebRTC for a while. A part of that was creating some audio visualizations. I wrote a post about fighting with Web Audio API to get them working. dwayne.xyz/post/audio-visualiz #WebRTC #WebAudioAPI

  17. Seit Version 66 schaltet der Chrome-Browser Videos stumm, die automatisch losplärren – doch bei Online-Spielen kam es zu Problemen bei der Audiowiedergabe. Nun hat Google die Funktion temporär eingeschränkt. www.heise.de/newsticker/meldun… #Autoplay #Browser #Chrome #Google #WebAudioAPI
  18. #TIL from building a web audio player (for the mixes):

    #Safari's #opus support is still quirky. With a #webm container, playback works but AnalyserNodes won't receive anything to compute frequency data with. With #ogg, `getByteFrequencyData()` works, but the audio element calculates the wrong duration, prob. b/c it always assumes CBR. Also if you build the audio pipeline before the first user interaction in Safari, nothing will get routed to the speakers

    But still, the #WebAudioAPI is awesome!

  19. #TIL from building a web audio player (for the mixes):

    #Safari's #opus support is still quirky. With a #webm container, playback works but AnalyserNodes won't receive anything to compute frequency data with. With #ogg, `getByteFrequencyData()` works, but the audio element calculates the wrong duration, prob. b/c it always assumes CBR. Also if you build the audio pipeline before the first user interaction in Safari, nothing will get routed to the speakers

    But still, the #WebAudioAPI is awesome!

  20. #TIL from building a web audio player (for the mixes):

    #Safari's #opus support is still quirky. With a #webm container, playback works but AnalyserNodes won't receive anything to compute frequency data with. With #ogg, `getByteFrequencyData()` works, but the audio element calculates the wrong duration, prob. b/c it always assumes CBR. Also if you build the audio pipeline before the first user interaction in Safari, nothing will get routed to the speakers

    But still, the #WebAudioAPI is awesome!

  21. #TIL from building a web audio player (for the mixes):

    #Safari's #opus support is still quirky. With a #webm container, playback works but AnalyserNodes won't receive anything to compute frequency data with. With #ogg, `getByteFrequencyData()` works, but the audio element calculates the wrong duration, prob. b/c it always assumes CBR. Also if you build the audio pipeline before the first user interaction in Safari, nothing will get routed to the speakers

    But still, the #WebAudioAPI is awesome!

  22. I just released the alpha of Web Audio Studio.

    It's a browser-based tool for writing real Web Audio API code and visualizing the runtime graph it produces. You can inspect connections, follow signal flow, and insert analysers to see what's happening between nodes.

    Everything runs locally in the browser. No signup. Desktop-only for now.

    Would love feedback from anyone working with #WebAudio or #DSP.

    webaudio.studio

    #webaudio #webaudioapi #dsp #webdev #creativecoding

  23. I just released the alpha of Web Audio Studio.

    It's a browser-based tool for writing real Web Audio API code and visualizing the runtime graph it produces. You can inspect connections, follow signal flow, and insert analysers to see what's happening between nodes.

    Everything runs locally in the browser. No signup. Desktop-only for now.

    Would love feedback from anyone working with #WebAudio or #DSP.

    webaudio.studio

    #webaudio #webaudioapi #dsp #webdev #creativecoding

  24. I just released the alpha of Web Audio Studio.

    It's a browser-based tool for writing real Web Audio API code and visualizing the runtime graph it produces. You can inspect connections, follow signal flow, and insert analysers to see what's happening between nodes.

    Everything runs locally in the browser. No signup. Desktop-only for now.

    Would love feedback from anyone working with #WebAudio or #DSP.

    webaudio.studio

    #webaudio #webaudioapi #dsp #webdev #creativecoding

  25. I just released the alpha of Web Audio Studio.

    It's a browser-based tool for writing real Web Audio API code and visualizing the runtime graph it produces. You can inspect connections, follow signal flow, and insert analysers to see what's happening between nodes.

    Everything runs locally in the browser. No signup. Desktop-only for now.

    Would love feedback from anyone working with #WebAudio or #DSP.

    webaudio.studio

    #webaudio #webaudioapi #dsp #webdev #creativecoding

  26. I've worked out how to output discrete values from an LFO’s continuous wave. I can use these multipliers to fluctuate any prop over time. Pretty endless possibilities. In this case, I'm altering a ratio that controls probability (chance) of playback. #WebAudioAPI

  27. I've worked out how to output discrete values from an LFO’s continuous wave. I can use these multipliers to fluctuate any prop over time. Pretty endless possibilities. In this case, I'm altering a ratio that controls probability (chance) of playback. #WebAudioAPI

  28. I've worked out how to output discrete values from an LFO’s continuous wave. I can use these multipliers to fluctuate any prop over time. Pretty endless possibilities. In this case, I'm altering a ratio that controls probability (chance) of playback. #WebAudioAPI

  29. I've worked out how to output discrete values from an LFO’s continuous wave. I can use these multipliers to fluctuate any prop over time. Pretty endless possibilities. In this case, I'm altering a ratio that controls probability (chance) of playback. #WebAudioAPI

  30. Daniel's deep dive into the Web Audio API attempts to bring retro Gameboy vibes to life, proving that nostalgia is only a square wave away 🎮➡️📈. Who knew that painfully recreating 8-bit sounds could be the pinnacle of modern web development? 👾🔊 Let's all pretend we needed another reason to procrastinate with audio nerdiness! 🎶💻
    danblack.co/blog/variable-duty #WebAudioAPI #RetroGaming #8BitNostalgia #AudioNerd #Procrastination #HackerNews #ngated

  31. Daniel's deep dive into the Web Audio API attempts to bring retro Gameboy vibes to life, proving that nostalgia is only a square wave away 🎮➡️📈. Who knew that painfully recreating 8-bit sounds could be the pinnacle of modern web development? 👾🔊 Let's all pretend we needed another reason to procrastinate with audio nerdiness! 🎶💻
    danblack.co/blog/variable-duty #WebAudioAPI #RetroGaming #8BitNostalgia #AudioNerd #Procrastination #HackerNews #ngated

  32. Daniel's deep dive into the Web Audio API attempts to bring retro Gameboy vibes to life, proving that nostalgia is only a square wave away 🎮➡️📈. Who knew that painfully recreating 8-bit sounds could be the pinnacle of modern web development? 👾🔊 Let's all pretend we needed another reason to procrastinate with audio nerdiness! 🎶💻
    danblack.co/blog/variable-duty #WebAudioAPI #RetroGaming #8BitNostalgia #AudioNerd #Procrastination #HackerNews #ngated