Earlier quoted context omitted.
Don't let the name fool you. OpenAL is a closed-source library, much like Wwise or FMOD or PortAudio, that just implements playback. Bizarrely enough, it is also the only one of these APIs that uses a similar "play this buffer" approach and suffers from the same issues as Web Audio's memory management, just without a GC. The actual audio equivalent to OpenGL is OpenSL [0], which I don't think picked up any support fr…
> OpenAL is a closed-source library So are all official OpenGL implementations (MESA isn't official, last I heard). Doesn't stop them from being a standard and being used, although I agree they would be better if they were open source.
I don’t know who the Web Audio API is designed for
21–30 of 179 posts
Re: I don’t know who the Web Audio API is designed for
#22How to play a sine wave: const audioContext = new AudioContext(); const osc = audioContext.createOscillator(); osc.frequency.value = 440; osc.connect(audioContext.destination); osc.start(); "BufferSourceNode" is intended to play back samples like a sampler would. The method the author proposes of creating buffers one after the other is a bizarre solution.
I picked a 440Hz sine wave because I didn't want to write a more complex demo example, knowing full well someone would nitpick this. Please use your imagination and try to imagine one of infinitely many other streams that I could make at runtime that are not easily made with the built-in toy oscillators.
Re: I don’t know who the Web Audio API is designed for
#23Earlier quoted context omitted.
> OpenAL is a closed-source library So are all official OpenGL implementations (MESA isn't official, last I heard). Doesn't stop them from being a standard and being used, although I agree they would be better if they were open source.
OpenGL has to talk to hardware and is implemented by the hardware vendor. OpenAL does not have multiple implementations, isn't provided by hardware vendors and just wraps the platform audio API.
Re: I don’t know who the Web Audio API is designed for
#24How to play a sine wave: const audioContext = new AudioContext(); const osc = audioContext.createOscillator(); osc.frequency.value = 440; osc.connect(audioContext.destination); osc.start(); "BufferSourceNode" is intended to play back samples like a sampler would. The method the author proposes of creating buffers one after the other is a bizarre solution.
I picked a 440Hz sine wave because I didn't want to write a more complex demo example, knowing full well someone would nitpick this. Please use your imagination and try to imagine one of infinitely many other streams that I could make at runtime that are not easily made with the built-in toy oscillators.
Somebody already did. Check out Fourier Theory. The oscillators (well actually just sin, the rest will give you some help as well) can be used to make any stream, technically.
Re: I don’t know who the Web Audio API is designed for
#25My first lesson in this was the Roland MPU-401 MIDI interface. It had a "smart mode" which accepted timestamped buffers. It was great... if you wanted a sequencer with exactly the features it supported, like say only 8 tracks. It was well-intentioned, because PCs of that era were slow. The MPU-401 also had a "dumb" a.k.a. "UART" mode. You had to do everything yourself... and therefore could do anything. It turned out…
Re: I don’t know who the Web Audio API is designed for
#26Earlier quoted context omitted.
I picked a 440Hz sine wave because I didn't want to write a more complex demo example, knowing full well someone would nitpick this. Please use your imagination and try to imagine one of infinitely many other streams that I could make at runtime that are not easily made with the built-in toy oscillators.
It's a higher level API and you're deliberately ignoring all of its higher level features and concentrating on the part that clearly is underdeveloped. Maybe you should use your imagination instead of putting a square peg in a round hole?
As the title of the post asks: "I don't know who the Web Audio API is designed for".
The high-level nodes are not featureful enough for professional audio production, and too slow and underspecified for game engines like FMOD / Wwise.
The low-level bits fall somewhere between impractical, deprecated, and useless.
Who is it designed for?
Re: I don’t know who the Web Audio API is designed for
#27Earlier quoted context omitted.
I picked a 440Hz sine wave because I didn't want to write a more complex demo example, knowing full well someone would nitpick this. Please use your imagination and try to imagine one of infinitely many other streams that I could make at runtime that are not easily made with the built-in toy oscillators.
> Please use your imagination and try to imagine one of infinitely many other streams that I could make at runtime that are not easily made with the built-in toy oscillators. Somebody already did. Check out Fourier Theory. The oscillators (well actually just sin, the rest will give you some help as well) can be used to make any stream, technically.
Re: I don’t know who the Web Audio API is designed for
#28Then if you look into it:
dictionary DynamicsCompressorOptions : AudioNodeOptions {
float attack = 0.003;
float knee = 30;
float ratio = 12;
float release = 0.25;
float threshold = -24;
Which are indeed the basics that you need and totally enough for most use cases.Check out a vintage compressor that has a dozen implementation as VST plugins:
http://media.uaudio.com/assetlibrary/t/e/teletronix_la2a_car...
Re: I don’t know who the Web Audio API is designed for
#29Web audio can be used with this: https://wavesurfer-js.org/
Re: I don’t know who the Web Audio API is designed for
#30Stopped reading at: "Something like the DynamicsCompressorNode is practically a joke: basic features from a real compressor are basically missing, and the behavior that is there is underspecified such that I can’t even trust it to sound correct between browsers. " Then if you look into it: dictionary DynamicsCompressorOptions : AudioNodeOptions { float attack = 0.003; float knee = 30; float ratio = 12; float release…