Hauptdemo
CDN v3.0.0

Füge diese Tags zu deiner Seite hinzu — vor </body> oder in <head> :

Synth-Engine
<script src="https://cdn.chiptune-synth.8binami.com/3.0.0/chiptune-synth.min.js"></script>
Sound Font (170+ instruments)
<script src="https://cdn.chiptune-synth.8binami.com/3.0.0/chiptune-sound-font.min.js"></script>
Grundlegende Verwendung — Einzelnoten und Akkorde

Klicken Sie auf eine Schaltfläche, um ChiptuneSynth in Aktion zu hören. Jedes Beispiel demonstriert eine Kernfunktion der API.

Wellenform
1. Einzelnoten — Verschiedene Wellenformen
const synth = new ChiptuneSynth();
await synth.init();

// Square wave on Lead (track 0)
synth.playNote(440, 0, 0.5);

// Triangle on Bass (track 1)
synth.playNoteByName('C', 3, 1, 0.5);

// Sawtooth on FX (track 3)
synth.tracks[3].type = 'sawtooth';
synth.playNote(330, 3, 0.5);
2. Akkorde — Mehrere Spuren Abspielen
// C major across 3 tracks simultaneously
synth.playNoteByName('C', 4, 0, 1.0);  // Root
synth.playNoteByName('E', 4, 1, 1.0);  // Third
synth.playNoteByName('G', 4, 3, 1.0);  // Fifth
3. Unison — Dicke Verstimmte Stimmen
// 8-voice super-saw with stereo spread
synth.tracks[0].type = 'sawtooth';
synth.tracks[0].unisonVoices = 8;
synth.tracks[0].unisonDetune = 25;
synth.tracks[0].unisonSpread = 80;
synth.envelopes[0] = { attack: 0.2, decay: 0.3, sustain: 0.7, release: 1.0 };

synth.playNoteByName('E', 4, 0, 2.0);
4. LFOs — Vibrato und Tremolo
// LFO1: Vibrato (pitch modulation)
synth.vibrato[0] = { rate: 5, depth: 12 };

// LFO2: Filter modulation
synth.tracks[0].filterEnabled = true;
synth.tracks[0].filterCutoff = 1000;
synth.tracks[0].lfoFilterRate = 3;
synth.tracks[0].lfoFilterDepth = 2000;

// LFO3: Tremolo (amplitude modulation)
synth.tracks[0].tremoloRate = 6;
synth.tracks[0].tremoloDepth = 50;
Unterstützt von 8Binami