devalang 0.2.0

Write music with code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text.
Documentation
# =================
# Synths
# =================
# You can create synth sounds using the synth directive.
# Synth directive supports different waveforms and settings.
# Available waveforms: sine, square, saw, triangle.
# Available types: pluck, pad, bass, lead.
#
# Syntax:
# `synth -> waveform("<waveform>") -> <optional_param>(<param_value>)`
# Livecoding aliases: waveform = wave/osc, adsr = env

# Creating a simple synth with default sine waveform
let sineSynth = synth

# Creating a simple pluck sound with a square waveform
let pluckSynth = synth
    -> wave("square")
    -> preset("pluck")
    -> voices(4)
    -> env({
        attack: 0.001,
        decay: 0.3,
        sustain: 0.1,
        release: 0.1
    })

pluckSynth -> note(C4)

sleep 5000

pluckSynth -> chord([C3, C4, C5])