0:00 0:00
πŸ”Š 50%
πŸŽ›οΈ
FonkPlay vJS β€’ Click on note to SOLO channel (red=soloed) β€’ Drag & drop MOD/S3M files
Mix: 0.00ms Budget: 0% Channels: 0/0
ℹ️ ABOUT
πŸ“œ HISTORY
🎚️ SAMPLES

🎡 S3M/MOD Player

A modern web-based tracker module player with authentic retro modes and high-quality modern processing.

πŸ“¦ GitHub Repository β€’ πŸ“œ Original ASM Source

πŸ”¬ Technology

This player implements several audio processing techniques. Select Modern (8-point Sinc) interpolation to enable all enhancements.

πŸ“Š Sample Interpolation

Original tracker samples were recorded at various rates (8-22kHz). Playing them at 44.1kHz requires interpolation between sample points.

Sound Blaster (None)
Stair-stepped = harsh aliasing
Gravis Ultrasound (Linear)
Connect-the-dots = smoother
Modern (8-point Sinc)
Bandlimited = pure, clean

πŸ’‘ Sinc interpolation is what professional samplers use. It's mathematically optimal for reconstructing a bandlimited signal from discrete samples.

〰️ S-Curve Transitions

When volume or pitch changes, we don't jump instantly - we smoothly transition using a smoothstep function.

Linear Interpolation
Vol Time Constant slope = mechanical
S-Curve: tΒ²(3-2t)
Vol Time Ease in/out = natural motion

πŸ’‘ Used for volume ramping (click-free). The curve mimics physical movement with inertia.

🎸 Sample-Rate Vibrato

Classic trackers update vibrato at the tick rate (~50Hz). Modern mode computes it at sample rate (44,100Hz)!

Tick-Rate (50 Hz)
Stair-steps every ~20ms = zipper noise
Sample-Rate (44,100 Hz)
Smooth sine at 44.1kHz = pure tone

πŸ’‘ No lookup table needed - modern CPUs compute sin() fast enough for real-time audio!

∫ Integrated Sine (Anti-Aliasing)

Instead of point-sampling the sine, we compute the average value over each sample interval. This prevents errors when the modulation frequency is high.

Point Sampling: value = sin(t) at one instant
+1 0 -1 sample 1 sample 2 β‰ˆ0.9 β‰ˆ0 ⚠ Sample 2 lands at zero crossing but the wave had lots of energy!
Integrated Average: value = ∫sin(t)dt / Ξ”t = (cos(a) - cos(b)) / (b - a)
+1 0 -1 sample 1 sample 2 avg β‰ˆ 0.6 avg β‰ˆ -0.2 βœ“ Shaded area Γ· width = average βœ“ Captures energy even at crossings βœ“ No aliasing artifacts

πŸ’‘ The integral formula (cos(a) - cos(b)) / (b - a) computes this average analytically - no numerical integration needed!

πŸ”Š Dolby Pro Logic Surround

Matrix-encode 4 virtual channels into stereo that decodes on any Pro Logic receiver!

Matrix Encoding
Front L Center Surround Front R 90Β° shift Ξ£ Ξ£ Lt = FL + 0.707Γ—C + 0.707Γ—S' Rt = FR + 0.707Γ—C βˆ’ 0.707Γ—S'
Speaker Layout
FL FR C SL SR 🎧

πŸ’‘ The Hilbert transform creates a 90Β° phase shift - surround "disappears" in stereo but decodes in surround systems!

πŸ”¬ Automatic Sample Classification

Each sample is analyzed to determine optimal surround placement using both audio analysis and pattern usage detection:

Audio Analysis β€’ Zero-crossing rate β†’ Frequency β€’ Time to 80% peak β†’ Attack β€’ 2nd half avg/peak β†’ Sustain β€’ Sample diff variance β†’ Noise Pattern Analysis β€’ Beat alignment (rows 0,4,8...) β€’ Note variety (1-2 = drums) β€’ Trigger frequency β€’ Retrigger effect usage Classification Bass | Drums | Lead | Pad | Texture
TypeDetection CriteriaPlacement
BassZero-crossing rate < 0.15Center (0.1)
DrumsFast attack + beat-aligned + low note varietyFront (0.2)
LeadDefault melodic contentFront (0.3)
PadSlow attack + high sustain + rare triggersRear (0.75-0.8)
TextureHigh noise + long loopSurround (0.9)

πŸ’‘ Pattern analysis (πŸ“Š) overrides audio analysis when it detects clear drum patterns - critical for noise-based drums like hi-hats!

πŸŽ›οΈ Quick Reference

FeatureSound BlasterGUSModern
Sample InterpolationNoneLinear8-pt Sinc
Volume TransitionsLinearLinearS-Curve
Portamento CurveLinearLinearLinear
Vibrato Rate~50 Hz~50 Hz44,100 Hz
Vibrato MethodTableTableIntegrated sin()
πŸ”¬ Sample Analysis for Surround Placement
πŸ“Š = detected from pattern usage (more accurate for drums/percussion)
No module loaded

🎡 The Tracker Era

In the late 80s and early 90s, before MP3s existed, the demoscene created a revolution in computer music. Groups like Future Crew, Triton, and KFMF composed incredible soundtracks using tracker software β€” sequencers that played back short audio samples at different pitches.

The format started on the Amiga with 4-channel MOD files, then evolved to Scream Tracker's S3M format on PC with up to 32 channels, stereo panning, and new effects.

πŸ”Š Sound Blaster vs Gravis Ultrasound

Two sound cards defined the era:

The Sound Blaster was everywhere β€” affordable and compatible. But it had no hardware mixing. Your CPU had to combine all channels into a single audio stream in real-time. On a 33MHz 486, that meant hand-optimized assembly code. Select "Sound Blaster" interpolation mode to hear that raw, crunchy sound.

The Gravis Ultrasound was the holy grail. It had 1MB of onboard RAM and could mix 32 channels in hardware. You'd upload your samples to the card and it did the rest β€” with smooth linear interpolation. Select "Gravis Ultrasound" mode to hear the difference.

πŸ’Ύ The Original Code

This player is a JavaScript port of FonkPlay by Psyke/DCB and VIP/DCB β€” written in x86 assembly around 1994-1996. The original source code is available on GitHub.

Key files include the mixing engine, the effect processor, and the GUS hardware interface.

πŸŽ›οΈ Effects

Trackers weren't just samplers β€” they had powerful real-time effects. All implemented in raw assembly:

Gxx β€” Portamento (slide to note)
Hxx β€” Vibrato (pitch wobble)
Jxx β€” Arpeggio (fake chords)
Ixx β€” Tremor (volume gating)
Qxx β€” Retrigger (drum rolls)
Dxx β€” Volume slide

Click any effect to see the original x86 assembly. Yes, people wrote this by hand. 🀯

🌍 The Demoscene

The demoscene wasn't just about music β€” it was a competitive underground culture of programmers, artists, and musicians pushing hardware to its limits. They'd gather at demoparties across Europe to show off their creations.

Names like Purple Motion, Skaven, Basehead, and Lizardking became legends. Their music β€” often composed on 4MB RAM machines β€” still sounds incredible today.

πŸ’Ύ Export WAV

to
πŸ”Š Dolby Surround Encoding
Surround placement is configured in the SAMPLES tab.
Samples have been auto-analyzed based on audio and pattern usage.
Adjust the Front↔Rear sliders to customize placement.
Exporting... 0%