aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/audionode/index.html
blob: 00b03e7e4d69058f8b9bc298a00eb7d9c5e10fb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
title: AudioNode
slug: Web/API/AudioNode
translation_of: Web/API/AudioNode
---
<p>{{APIRef()}}</p>
<p><code>AudioNode</code>는 포괄적으로 오디오를 처리하는 데이터 소스인 {{HTMLElement("audio")}} 테그나 {{HTMLElement("video")}} 테그, {{domxref("OscillatorNode")}} 와 audio destinatio, intermediate 처리 모듈인 {{domxref("BiquadFilterNode")}} or {{domxref("ConvolverNode")}} 또는 볼륨을 조절하는 {{domxref("GainNode")}} 등을 나타냅니다.</p>
<p><img alt="AudioNodes participating in an AudioContext create a audio routing graph." src="https://mdn.mozillademos.org/files/9713/WebAudioBasics.png" style="width: 677px; height: 230px; display: block; margin: 0px auto;"></p>
<p><code>AudioNode는 입력과 출력을 가지고 각각의 주어진 채널을 가지고 있습니다. 입력이 0인 <code>AudioNode와 하나 혹은 다수의 출력을 가지면 이를 소스노드라고 불린다.</code></code><code> <code>하나의 AudioNode에서 다른 쪽으로 다양한 처리가 이뤄진다. 일반적으로는 노드는 입력을 읽어 음원관련 처리작업을 하고, 새로운 출력값을 만든다. 아니면 단순히 음원이 지나가는 노드역활만을 하기도 한다.</code></code></p>
<p> (for example in the {{domxref("AnalyserNode")}}, where the result of the processing is accessed separatly).</p>
<p>다른 노드들은<em> processing graph</em> 를 만들기 위해 서로를 연결한다. graph는  {{domxref("AudioContext")}}를 가지고 있다. 각각의 노드는 하나이 컨택스트에 관여를 한다. 일반적으로는 처리노드는 <code>AudioNode</code>의 메서드와 프로퍼티를 상속받아 처리하지만 사용자의 의도에 따라 기능을 추가 할수도 있다. 자세한 <a href="/en-US/docs/Web/API/Web_Audio_API">Web Audio API</a> 페이지 이다.</p>
<div class="note">
 <p><strong>Note</strong>: An <code>AudioNode</code> can be target of events, therefore it implements the {{domxref("EventTarget")}} interface.</p>
</div>
<h2 id="Properties" style="">Properties</h2>
<dl>
 <dt>
  {{domxref("AudioNode.context")}} {{readonlyInline}}</dt>
 <dd>
  {{domxref("AudioContext")}}와 연관된 정보를 리턴한다. 노드가 관여하고 있는 processing graph 객체를 나타낸다.</dd>
</dl>
<dl>
 <dt>
  {{domxref("AudioNode.numberOfInputs")}} {{readonlyInline}}</dt>
 <dd>
  노드에 입력되는 인풋의 수를 리턴받는다. 소스노드는 <code>numberOfInputs 프로퍼티를 가지는데 기본적으로 0 값을 가진다.</code></dd>
</dl>
<dl>
 <dt>
  {{domxref("AudioNode.numberOfOutputs")}} {{readonlyInline}}</dt>
 <dd>
  노드를 통해 나오는 출력의 갯수를 리턴한다. {{ domxref("AudioDestinationNode") }} 같은 노드의 경우에는 이 값은 0을 가지고 있다.</dd>
</dl>
<dl>
 <dt>
  {{domxref("AudioNode.channelCount")}}</dt>
 <dd>
  인풋에 <a href="/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#Up-mixing_and_down-mixing">up-mixing and down-mixing</a>을 하는 경우 몇개의 채널이 사용되는지 갯수를 정수값으로 리턴한다. {{domxref("AudioNode.channelCountMode")}}의 값에의해 정확한 갯수를 알수 있다.</dd>
</dl>
<dl>
 <dt>
  {{domxref("AudioNode.channelCountMode")}}</dt>
 <dd>
  노드에 입력되는 입력값과 출력값의 연관 정보를 리턴받는다.</dd>
 <dt>
  {{domxref("AudioNode.channelInterpretation")}}</dt>
 <dd>
  음원을 어떻게 <a href="/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#Up-mixing_and_down-mixing">up-mixing and down-mixing</a> 하는지에 대한 정보를 리턴받는다. 이 값은 <code>"speakers"</code><code>"discrete" 가 될 수 있다.</code></dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>Also implements methods from the interface </em>{{domxref("EventTarget")}}.</p>
<dl>
 <dt>
  {{domxref("AudioNode.connect(AudioNode)")}}</dt>
 <dd>
  다른 노드에서의 입력과 현대 노드의 출력값을 서로 연결시킬수 있다.</dd>
 <dt>
  {{domxref("AudioNode.connect(AudioParam)")}}</dt>
 <dd>
  현재 노드의 출력과 audio parameter의 출력 하나와 연결 시킬수 있다.</dd>
 <dt>
  {{domxref("AudioNode.disconnect()")}}</dt>
 <dd>
  현재의 노드와 연결된 다른 노드와의 연결을 끊을수 있다.</dd>
</dl>
<h2 id="Example">Example</h2>
<p>이예제는 간단하게 <code>AudioNode의 프로퍼티와 메서드를 어떻게 사용하는지를 보여 준다.</code> <a href="/en-US/docs/Web/API/Web_Audio_API">Web Audio API</a>에 가면 더 많은 예제를 확인 할 수 있다.</p>
<pre class="brush: js;highlight[8,9,11,12,13,14]">var AudioContext = window.AudioContext || window.webkitAudioContext;

var audioCtx = new AudioContext();

var oscillator = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();

oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);

oscillator.context;
oscillator.numberOfInputs;
oscillator.numberOfOutputs;
oscillator.channelCount;</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Audio API', '#the-audionode-interface', 'AudioNode')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{Compat("api.AudioNode")}}</p>

<h2 id="See_also">See also</h2>
<ul>
 <li><a href="/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>