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

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

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,