WebAudio / web-audio-api

The Web Audio API v1.0, developed by the W3C Audio WG
https://webaudio.github.io/web-audio-api/
Other
1.04k stars 165 forks source link

Could I ask a little question here? #2457

Closed logic-finder closed 2 years ago

logic-finder commented 2 years ago

Hello, I'm a novice learning JavaScript and highly interested in Web Audio API. The reason I decided to ask a question here had started from a curiosity about the name of AudioParam (In other words, I can't understand why AudioParam is called AudioParam).

As far as I understand, AudioParam is an object that has some properties and methods (for example, value property and setValueAtTime() method) and it seems that AudioParam is used as a property of some AudioNodes (e.g. GainNode.gain).

Meanwhile, if my understanding is right, a parameter is a variable passed into a function (e.g. a and b are parameters in the following: arr.sort((a, b) => a - b);).

So, since AudioParam objects are used as a property of AudioNodes, rather than as a parameter, isn't it right to call it as AudioProp? I have no idea why it is named as AudioParam at all. If there is a reason for it, please let me know.

Thank you very much.

p.s.) If this repository is not a right place to ask a question like this, I apologize in advance.

hoch commented 2 years ago

An interesting perspective! Historically, the term "parameters" means a set of user controllable values for audio processing and sound synthesis.

https://en.wikipedia.org/wiki/Synthesizer#Filters (find parameter in the article)

logic-finder commented 2 years ago

Thank you very much! It helps me a lot.

If you don't mind me asking, I would like to ask a one more question. Currently I'm contributing to MDN Web Docs by translating Web Audio API documents into Korean, and I have a no idea it is fine whether I can translate the term parameter as a meaning of variables passed into a function as I wrote above. Or is it better just leave the term parameter as it is?

hoch commented 2 years ago

Yes, it might be confusing if you put it that way. However, it's quite natural to say "필터의 주파수 및 대역폭 파라미터를 조절한다" in Korean. (Sadly, there aren't many Korean books on sound synthesis or audio programming)

By the way, thank you so much for translating to Korean! 👍