A simple audio programming language implemented in JavaScript for creating music and sound directly in the browser.
Slang is an audio programming language implemented in JavaScript that allows users to create music and sound directly in the browser. It provides a simple syntax for defining synthesizers, drum machines, and musical patterns using sound lines and play lines, leveraging the Web Audio API for real-time audio processing. The project serves as an educational example of building a programming language from scratch with a focus on audio synthesis.
Developers and hobbyists interested in audio programming, music synthesis, or language implementation, particularly those looking to experiment with browser-based audio tools without deep computer science knowledge.
Slang offers a lightweight, browser-native environment for audio programming with an intuitive syntax inspired by musical notation, making it easy to quickly prototype sounds and sequences. Its use of Ohm.js and JavaScript lowers the learning curve for language creation, providing a practical roadmap for building custom languages.
🎤 a simple audio programming language implemented in JS
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Sound lines and play lines offer an intuitive, music-centric way to define synths and sequences, as shown in examples like '@synth (adsr (osc sine) 64n 8n 0 8n)' for quick prototyping.
Runs entirely in the browser using Web Audio API and Ohm.js, with no server required, enabling instant experimentation and sharing via the web editor.
Built with Ohm.js to demonstrate practical language implementation, providing a clear roadmap for developers learning to create custom programming languages.
Supports standard note values (e.g., 'c4', 'f#3') and rhythm values (e.g., '8n', '4t'), making it accessible for those with music theory knowledge.
The delay function is explicitly warned to 'not work very well' and may cause audio artifacts, limiting reliable effect usage and sound quality.
The README admits a 'distinct lack of in-context error handling, inline docs, helpful UI,' making debugging difficult and user experience frustrating.
Only basic oscillators, filters, and a few effects are available, with no support for sample loading, advanced modulation, or external audio inputs.
Locked to 120 BPM tempo and browser-only environment, with no options for tempo changes, offline rendering, or integration outside the web.