OscillatorNode.detune
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
detune
は OscillatorNode
インターフェイスのプロパティで、 a-rate の AudioParam
であり、発振器の離調をセントで表します。
メモ:
返される AudioParam
は読み取り専用ですが、それが表す値は読み取り専用ではありません。
値
a-rate の AudioParam
です。
例
以下の例では、発振器ノードを作成するための AudioContext
の基本的な使い方を示しています。応用例や情報については、この Violent Theremin demo デモ(関連するコードは app.js を参照)をご覧ください。
js
// create web audio api context
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
// create Oscillator node
const oscillator = audioCtx.createOscillator();
oscillator.type = "square";
oscillator.frequency.setValueAtTime(440, audioCtx.currentTime); // value in hertz
oscillator.detune.setValueAtTime(100, audioCtx.currentTime); // value in cents
oscillator.start();
仕様書
Specification |
---|
Web Audio API # dom-oscillatornode-detune |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
detune |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.