A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/de/docs/Web/API/BaseAudioContext/createOscillator below:

BaseAudioContext: createOscillator() Methode - Web-APIs

BaseAudioContext: createOscillator() Methode

Baseline Widely available

Die createOscillator()-Methode der BaseAudioContext-Schnittstelle erstellt einen OscillatorNode, eine Quelle, die eine periodische Wellenform darstellt. Im Grunde erzeugt sie einen konstanten Ton.

Hinweis: Der OscillatorNode()-Konstruktor ist die empfohlene Methode, um einen OscillatorNode zu erstellen; siehe Erstellen eines AudioNode.

Syntax Parameter

Keine.

Rückgabewert

Ein OscillatorNode.

Beispiele

Das folgende Beispiel zeigt die grundlegende Verwendung eines AudioContext zur Erstellung eines Oszillator-Knotens. Für angewandte Beispiele/Informationen, schauen Sie sich unser Violent Theremin Demo (siehe app.js für den relevanten Code) an; sehen Sie auch unsere OscillatorNode Seite für weitere Informationen.

// create web audio api context
const audioCtx = new AudioContext();

// create Oscillator node
const oscillator = audioCtx.createOscillator();

oscillator.type = "square";
oscillator.frequency.setValueAtTime(3000, audioCtx.currentTime); // value in hertz
oscillator.connect(audioCtx.destination);
oscillator.start();
Spezifikationen Browser-Kompatibilität Siehe auch MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4