Tuesday, November 18, 2025

The GWBASIC Chord Player: Bringing Classic Computing Music to the Modern Web


The GWBASIC Chord Player: Bringing Classic Computing Music to the Modern Web

The GWBASIC Chord Player is a web-based music player that faithfully recreates and extends the classic GWBASIC PLAY command syntax from the 1980s. Originally introduced in Microsoft's GWBASIC programming language for early IBM PC compatibles, the PLAY command allowed programmers to create music using a simple text-based notation system. This modern implementation not only preserves that vintage syntax but significantly enhances it with contemporary features like chord support, real-time visualization, and professional audio controls.

From Retro Commands to Modern Music

The player interprets the familiar GWBASIC notation: T120 sets tempo, O4 changes octaves, L4 defines note lengths, and letters A-G represent musical notes. What sets this implementation apart is its extended chord notation using brackets—[C,E,G] plays a C major chord, while [O2C,O4C,E,G] allows complex piano arrangements with bass notes spanning multiple octaves. This extension maintains the spirit of the original command while unlocking harmonic possibilities that weren't available in the 1980s. The player handles sharps (#), flats (b), rests (P), and duration modifiers with the same simplicity that made GWBASIC music accessible to beginner programmers decades ago.

A Complete Music Creation Ecosystem

Version 3.0 transforms the simple player into a comprehensive music tool with real-time waveform visualization, multiple synthesizer types (sine, square, sawtooth, triangle), master volume control, and reverb effects. The interface features an organized example library with everything from children's songs to jazz standards, categorized by difficulty and style. Users can save and load their compositions, test examples with a single click, and even use keyboard shortcuts for quick playback. The tabbed interface provides easy access to a complete command reference, example gallery, and version changelog, making it both a practical tool and an educational resource.

Bridging Past and Present

What makes the GWBASIC Chord Player particularly compelling is how it connects vintage computing nostalgia with modern web capabilities. Complementary tools like the MIDI-to-GWBASIC converter and MusicXML-to-GWBASIC converter allow users to transform contemporary sheet music and digital audio files into the classic text format. A curated collection of beginner piano pieces demonstrates the system's capabilities, from "Twinkle Twinkle Little Star" to Beethoven's "Ode to Joy," all rendered in simple text notation that anyone can type, modify, and share. Whether you're a retro computing enthusiast, a music educator looking for accessible notation, or simply curious about how early computers made music, the GWBASIC Chord Player offers a unique window into computing history while providing genuinely useful modern functionality.

GWBASIC PLAY COMMAND PLAYER

https://johnsokol.github.io/gwbasic-chord-player2.html


Command Reference:
Tnnn - Tempo (beats per minute, 32-255, default 120)
On - Octave (0-6, default 4, 4 is middle octave)
Ln - Default note Length (1=whole, 2=half, 4=quarter, 8=eighth, 16=sixteenth)
A-G - Notes (can add # or + for sharp, - for flat)
P - Pause/rest
Number after note - Duration override (e.g., C8 = eighth note C)

🎵 NEW CHORD SYNTAX:
[note1,note2,note3] - Play notes as chord with default length
[note1,note2,note3]n - Play chord with duration n
[C,E,G]4 - C major triad, quarter note
[E,O5C#]2 - E4 and C#5 together, half note
[D,F#,A,O5D]1 - D major with octave extension, whole note

Notes:
• Octave changes inside brackets apply to following notes: [C,O5E,G]
• Sharps/flats work inside brackets: [C#,E,G#]
• Duration after bracket applies to entire chord: [C,E,G]2
• Mix single notes and chords freely: C4 [E,G]4 B2



adds a new option... 
[O2C,O4C,E,G] - Bass + chord (wide octave spread for piano)

Examples:
Simple melody: T120 O4 L4 C D E F G
With chords: T120 O4 L4 [C,E,G] [D,F,A] [E,G,B]
Piano style: T120 O2 L4 [C,O4C,E,G] [G,O4B,D,F]
Mixed durations: T120 O4 L4 C8 D8 E4 F2



No comments: