This repository is an experimental prototype.
Os-Daw was built as a technical exploration to test the limits of the modern Web Audio API and React's rendering capabilities in a high-frequency state environment. It is not intended to replace commercial desktop software but rather to serve as a playground for developers interested in audio programming, DSP (Digital Signal Processing) in the browser, and UI/UX design for complex creative tools.
Contribution Policy: There are no strict rules. This codebase is open for practice, experimentation, and learning. Feel free to fork the repository, refactor the audio engine, redesign the interface, or implement features solely to see if they are possible. All pull requests and forks are welcome in the spirit of open-source education.
Os-Daw is a zero-dependency Digital Audio Workstation running entirely in the browser. It combines a custom-written TypeScript audio engine with a responsive React interface to deliver a production environment that includes synthesis, sampling, mixing, and arrangement.
Beyond standard production tools, Os-Daw integrates Google Gemini to provide context-aware AI assistance, allowing the system to analyze the current project state (BPM, track settings, synth parameters) and offer intelligent debugging or creative suggestions.
- Step Sequencer: A 16-step rhythmic grid with immediate per-step feedback and playhead tracking.
- Pattern & Song Modes: A dual-workflow system allowing for loop-based composition and linear timeline arrangement.
- Sample Management: Native drag-and-drop support for WAV, MP3, and OGG files, alongside a procedural drum synthesis engine.
- Automation: Real-time parameter manipulation for filters, envelopes, and effects during playback.
- Triple Oscillator Architecture: Three oscillators per track offering Sine, Square (with PWM), Sawtooth (with Unison), and Triangle (with Wavefolding) options.
- Advanced Modulation: Dedicated LFOs assignable to Pitch, Filter Cutoff, or Amplitude.
- ADSR Shaping: precise Envelope control for amplitude shaping.
- Filter Topography: Multi-mode filters (LowPass, HighPass, BandPass, Notch) with variable resonance.
- Mixing Console: An analog-style mixer view with faders, panning, mute/solo groups, and stereo LED metering.
- FX Rack: A dedicated effects chain per track featuring:
- 3-Band Parametric EQ.
- Distortion & Saturation.
- Bitcrushing (Sample Rate Reduction).
- Stereo Chorus.
- Delay & Convolution Reverb.
- Master Bus: Integrated dynamics processing to manage headroom and prevent digital clipping.
The timeline view moves beyond loop-based sequencing, offering a linear canvas for arranging patterns into full compositions. It features a scalable grid, playhead tracking, and block management.
Designed to mimic hardware desks, the mixer provides a high-level overview of the project's gain staging. It separates the creative composition process from the technical mixing process.
The detail view allows for granular control over the sound generation engine. Users can visualize waveforms, adjust oscillator blending, and map modulation sources.
The core of Os-Daw operates on a detached logic separate from the UI thread to ensure timing accuracy.
Located in services/audioEngine.ts, the engine wraps the native AudioContext.
- Lookahead Scheduling: Uses the "scheduling ahead" technique to queue audio events slightly before their playback time, mitigating JavaScript garbage collection jitters.
- Node Graph: Audio nodes are created and routed dynamically based on track types (Synth vs. Sampler).
- Visualizers: An
AnalyserNodetaps the master output to drive real-time FFT (Fast Fourier Transform) and Oscilloscope renderings on an HTML5 Canvas.
The application manages complex state (Tracks, Patterns, Timeline Blocks) via React hooks, ensuring that UI updates do not block the audio processing thread.
The Assistant component captures a snapshot of the ProjectState JSON object. When a user queries the AI, this state is injected into the prompt context, allowing the Large Language Model (LLM) to "see" the settings of the DAW and provide specific advice rather than generic answers.
- Node.js (v18 or higher)
- npm or yarn
-
Clone the Repository
git clone https://github.com/dovvnloading/Os-DAW.git cd Os-DAW -
Install Dependencies
npm install
-
Environment Configuration (Optional) To enable the AI Assistant features, create a
.env.localfile in the root directory:GEMINI_API_KEY=your_google_gemini_api_key
Note: The DAW functions fully without an API key; only the chat assistant will be disabled.
-
Start Development Server
npm run dev
Open your browser to
http://localhost:3000.
This project is open-sourced under the Apache 2.0 License.
You are free to use, modify, distribute, and sell this software, provided that you include the original copyright notice, a copy of the license, and a statement of any significant changes made to the code.
