πΌ Devalang, by Devaloop Labs
πΆ Compose music with code β simple, structured, sonic.
Devalang is a tiny domain-specific language (DSL) for music makers, sound designers, and audio hackers. Compose loops, control samples, render and play audio β all in clean, readable text.
π¦ Whether you're building a track, shaping textures, or performing live, Devalang helps you think in rhythms. Itβs designed to be simple, expressive, and fast β because your ideas shouldnβt wait.
From studio sketches to live sets, Devalang gives you rhythmic control β with the elegance of code.
π§ v0.0.1-alpha.5 Notice π§
NEW: Devalang VSCode extension is now available ! Get it here.
Currently, Devalang CLI is only available for Windows.
Linux and macOS binaries will be added in future releases via cross-platform builds.
π Quick Access
π Features
- π΅ Audio Engine: Integrated audio playback and rendering
- π§© Module system for importing and exporting variables between files
- π Structured AST generation for debugging and future compilation
- π’ Basic data types: strings, numbers, booleans, maps, arrays
- ποΈ Watch mode for
build,checkandplaycommands - π Project templates for quick setup
π Installation
For users
- β οΈ Requires Node.js 18+
Install the package globally (NPM)
Usage without install (NPX)
For contributors
- β οΈ Requires Node.js 18+
- β οΈ Requires Rust 1.70+
> git
> cd
> npm
> cargo
Development usage (you can customize arguments in package.json)
# For syntax checking test
# For building test
β Usage
NOTE: Commands are available via devalang or npx @devaloop/devalang.
NOTE: Arguments can be passed to commands using --<argument> syntax. You can also use a configuration file to set default values for various settings, making it easier to manage your Devalang project.
NOTE: Some commands require a mandatory --entry argument to specify the input folder, and a --output argument to specify the output folder. If not specified, they default to ./src and ./output respectively.
For more examples, see docs/COMMANDS.md
Initialize a new project
In the current directory
Or use optional arguments to specify a directory name and a template
Checking syntax only
Building output files
Playing audio files (once by file change)
Playing audio files (continuous playback, even without file changes)
βοΈ Configuration
You can use a configuration file to set default values for various settings, making it easier to manage your Devalang project.
To do this, create a .devalang file in the root of your project directory.
See docs/CONFIG.md for more information.
π Syntax example
For more examples, see docs/SYNTAX.md
# index.deva
@import { globalBpm, globalBank, kickDuration } from "global.deva"
@load "./examples/samples/kick-808.wav" as customKick
bpm globalBpm
# Will declare the tempo at the globalBpm variable beats per minute
bank globalBank
# Will declare a custom instrument bank using the globalBank variable
# Loops
loop 5:
.customKick kickDuration {reverb=50, drive=25}
# Will play 5 times a custom sample for 500ms with reverb and overdrive effects
# Groups
group myGroup:
.customKick kickDuration {reverb=50, drive=25}
# Will play the same sample in a group, allowing for more complex patterns
# Will be executed line by line (sequentially)
call myGroup
# Will be executed in parallel (concurrently)
# spawn myGroup
# variables.deva
let globalBpm = 120
let globalBank = 808
let kickDuration = 500
@export { globalBpm, globalBank, kickDuration }
π§― Known issues
- No support yet for
if,else,else if,pattern,function, ... statements - No support yet for cross-platform builds (Linux, macOS)
π§ͺ Roadmap Highlights
For more info, see docs/ROADMAP.md
- β³ Other statements (e.g
if,function, ...) - β³ Cross-platform support (Linux, macOS)
- β³ More built-in instruments (e.g. snare, hi-hat, etc.)
π‘οΈ License
MIT β see LICENSE
π€ Contributing
Contributions, bug reports and suggestions are welcome !
Feel free to open an issue or submit a pull request.
π’ Contact
π§ contact@devaloop.com