Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

AudioBufferSourceNode.detune

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

The detune property of the AudioBufferSourceNode interface is an k-rate AudioParam representing detuning of oscillation in cents.

The range of the AudioParam value is -1200 to 1200.

Syntax

var source = audioCtx.createBufferSource();
source.detune.value = 100; // value in cents

Note: though the AudioParam returned is read-only, the value it represents is not.

Value

A k-rate AudioParam.

Example

var audioCtx = new AudioContext();

var channels = 2;
var frameCount = audioCtx.sampleRate * 2.0;

var myArrayBuffer = audioCtx.createBuffer(2, frameCount, audioCtx.sampleRate);

for (var channel = 0; channel < channels; channel++) {
  var nowBuffering = myArrayBuffer.getChannelData(channel);
  for (var i = 0; i < frameCount; i++) {
    nowBuffering[i] = Math.random() * 2 - 1;
  }
}

var source = audioCtx.createBufferSource();
source.buffer = myArrayBuffer;
source.connect(audioCtx.destination);
source.detune.value = 100; // value in cents
source.start();

Specifications

Specification Status Comment
Web Audio API
The definition of 'detune' in that specification.
Working Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) 40.0 (40.0) Not supported ? ?
Feature Android Chrome Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support Not supported (Yes) (Yes) (Yes) Not supported Not supported ?

See also

문서 태그 및 공헌자

 이 페이지의 공헌자: Jeremie, chrisdavidmills
 최종 변경: Jeremie,