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 2015年7月.
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> |
ブラウザーの互換性
Loading…