aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/analysernode/fftsize/index.html
diff options
context:
space:
mode:
authorlogic-finder <83723320+logic-finder@users.noreply.github.com>2021-08-16 08:49:08 +0900
committerGitHub <noreply@github.com>2021-08-16 08:49:08 +0900
commitb06773332f8f14195691c638c82093250e739a32 (patch)
tree54f84ae618235abdfaf5031be52cdfb22d8becbd /files/ko/web/api/analysernode/fftsize/index.html
parent4a768bda56346585dd7b079b184682ccc304df2f (diff)
downloadtranslated-content-b06773332f8f14195691c638c82093250e739a32.tar.gz
translated-content-b06773332f8f14195691c638c82093250e739a32.tar.bz2
translated-content-b06773332f8f14195691c638c82093250e739a32.zip
[ko] Work for AnalyserNode and its child documents (#1658)
* translate analysernode/index.html * translate analysernode/analysernode/index.html * add picture files/ko/web/api/analysernode/fttaudiodata_en.svg * translate fftsize/index.html * fix a paragraph * translate frequencybincount/index.html * fix a typo * translate mindecibels/index.html * translate maxdecibels/index.html * change a word * change a word * translate smoothingtimeconstant/index.html * translate getfloatfrequencydata/index.html * change words * translate getbytefrequencydata/index.html * delete a letter * translate getfloattimedomaindata/index.html * translate getbytetimedomaindata/index.html * add a letter
Diffstat (limited to 'files/ko/web/api/analysernode/fftsize/index.html')
-rw-r--r--files/ko/web/api/analysernode/fftsize/index.html96
1 files changed, 96 insertions, 0 deletions
diff --git a/files/ko/web/api/analysernode/fftsize/index.html b/files/ko/web/api/analysernode/fftsize/index.html
new file mode 100644
index 0000000000..6033ba3892
--- /dev/null
+++ b/files/ko/web/api/analysernode/fftsize/index.html
@@ -0,0 +1,96 @@
+---
+title: AnalyserNode.fftSize
+slug: Web/API/AnalyserNode/fftSize
+tags:
+ - API
+ - AnalyserNode
+ - Property
+ - Reference
+ - Web Audio API
+ - fftSize
+browser-compat: api.AnalyserNode.fftSize
+---
+<div>{{APIRef("Web Audio API")}}</div>
+
+<p class="summary">{{domxref("AnalyserNode")}} 인터페이스의 <strong><code>fftSize</code></strong> 속성은 unsigned long 값이고 주파수 영역 데이터를 얻기 위해 <a href="https://en.wikipedia.org/wiki/Fast_Fourier_transform">고속 푸리에 변환</a>(FFT)을 수행할 때 사용될 샘플에서의 window 사이즈를 나타냅니다.</p>
+
+<h2 id="Syntax">구문</h2>
+
+<pre class="brush: js">var <em>curValue</em> = <em>analyserNode</em>.fftSize;
+<em>analyserNode</em>.fftSize = <em>newValue</em>;
+</pre>
+
+<h3 id="Value">값</h3>
+
+<p>FFT의 window 사이즈를 나타내는 샘플의 수로 주어지는 unsigned 정수입니다. 값이 높을수록 주파수 영역의 자세함이 커지는 결과를 낳으나 시간 영역에서의 자세함은 떨어집니다.</p>
+
+<p>반드시 <math><semantics><msup><mn>2</mn><mn>5</mn></msup><annotation encoding="TeX">2^5</annotation></semantics></math>와 <math><semantics><msup><mn>2</mn><mn>15</mn></msup><annotation encoding="TeX">2^15</annotation></semantics></math> 사이의 2의 제곱이여야만 합니다. 즉 다음 중 하나여야 합니다: <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, <code>1024</code>, <code>2048</code>, <code>4096</code>, <code>8192</code>, <code>16384</code>, 그리고 <code>32768</code>. 기본값은 <code>2048</code>입니다.</p>
+
+<p class="note"><strong>참고</strong>: 만약 값이 2의 제곱이 아니거나 이 명시된 범위의 바깥에 있다면, <code>IndexSizeError</code>라는 이름의 {{domxref("DOMException")}}이 발생합니다.</p>
+
+<h2 id="Example">예제</h2>
+
+<p>다음의 예제는 <code>AnalyserNode</code>를 생성하기 위한 {{domxref("AudioContext")}}와 그리고 나서 반복적으로 시간 영역의 데이터를 수집하고 현재 오디오 입력의 "오실로스코프 스타일의" 출력을 그리기 위한 {{domxref("window.requestAnimationFrame()","requestAnimationFrame")}}과 {{htmlelement("canvas")}}의 기본 사용을 보여줍니다. 더 완벽한 응용 예제/정보를 보려면 <a href="https://mdn.github.io/voice-change-o-matic/">Voice-change-O-matic</a> 데모를 확인하세요 (관련된 코드를 보려면 <a href="https://github.com/mdn/voice-change-o-matic/blob/gh-pages/scripts/app.js#L128-L205">app.js 라인 128–205</a>를 참고하세요).</p>
+
+<pre class="brush: js">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
+var analyser = audioCtx.createAnalyser();
+
+ ...
+
+analyser.fftSize = 2048;
+var bufferLength = analyser.frequencyBinCount ;
+var dataArray = new Uint8Array(bufferLength);
+analyser.getByteTimeDomainData(dataArray);
+
+// 현재 오디오 소스의 오실로스코프를 그립니다
+
+function draw() {
+
+ drawVisual = requestAnimationFrame(draw);
+
+ analyser.getByteTimeDomainData(dataArray);
+
+ canvasCtx.fillStyle = 'rgb(200, 200, 200)';
+ canvasCtx.fillRect(0, 0, WIDTH, HEIGHT);
+
+ canvasCtx.lineWidth = 2;
+ canvasCtx.strokeStyle = 'rgb(0, 0, 0)';
+
+ canvasCtx.beginPath();
+
+ var sliceWidth = WIDTH * 1.0 / bufferLength;
+ var x = 0;
+
+ for(var i = 0; i &lt; bufferLength; i++) {
+
+ var v = dataArray[i] / 128.0;
+ var y = v * HEIGHT/2;
+
+ if(i === 0) {
+ canvasCtx.moveTo(x, y);
+ } else {
+ canvasCtx.lineTo(x, y);
+ }
+
+ x += sliceWidth;
+ }
+
+ canvasCtx.lineTo(canvas.width, canvas.height/2);
+ canvasCtx.stroke();
+ };
+
+ draw();</pre>
+
+<h2 id="Specifications">명세</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">브라우저 호환성</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">같이 보기</h2>
+
+<ul>
+ <li><a href="/ko/docs/Web/API/Web_Audio_API/Using_Web_Audio_API">Web Audio API 사용하기</a></li>
+</ul>