@devaloop/devalang 0.0.1-alpha.9 → 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cargo/config.toml +2 -0
- package/.devalang +10 -4
- package/.github/workflows/ci.yml +103 -0
- package/Cargo.toml +80 -48
- package/README.md +135 -154
- package/docs/CHANGELOG.md +386 -1
- package/docs/CONTRIBUTING.md +101 -0
- package/docs/ROADMAP.md +10 -7
- package/docs/TODO.md +21 -9
- package/examples/automation.deva +42 -0
- package/examples/bank.deva +7 -0
- package/examples/duration.deva +9 -0
- package/examples/events.deva +12 -0
- package/examples/function.deva +15 -0
- package/examples/index.deva +57 -12
- package/examples/loop.deva +5 -12
- package/examples/pattern.deva +8 -0
- package/examples/plugin.deva +16 -0
- package/examples/variables.deva +1 -1
- package/out-tsc/bin/index.d.ts +2 -0
- package/out-tsc/bin/index.js +51 -7
- package/out-tsc/core/functions/index.d.ts +37 -0
- package/out-tsc/core/functions/index.js +76 -0
- package/out-tsc/core/index.d.ts +6 -0
- package/out-tsc/core/index.js +22 -0
- package/out-tsc/core/types/index.d.ts +4 -0
- package/out-tsc/core/types/index.js +20 -0
- package/out-tsc/core/types/plugin.d.ts +18 -0
- package/out-tsc/core/types/plugin.js +2 -0
- package/out-tsc/core/types/result.d.ts +27 -0
- package/out-tsc/core/types/result.js +2 -0
- package/out-tsc/core/types/statement.d.ts +106 -0
- package/out-tsc/core/types/statement.js +2 -0
- package/out-tsc/core/types/value.d.ts +43 -0
- package/out-tsc/core/types/value.js +2 -0
- package/out-tsc/index.d.ts +7 -0
- package/out-tsc/index.js +42 -1
- package/out-tsc/pkg/devalang_core.d.ts +13 -0
- package/out-tsc/pkg/devalang_core.js +50 -0
- package/out-tsc/pkg/devalang_core_bg.wasm.d.ts +33 -0
- package/out-tsc/scripts/copy-wasm-dts.d.ts +1 -0
- package/out-tsc/scripts/copy-wasm-dts.js +73 -0
- package/out-tsc/scripts/postinstall.d.ts +1 -0
- package/out-tsc/scripts/postinstall.js +83 -0
- package/out-tsc/scripts/version/bump.d.ts +1 -0
- package/out-tsc/scripts/version/fetch.d.ts +1 -0
- package/out-tsc/scripts/version/index.d.ts +1 -0
- package/out-tsc/scripts/version/sync.d.ts +1 -0
- package/package.json +28 -7
- package/project-version.json +4 -4
- package/rust/cli/bank/api.rs +122 -0
- package/rust/cli/bank/commands.rs +275 -0
- package/rust/cli/bank/mod.rs +29 -0
- package/rust/cli/build/commands.rs +103 -0
- package/rust/cli/build/mod.rs +2 -0
- package/rust/cli/build/process.rs +146 -0
- package/rust/cli/check/mod.rs +208 -0
- package/rust/cli/discover/commands.rs +253 -0
- package/rust/cli/discover/config.rs +111 -0
- package/rust/cli/discover/fs.rs +19 -0
- package/rust/cli/discover/install.rs +103 -0
- package/rust/cli/discover/metadata.rs +48 -0
- package/rust/cli/discover/mod.rs +5 -0
- package/rust/cli/{init.rs → init/commands.rs} +32 -23
- package/rust/cli/init/mod.rs +1 -0
- package/rust/cli/install/addon.rs +118 -0
- package/rust/cli/install/bank.rs +53 -0
- package/rust/cli/install/commands.rs +35 -0
- package/rust/cli/install/mod.rs +4 -0
- package/rust/cli/install/plugin.rs +61 -0
- package/rust/cli/login/commands.rs +124 -0
- package/rust/cli/login/mod.rs +1 -0
- package/rust/cli/mod.rs +12 -205
- package/rust/cli/parser.rs +314 -0
- package/rust/cli/play/commands.rs +324 -0
- package/rust/cli/play/io.rs +17 -0
- package/rust/cli/play/mod.rs +5 -0
- package/rust/cli/play/process.rs +150 -0
- package/rust/cli/play/realtime.rs +91 -0
- package/rust/cli/play/utils.rs +23 -0
- package/rust/cli/telemetry/commands.rs +22 -0
- package/rust/cli/telemetry/event_creator.rs +80 -0
- package/rust/cli/telemetry/mod.rs +3 -0
- package/rust/cli/telemetry/send.rs +51 -0
- package/rust/cli/{template.rs → template/commands.rs} +69 -57
- package/rust/cli/template/mod.rs +1 -0
- package/rust/cli/update/commands.rs +6 -0
- package/rust/cli/update/mod.rs +1 -0
- package/rust/config/driver.rs +103 -0
- package/rust/config/mod.rs +3 -16
- package/rust/config/ops.rs +26 -0
- package/rust/config/settings.rs +101 -0
- package/rust/core/audio/engine/helpers.rs +170 -0
- package/rust/core/audio/engine/mod.rs +7 -0
- package/rust/core/audio/engine/sample.rs +366 -0
- package/rust/core/audio/engine/synth.rs +325 -0
- package/rust/core/audio/evaluator.rs +310 -31
- package/rust/core/audio/interpreter/arrow_call.rs +311 -129
- package/rust/core/audio/interpreter/automate.rs +18 -0
- package/rust/core/audio/interpreter/call.rs +294 -64
- package/rust/core/audio/interpreter/condition.rs +71 -69
- package/rust/core/audio/interpreter/driver.rs +542 -216
- package/rust/core/audio/interpreter/function.rs +26 -0
- package/rust/core/audio/interpreter/let_.rs +38 -19
- package/rust/core/audio/interpreter/load.rs +19 -18
- package/rust/core/audio/interpreter/loop_.rs +114 -67
- package/rust/core/audio/interpreter/mod.rs +14 -12
- package/rust/core/audio/interpreter/sleep.rs +28 -36
- package/rust/core/audio/interpreter/spawn.rs +252 -66
- package/rust/core/audio/interpreter/tempo.rs +40 -16
- package/rust/core/audio/interpreter/trigger.rs +239 -69
- package/rust/core/audio/loader/mod.rs +1 -1
- package/rust/core/audio/loader/trigger.rs +97 -52
- package/rust/core/audio/mod.rs +7 -6
- package/rust/core/audio/player.rs +70 -54
- package/rust/core/audio/renderer.rs +54 -54
- package/rust/core/audio/special/easing.rs +189 -0
- package/rust/core/audio/special/env.rs +45 -0
- package/rust/core/audio/special/math.rs +134 -0
- package/rust/core/audio/special/mod.rs +9 -0
- package/rust/core/audio/special/modulator.rs +143 -0
- package/rust/core/builder/mod.rs +86 -80
- package/rust/core/debugger/lexer.rs +27 -27
- package/rust/core/debugger/mod.rs +30 -21
- package/rust/core/debugger/module.rs +55 -0
- package/rust/core/debugger/preprocessor.rs +27 -27
- package/rust/core/debugger/store.rs +40 -25
- package/rust/core/error/mod.rs +269 -60
- package/rust/core/lexer/driver.rs +61 -0
- package/rust/core/lexer/handler/arrow.rs +82 -31
- package/rust/core/lexer/handler/at.rs +21 -21
- package/rust/core/lexer/handler/brace.rs +41 -41
- package/rust/core/lexer/handler/colon.rs +21 -21
- package/rust/core/lexer/handler/comment.rs +30 -30
- package/rust/core/lexer/handler/dot.rs +21 -21
- package/rust/core/lexer/handler/driver.rs +337 -226
- package/rust/core/lexer/handler/identifier.rs +47 -41
- package/rust/core/lexer/handler/indent.rs +66 -52
- package/rust/core/lexer/handler/mod.rs +15 -14
- package/rust/core/lexer/handler/newline.rs +23 -23
- package/rust/core/lexer/handler/number.rs +31 -31
- package/rust/core/lexer/handler/operator.rs +46 -44
- package/rust/core/lexer/handler/parenthesis.rs +41 -0
- package/rust/core/lexer/handler/slash.rs +21 -0
- package/rust/core/lexer/handler/string.rs +63 -63
- package/rust/core/lexer/mod.rs +3 -51
- package/rust/core/lexer/token.rs +17 -12
- package/rust/core/mod.rs +10 -10
- package/rust/core/parser/driver.rs +584 -331
- package/rust/core/parser/handler/arrow_call.rs +253 -126
- package/rust/core/parser/handler/at.rs +279 -162
- package/rust/core/parser/handler/bank.rs +104 -41
- package/rust/core/parser/handler/condition.rs +83 -74
- package/rust/core/parser/handler/dot.rs +148 -112
- package/rust/core/parser/handler/identifier/automate.rs +254 -0
- package/rust/core/parser/handler/identifier/call.rs +91 -41
- package/rust/core/parser/handler/identifier/emit.rs +70 -0
- package/rust/core/parser/handler/identifier/function.rs +113 -0
- package/rust/core/parser/handler/identifier/group.rs +89 -75
- package/rust/core/parser/handler/identifier/let_.rs +173 -133
- package/rust/core/parser/handler/identifier/mod.rs +55 -51
- package/rust/core/parser/handler/identifier/on.rs +107 -0
- package/rust/core/parser/handler/identifier/print.rs +49 -0
- package/rust/core/parser/handler/identifier/sleep.rs +43 -33
- package/rust/core/parser/handler/identifier/spawn.rs +91 -41
- package/rust/core/parser/handler/identifier/synth.rs +135 -65
- package/rust/core/parser/handler/loop_.rs +194 -72
- package/rust/core/parser/handler/mod.rs +9 -8
- package/rust/core/parser/handler/pattern.rs +74 -0
- package/rust/core/parser/handler/tempo.rs +57 -47
- package/rust/core/parser/mod.rs +3 -4
- package/rust/core/parser/statement.rs +11 -96
- package/rust/core/plugin/loader.rs +137 -0
- package/rust/core/plugin/mod.rs +2 -0
- package/rust/core/plugin/runner.rs +347 -0
- package/rust/core/preprocessor/loader.rs +637 -193
- package/rust/core/preprocessor/mod.rs +4 -4
- package/rust/core/preprocessor/module.rs +60 -50
- package/rust/core/preprocessor/processor.rs +114 -76
- package/rust/core/preprocessor/resolver/bank.rs +49 -47
- package/rust/core/preprocessor/resolver/call.rs +124 -123
- package/rust/core/preprocessor/resolver/condition.rs +95 -92
- package/rust/core/preprocessor/resolver/driver.rs +324 -227
- package/rust/core/preprocessor/resolver/function.rs +69 -0
- package/rust/core/preprocessor/resolver/group.rs +94 -61
- package/rust/core/preprocessor/resolver/let_.rs +32 -31
- package/rust/core/preprocessor/resolver/loop_.rs +318 -91
- package/rust/core/preprocessor/resolver/mod.rs +16 -14
- package/rust/core/preprocessor/resolver/pattern.rs +83 -0
- package/rust/core/preprocessor/resolver/spawn.rs +99 -58
- package/rust/core/preprocessor/resolver/synth.rs +54 -50
- package/rust/core/preprocessor/resolver/tempo.rs +48 -49
- package/rust/core/preprocessor/resolver/trigger.rs +116 -112
- package/rust/core/preprocessor/resolver/value.rs +176 -78
- package/rust/core/store/export.rs +28 -28
- package/rust/core/store/function.rs +40 -0
- package/rust/core/store/global.rs +61 -39
- package/rust/core/store/import.rs +28 -28
- package/rust/core/store/mod.rs +5 -4
- package/rust/core/store/variable.rs +51 -28
- package/rust/core/utils/mod.rs +1 -2
- package/rust/core/utils/path.rs +37 -31
- package/rust/lib.rs +308 -117
- package/rust/main.rs +364 -65
- package/rust/types/Cargo.toml +11 -0
- package/rust/types/src/addons.rs +55 -0
- package/rust/types/src/ast.rs +202 -0
- package/rust/types/src/config.rs +74 -0
- package/rust/types/src/lib.rs +12 -0
- package/rust/types/src/telemetry.rs +85 -0
- package/rust/utils/Cargo.toml +26 -0
- package/rust/utils/src/error.rs +186 -0
- package/rust/utils/src/file.rs +94 -0
- package/rust/utils/src/first_usage.rs +97 -0
- package/rust/utils/{mod.rs → src/lib.rs} +9 -6
- package/rust/utils/{logger.rs → src/logger.rs} +200 -123
- package/rust/utils/src/path.rs +88 -0
- package/rust/utils/src/signature.rs +41 -0
- package/rust/utils/{spinner.rs → src/spinner.rs} +20 -21
- package/rust/utils/src/version.rs +27 -0
- package/rust/utils/{watcher.rs → src/watcher.rs} +46 -33
- package/rust/web/api.rs +5 -0
- package/rust/web/cdn.rs +34 -0
- package/rust/web/mod.rs +3 -0
- package/rust/web/sso.rs +5 -0
- package/templates/minimal/README.md +143 -127
- package/templates/welcome/README.md +143 -127
- package/templates/welcome/src/index.deva +56 -8
- package/templates/welcome/src/variables.deva +2 -4
- package/tests/integration.rs +21 -0
- package/tests/rust/cli_check_build.rs +21 -0
- package/tests/rust/cli_help.rs +12 -0
- package/tests/rust/cli_template_list.rs +10 -0
- package/tests/rust/cli_version.rs +11 -0
- package/tests/typescript/index.spec.ts +136 -0
- package/tests/typescript/playhead.spec.ts +36 -0
- package/tests/typescript/render_e2e.spec.ts +77 -0
- package/tsconfig.json +12 -10
- package/typescript/bin/index.ts +19 -5
- package/typescript/core/functions/index.ts +83 -0
- package/typescript/core/index.ts +6 -0
- package/typescript/core/types/index.ts +4 -0
- package/typescript/core/types/plugin.ts +19 -0
- package/typescript/core/types/result.ts +29 -0
- package/typescript/core/types/statement.ts +47 -0
- package/typescript/core/types/value.ts +29 -0
- package/typescript/index.ts +8 -1
- package/typescript/pkg/devalang_core.d.ts +4 -0
- package/typescript/pkg/devalang_core.ts +49 -0
- package/typescript/scripts/copy-wasm-dts.ts +41 -0
- package/typescript/scripts/postinstall.ts +85 -0
- package/typescript/scripts/version/bump.ts +0 -1
- package/typescript/scripts/version/index.ts +0 -1
- package/docs/COMMANDS.md +0 -85
- package/docs/CONFIG.md +0 -30
- package/docs/SYNTAX.md +0 -210
- package/out-tsc/bin/devalang.exe +0 -0
- package/out-tsc/scripts/postbuild.js +0 -11
- package/rust/cli/build.rs +0 -137
- package/rust/cli/check.rs +0 -117
- package/rust/cli/play.rs +0 -193
- package/rust/config/loader.rs +0 -13
- package/rust/core/audio/engine.rs +0 -203
- package/rust/core/shared/duration.rs +0 -8
- package/rust/core/shared/mod.rs +0 -2
- package/rust/core/shared/value.rs +0 -18
- package/rust/core/utils/validation.rs +0 -37
- package/rust/utils/file.rs +0 -35
- package/rust/utils/signature.rs +0 -17
- package/rust/utils/version.rs +0 -15
- package/typescript/scripts/postbuild.ts +0 -8
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,394 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://devalang.com/images/devalang-logo-min.png" alt="Devalang Logo" width="100" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
# Changelog
|
|
6
6
|
|
|
7
|
+
## Version 0.0.1-beta.1 (2025-09-02)
|
|
8
|
+
|
|
9
|
+
> First beta of Devalang 0.0.1. Focus on stability, language surface freeze, and developer experience. No breaking changes expected compared to alpha.18; experimental features are gated and may change.
|
|
10
|
+
>
|
|
11
|
+
> NOTE: this beta release does not include pre-built WASM/Node bindings in the npm package. If you need WASM bindings, build them locally in the `rust/devalang` directory with `wasm-pack build --target nodejs` and copy the generated `pkg` into `out-tsc/pkg/`, or wait for a future release that bundles the artifacts.
|
|
12
|
+
|
|
13
|
+
### ✨ Language Features
|
|
14
|
+
|
|
15
|
+
- Language surface freeze for beta: core syntax and semantics stabilized; future breaking changes will follow a deprecation policy.
|
|
16
|
+
- `pattern` enhancements: improved scheduling accuracy and step handling; supports accents and swing via step markers; clearer error messages for malformed patterns.
|
|
17
|
+
- Better diagnostics across the language: consistent error formatting with source spans and error codes.
|
|
18
|
+
|
|
19
|
+
### 🧠 Core Engine
|
|
20
|
+
|
|
21
|
+
- High-precision scheduler: tighter timing guarantees and improved alignment with BPM; more reliable loop execution and periodic handlers.
|
|
22
|
+
- Audio quality: automatic micro-fades on start/end to reduce clicks; improved handling of tails and voice polyphony.
|
|
23
|
+
- Sample engine: safer stereo/mono handling and level preservation; fewer edge-case distortions on rapid retriggers.
|
|
24
|
+
|
|
25
|
+
### 🧩 Parser & Lexer
|
|
26
|
+
|
|
27
|
+
- Span-rich errors across maps/arrays and complex expressions; clearer messages and recovery where possible.
|
|
28
|
+
- Lexer driver matured to cleanly separate file resolution from tokenization; fewer panics and better diagnostics.
|
|
29
|
+
|
|
30
|
+
### 🔁 Preprocessor & Resolution
|
|
31
|
+
|
|
32
|
+
- Deterministic include/resolve order; variable lookup consistently walks parent scopes.
|
|
33
|
+
- Pattern resolver integration hardened to ensure `call`/`spawn` of patterns behave like functions/groups.
|
|
34
|
+
|
|
35
|
+
### 🛠️ CLI & Telemetry
|
|
36
|
+
|
|
37
|
+
- `build`, `check`, `play`: consistent exit codes and non-watch behavior; clearer surfacing of errors.
|
|
38
|
+
- `install`/`discover`: authentication flow improved; better JSON/API error reporting; integrity checks on downloaded artifacts.
|
|
39
|
+
- Telemetry: stable anonymous machine UUID; records CLI version/OS/args with opt-out capability; ensures `.deva` directory exists.
|
|
40
|
+
|
|
41
|
+
### 📦 Packaging (WASM/Node/Rust)
|
|
42
|
+
|
|
43
|
+
- WASM/TypeScript distribution: safer postinstall with guarded downloads; robust `.d.ts` types and ESM/CJS compatibility.
|
|
44
|
+
- Rust crates: metadata completed and internal versions pinned; native-only features kept optional to reduce footprint.
|
|
45
|
+
|
|
46
|
+
### 🧪 Tests & CI
|
|
47
|
+
|
|
48
|
+
- Added unit tests for parser, pattern scheduling, and selected core utilities; initial wasm smoke tests.
|
|
49
|
+
- CI matrix across Linux/macOS/Windows and Node/Rust versions; release pipeline hardened.
|
|
50
|
+
|
|
51
|
+
## Version 0.0.1-alpha.18 (2025-09-02)
|
|
52
|
+
|
|
53
|
+
### ✨ Language Features
|
|
54
|
+
|
|
55
|
+
- New `pattern` statement to define rhythmic patterns with an optional target entity.
|
|
56
|
+
- Example: `pattern kickPattern with my808.kick = "x--- x--- x--- x---"`
|
|
57
|
+
- Patterns can be invoked with `call` or `spawn` just like functions or groups.
|
|
58
|
+
|
|
59
|
+
### 🧠 Core Engine
|
|
60
|
+
|
|
61
|
+
- Pattern playback: schedules steps across one bar (4 beats), computing per-step duration and triggering the target on non-rest characters.
|
|
62
|
+
- ADSR envelope: improved interpolation at segment boundaries to avoid clicks and handle 0/1-sample edge cases.
|
|
63
|
+
- Sample engine: robust stereo-to-mono mixdown with RMS-preserving scaling; applies a tiny automatic fade (~1 ms) when samples start/end abruptly to reduce clicks.
|
|
64
|
+
|
|
65
|
+
### 🧩 Parser & Lexer
|
|
66
|
+
|
|
67
|
+
- Added `Pattern` token and parser handler; supports `pattern <name> [with <bank.trigger>] = "..."`.
|
|
68
|
+
- Introduced a dedicated lexer driver (`rust/core/lexer/driver.rs`) to separate file resolution from tokenization.
|
|
69
|
+
- Map/array parsing now logs structured errors via the shared logger instead of printing to stdout.
|
|
70
|
+
|
|
71
|
+
### 🔁 Preprocessor & Resolution
|
|
72
|
+
|
|
73
|
+
- Pattern resolver stores definitions in the variable table, enabling later `call`/`spawn` usage.
|
|
74
|
+
- Variable lookup now walks parent scopes, fixing missed resolutions for outer-scope identifiers.
|
|
75
|
+
|
|
76
|
+
### 🛠️ CLI & Telemetry
|
|
77
|
+
|
|
78
|
+
- `build`: non-watch mode now executes and surfaces errors correctly.
|
|
79
|
+
- `install`: requires authentication and reports API/JSON errors with clear messages.
|
|
80
|
+
- Telemetry: generates a stable UUID when missing; consistently records CLI version, OS, and args.
|
|
81
|
+
- Ensures the `.deva` directory exists at startup.
|
|
82
|
+
|
|
83
|
+
### 📚 Examples
|
|
84
|
+
|
|
85
|
+
- Added `examples/pattern.deva`; updated `examples/index.deva` to demonstrate `pattern` and `spawn`.
|
|
86
|
+
|
|
87
|
+
### 📦 Packaging
|
|
88
|
+
|
|
89
|
+
- Added crate metadata (description, license, authors) and pinned internal versions for `devalang_types` and `devalang_utils`.
|
|
90
|
+
|
|
91
|
+
### 🐛 Fixes & Stability
|
|
92
|
+
|
|
93
|
+
- Safer `$math` parsing with diagnostics for malformed calls and argument evaluation failures.
|
|
94
|
+
- Minor parser fixes (loop body collection, clearer error messages) and logging cleanups across modules.
|
|
95
|
+
|
|
96
|
+
## Version 0.0.1-alpha.17 (2025-08-30)
|
|
97
|
+
|
|
98
|
+
### ✨ Addons
|
|
99
|
+
|
|
100
|
+
- Discovering addons: use the CLI to discover plugins or banks : place compiled addons (.devabank, .devaplugin) anywhere into your `.deva` folder, then run:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
devalang discover
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- Installing external addons: use the CLI to install addons:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
devalang install <plugin | bank> user.myPlugin
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- Plugin usage: you can now reference installed plugins directly from Devalang source
|
|
113
|
+
using the `@use` directive and an optional alias. Examples:
|
|
114
|
+
|
|
115
|
+
- `@use user.myPlugin` — exposes the plugin under its default name
|
|
116
|
+
- `@use user.myPlugin as myAlias` — expose the plugin as `myAlias` for shorter calls
|
|
117
|
+
|
|
118
|
+
### 🧩 Packaging & TypeScript
|
|
119
|
+
|
|
120
|
+
- Improved packaging and postinstall logic for the TypeScript/WASM distribution; the
|
|
121
|
+
Node package now avoids hard-failing when optional native binaries are not available.
|
|
122
|
+
- `out-tsc` postinstall now performs guarded downloads and better logging to help consumers diagnose installation issues on CI or constrained environments.
|
|
123
|
+
|
|
124
|
+
### 🧠 Architecture & Refactor
|
|
125
|
+
|
|
126
|
+
- Introduced a shared `devalang_types` crate to centralize project types and config structures — this simplifies cross-crate typing between the CLI, core, utils and WASM artifacts.
|
|
127
|
+
- Split utilities into a reusable `devalang_utils` crate (logger, watcher, spinner, file helpers, telemetry) and moved several helpers (path resolution, file copying, safe archive extraction) to that crate.
|
|
128
|
+
- Modularized CLI features, clean separation between build/process, realtime runner, IO helpers and stats collection.
|
|
129
|
+
|
|
130
|
+
### 🐛 Bug fixes & stability
|
|
131
|
+
|
|
132
|
+
- Multiple robustness fixes across the parser, preprocessor and audio engine:
|
|
133
|
+
- dotted identifiers and synth/provider resolution improvements,
|
|
134
|
+
- safer path resolution for `.deva` resources (banks, plugins, presets),
|
|
135
|
+
- improved error collection and logging with annotated stacks for better debug output.
|
|
136
|
+
- Audio runtime: better BPM/duration estimation and loop handling in the realtime runner to avoid premature termination of periodic handlers while loops execute.
|
|
137
|
+
|
|
138
|
+
### 🧪 Tests & CI
|
|
139
|
+
|
|
140
|
+
- Added test scaffolding and types to centralize cross-crate tests (test harness and lightweight types prepared in `devalang_types`); this enables adding unit tests incrementally without duplicating type definitions. (Full test coverage is ongoing.)
|
|
141
|
+
|
|
142
|
+
## Version 0.0.1-alpha.16-hotfix.2 (2025-08-29)
|
|
143
|
+
|
|
144
|
+
### 🌎 Ecosystem
|
|
145
|
+
|
|
146
|
+
- Published `@devaloop/devaforge` on npm. A tool for creating and managing Devalang addons.
|
|
147
|
+
|
|
148
|
+
### 🔎 Telemetry
|
|
149
|
+
|
|
150
|
+
- Patched first usage and user configuration.
|
|
151
|
+
|
|
152
|
+
## Version 0.0.1-alpha.16-hotfix.1 (2025-08-29)
|
|
153
|
+
|
|
154
|
+
### 🌎 Ecosystem
|
|
155
|
+
|
|
156
|
+
- Fixed Github Actions to build and release binaries for multiple platforms.
|
|
157
|
+
- Fixed `postinstall` script to launch properly postinstall.js when installing core package
|
|
158
|
+
|
|
159
|
+
## Version 0.0.1-alpha.16 (2025-08-28)
|
|
160
|
+
|
|
161
|
+
### 🌎 Ecosystem
|
|
162
|
+
|
|
163
|
+
- Added Github Actions to build and release binaries for multiple platforms.
|
|
164
|
+
|
|
165
|
+
### 🧩 Language Features
|
|
166
|
+
|
|
167
|
+
- `bank` handler: add `as <alias>` support and robust parsing of `author.name` and string names.
|
|
168
|
+
- Example: `bank user.808 as my808`, `bank user.myBank as myBank`
|
|
169
|
+
- `plugin` handler: initial implementation with basic support for loading and resolving plugins.
|
|
170
|
+
- Example: `@use user.myPlugin`, `@use user.myPlugin as myAlias`
|
|
171
|
+
- `on` event handler: implemented event trigger resolution and context management.
|
|
172
|
+
- Example: `on beat: ...`, `on bar: ...`, `on custom: ...`
|
|
173
|
+
- `emit` event handler: initial implementation for emitting events.
|
|
174
|
+
- Example: `emit beat`, `emit custom { value: 42 }`
|
|
175
|
+
- `print`: add JS-like string concatenation with `+` between strings, variables, numbers, and `$env`/`$math` expressions.
|
|
176
|
+
- Examples: `print "looping " + i`, `print "bpm=" + $env.bpm`, `print "sin=" + $math.sin(0.5)`
|
|
177
|
+
|
|
178
|
+
### 🧠 Core Engine
|
|
179
|
+
|
|
180
|
+
- Cleanest error handling for unknown triggers (module:line:column), no implicit file search.
|
|
181
|
+
- Real-time runner (play): loops are paced at 1 iteration per beat on the same thread.
|
|
182
|
+
- Periodic events (`on beat`, `on $beat`, `on bar`, `on $bar`) are suspended while a loop is running to avoid interleaving.
|
|
183
|
+
- Loops stop strictly at the end of their block (dedent / end-of-line).
|
|
184
|
+
- Duration estimation improved by accounting for loop iteration counts to keep the runner alive as needed.
|
|
185
|
+
|
|
186
|
+
### 🔎 Telemetry (stats)
|
|
187
|
+
|
|
188
|
+
- Added basic telemetry support for tracking module loading and resolution times.
|
|
189
|
+
- To enable telemetry, execute `devalang telemetry enable`
|
|
190
|
+
- To disable telemetry, execute `devalang telemetry disable`
|
|
191
|
+
|
|
192
|
+
## Version 0.0.1-alpha.15 (2025-08-27)
|
|
193
|
+
|
|
194
|
+
### ✨ Language Features
|
|
195
|
+
|
|
196
|
+
- Added `automate` statement to schedule parameter automation (e.g. volume, pan, pitch) over time
|
|
197
|
+
- Supports per-note automation via a `automate` map on note calls (e.g. `note(C4, { automate: { volume: { 0%: 0.0, 100%: 1.0 } } })`)
|
|
198
|
+
- Added `print` statement to ease debugging at runtime
|
|
199
|
+
- Added special variables and functions usable in expressions:
|
|
200
|
+
- `$env.bpm`, `$env.beat`
|
|
201
|
+
- `$math.sin(expr)`, `$math.cos(expr)`
|
|
202
|
+
- `$env.position` (alias of beat), `$env.seed` (global session seed for deterministic randomness)
|
|
203
|
+
- `$math.random(seed?)`, `$math.lerp(a, b, t)`
|
|
204
|
+
- `$easing.*` functions for shaping values in [0,1]:
|
|
205
|
+
- `linear`, `easeIn/Out/InOutQuad`, `easeIn/Out/InOutCubic`, `easeIn/Out/InOutQuart`,
|
|
206
|
+
`easeIn/Out/InOutExpo`, `easeIn/Out/InOutBack`, `easeIn/Out/InOutElastic`, `easeIn/Out/InOutBounce`
|
|
207
|
+
- `$mod.*` modulators for time-based control:
|
|
208
|
+
- `lfo.sine(ratePerBeat)`, `lfo.tri(ratePerBeat)`, `envelope(attack, decay, sustain, release, t)`
|
|
209
|
+
- Added basic `for` loops and array literals
|
|
210
|
+
- Example: `for i in [1, 2, 3]: print i`
|
|
211
|
+
|
|
212
|
+
### 🧠 Core Engine
|
|
213
|
+
|
|
214
|
+
- Implemented runtime automation in the audio renderer with linear envelope interpolation
|
|
215
|
+
- Per-note automation supported (volume, pan, pitch) and evaluated during rendering
|
|
216
|
+
- Fixed evaluator recursion guard and improved `$math.*` expression handling (prevents stack overflows)
|
|
217
|
+
- Minor ADSR defaults polish: ensure `sustain` defaults to `1.0`
|
|
218
|
+
- Evaluator now supports `$mod.*` and `$easing.*` calls (evaluated before `$math.*`) for richer automation
|
|
219
|
+
- Modularized `AudioEngine::insert_note` into small helpers (oscillator, ADSR computation, pan gains, envelope evaluation, stereo mix)
|
|
220
|
+
- Reused helpers in `pad_samples` to reduce duplication
|
|
221
|
+
- Moved special variables/functions to a dedicated module: `core::audio::special`, and refactored the evaluator to use it
|
|
222
|
+
- Continued borrow-friendly refactors to avoid unnecessary clones and improve readability
|
|
223
|
+
|
|
224
|
+
### 🧩 Parser / Preprocessor
|
|
225
|
+
|
|
226
|
+
- Parser upgrades for operators `+ - * /`, parentheses and brackets
|
|
227
|
+
- Improved arrow-call parsing and map handling for multi-line values
|
|
228
|
+
- Resolvers: refined `call`/`spawn` resolution (better error messages with stack traces)
|
|
229
|
+
|
|
230
|
+
### 🧱 Architecture / Refactor
|
|
231
|
+
|
|
232
|
+
- Modularized audio interpreter (split by statement type); clearer responsibilities
|
|
233
|
+
- Reduced allocations by passing slices/borrows instead of cloning large structures
|
|
234
|
+
- Removed dead code and unused params across resolvers, handlers, and interpreter modules
|
|
235
|
+
|
|
236
|
+
### 🧰 Tooling / Build
|
|
237
|
+
|
|
238
|
+
- Resolved binary/lib artifact collision by renaming the internal library crate to `devalang_core`
|
|
239
|
+
- Warning sweep: build now compiles cleanly without Rust warnings (and fewer Clippy lints)
|
|
240
|
+
- Moved error collection helpers into a dedicated `utils::error` module
|
|
241
|
+
|
|
242
|
+
### 🐛 Fixes & Stability
|
|
243
|
+
|
|
244
|
+
- Prevent infinite recursion during numeric expression evaluation
|
|
245
|
+
- Stabilized renderer and interpreter timing when combining `loop`, `call`, and `spawn`
|
|
246
|
+
|
|
247
|
+
### ⚠️ Breaking changes
|
|
248
|
+
|
|
249
|
+
- Internal crate rename to `devalang_core` (no change to the CLI or WASM package names)
|
|
250
|
+
|
|
251
|
+
## Version 0.0.1-alpha.14 (2025-08-24)
|
|
252
|
+
|
|
253
|
+
### 🌎 Ecosystem
|
|
254
|
+
|
|
255
|
+
- Deployed "SSO" (Single Sign-On) for user authentication. [(https://sso.devalang.com)](https://sso.devalang.com) when using `devalang login`.
|
|
256
|
+
|
|
257
|
+
### 🧩 Language Features
|
|
258
|
+
|
|
259
|
+
- Added support for ADSR envelopes in synthesizers.
|
|
260
|
+
- Example: `let mySynth = synth sine { attack: 0, decay: 50, sustain: 100, release: 50 }`
|
|
261
|
+
- Added support for `note` parameters in synthesizers.
|
|
262
|
+
- Example: `mySynth -> note(C4, { duration: 500, velocity: 0.8, glide: true, slide: false })`
|
|
263
|
+
|
|
264
|
+
### 🧠 Core Engine
|
|
265
|
+
|
|
266
|
+
- Patched banks resolution with improved namespace handling. (declaring `bank <bank_author>.<bank_name>` and using `.<bank_name>.<bank_trigger>`)
|
|
267
|
+
- Patched `arrow_call` to correctly handle argument parsing and improve error reporting.
|
|
268
|
+
- Implemented multi-line argument parsing for `arrow_call`.
|
|
269
|
+
- Patched execution of `arrow_call` to ensure correct timing and execution order.
|
|
270
|
+
- Upgraded indent lexer to handle multi-line statements and improve indentation handling.
|
|
271
|
+
- Upgraded `parse_map_value` to handle multi-line values and improve parsing logic in Parser.
|
|
272
|
+
- Added `log_message_with_trace` function to log messages with informations when running commands with `debug` flag.
|
|
273
|
+
|
|
274
|
+
### 🧰 Commands
|
|
275
|
+
|
|
276
|
+
- Added `login` command to authenticate users to install protected or private packages.
|
|
277
|
+
- Refactored `install` command to support installing banks, presets and plugins.
|
|
278
|
+
- `install bank <bank_author>.<bank_name>` to install a specific bank of sounds.
|
|
279
|
+
- `install preset <preset_author>.<preset_name>` to install a specific preset.
|
|
280
|
+
- `install plugin <plugin_author>.<plugin_name>` to install a specific plugin.
|
|
281
|
+
- Implemented `debug` and `compress` arguments for `build`, `check` and `play` commands.
|
|
282
|
+
- `build --debug` to build the AST with debug information.
|
|
283
|
+
- `check --debug` to check the syntax with debug information.
|
|
284
|
+
- `play --debug` to play the audio with debug information.
|
|
285
|
+
- `build --compress` to compress the output.
|
|
286
|
+
- `check --compress` to compress the output.
|
|
287
|
+
- `play --compress` to compress the output.
|
|
288
|
+
|
|
289
|
+
## Version 0.0.1-alpha.13 (2025-07-26)
|
|
290
|
+
|
|
291
|
+
### 🧩 Language Features
|
|
292
|
+
|
|
293
|
+
- Added support for `fn` directive to define functions in Devalang.
|
|
294
|
+
- Example: `fn myFunction(param1, param2):`
|
|
295
|
+
|
|
296
|
+
### 🧠 Core Engine
|
|
297
|
+
|
|
298
|
+
- Patched `trigger`, `call`, and `spawn`, `renderer` to handle correct cursor time in the audio interpreter.
|
|
299
|
+
- Refactored audio engine and interpreter to handle correct timing and execution while using `loop`, `call`, and `spawn` statements.
|
|
300
|
+
- Refactored `trigger` effects to apply more effects to triggers.
|
|
301
|
+
- Example: `.myTrigger auto { reverb: 0.25, pitch: 0.75, gain: 0.8 }`
|
|
302
|
+
- Refactored `preprocessor` to handle correct namespaced banks of sounds and triggers.
|
|
303
|
+
- Refactored `collect_errors_recursively` to provide detailed error reporting across nested statements.
|
|
304
|
+
- Optimized the `renderer` to handle silent buffers and improve performance.
|
|
305
|
+
|
|
306
|
+
### 🛠️ Utilities
|
|
307
|
+
|
|
308
|
+
- Added the `extract_loop_body_statements` utility for better loop handling.
|
|
309
|
+
- Improved logging for module variables and functions.
|
|
310
|
+
|
|
311
|
+
### 🧩 Web Assembly
|
|
312
|
+
|
|
313
|
+
- Patched `lib.rs` dependencies to ensure compatibility with the latest Rust and WASM standards.
|
|
314
|
+
|
|
315
|
+
## Version 0.0.1-alpha.12 (2025-07-21)
|
|
316
|
+
|
|
317
|
+
### 🧩 Language Features
|
|
318
|
+
|
|
319
|
+
- Implemented `trigger` effects to apply effects to triggers, allowing for more dynamic sound manipulation.
|
|
320
|
+
- Example: `.myTrigger auto { reverb: 1.0, pitch: 1.5, gain: 0.8 }`
|
|
321
|
+
|
|
322
|
+
### 🧠 Core Engine
|
|
323
|
+
|
|
324
|
+
- Moved `utils::installer` to `installer::utils` to better organize the project structure.
|
|
325
|
+
- Set CLI dependencies as optional in `Cargo.toml` to allow for a cleaner build without CLI features.
|
|
326
|
+
- Patched `@load` relative path resolution to ensure correct loading of external resources.
|
|
327
|
+
- Patched `trigger` statement that was not correctly parsed when using namespaced banks of sounds.
|
|
328
|
+
|
|
329
|
+
### 🧩 Web Assembly
|
|
330
|
+
|
|
331
|
+
- Patched `lib.rs` dependencies to ensure compatibility with the latest Rust and WASM standards.
|
|
332
|
+
|
|
333
|
+
## Version 0.0.1-alpha.11 (2025-07-20)
|
|
334
|
+
|
|
335
|
+
### 📖 Documentation
|
|
336
|
+
|
|
337
|
+
- Removed old documentation, please refer to the [new documentation website](https://docs.devalang.com) for the latest information.
|
|
338
|
+
|
|
339
|
+
### ✨ Syntax
|
|
340
|
+
|
|
341
|
+
- Added namespaced banks of sounds, allowing for better organization and management of sound banks.
|
|
342
|
+
- Example: `.808.myTrigger` to access a specific trigger in the `808` bank.
|
|
343
|
+
- Added support for beat durations in `triggers` statements, allowing for more precise timing control.
|
|
344
|
+
- Example: `.myTrigger 1/4 { ... }` to trigger the sound every quarter beat.
|
|
345
|
+
- Added support for beat durations in `arrow_calls` statements, allowing for more precise timing control.
|
|
346
|
+
- Example: `mySynth -> note(C4, { duration: 1/8 })` to play a note for an eighth beat.
|
|
347
|
+
|
|
348
|
+
### 🧠 Core Engine
|
|
349
|
+
|
|
350
|
+
- Implemented `bank` resolver to resolve banks of sounds in the code.
|
|
351
|
+
- Example: `bank 808` will resolve to a bank of sounds named `808` if exists (check bank available command).
|
|
352
|
+
|
|
353
|
+
### 🧰 Commands
|
|
354
|
+
|
|
355
|
+
> Use the `bank 808` statement to access the default sounds and triggers !
|
|
356
|
+
> Then you can use `808.myTrigger` to access a specific trigger in the `808` bank.
|
|
357
|
+
|
|
358
|
+
- Added `bank` command to manage banks of sounds.
|
|
359
|
+
|
|
360
|
+
- `bank list` to list installed banks of sounds.
|
|
361
|
+
- `bank available` to list available banks of sounds for installation.
|
|
362
|
+
- `bank info <bank_name>` to show information about a specific bank.
|
|
363
|
+
- `bank remove <bank_name>` to remove a bank.
|
|
364
|
+
- `bank update` to update all banks of sounds.
|
|
365
|
+
- `bank update <bank_name>` to update a specific bank.
|
|
366
|
+
|
|
367
|
+
- Added `install` command to install banks of sounds.
|
|
368
|
+
- `install bank <bank_name>` to install a specific bank of sounds.
|
|
369
|
+
|
|
370
|
+
### 🧪 Experimental
|
|
371
|
+
|
|
372
|
+
- Introduced lazy loading and namespace-based resolution of installed sound banks.
|
|
373
|
+
|
|
374
|
+
## Version 0.0.1-alpha.10 (2025-07-19)
|
|
375
|
+
|
|
376
|
+
### 📖 Documentation
|
|
377
|
+
|
|
378
|
+
- Updated [new documentation website](https://docs.devalang.com) with new features and examples.
|
|
379
|
+
|
|
380
|
+
### 🧠 Core Engine
|
|
381
|
+
|
|
382
|
+
- Patched `call`, `spawn` to handle correct cursor time.
|
|
383
|
+
- Patched `advance_char` to handle correct indentation and dedentation.
|
|
384
|
+
- Patched `bank` resolver to handle numbers in bank names.
|
|
385
|
+
- Patched `spawn` calls that was not calling a variable.
|
|
386
|
+
|
|
387
|
+
### 🧩 Web Assembly
|
|
388
|
+
|
|
389
|
+
- Added `load_wasm_module` function to the WASM module to load Devalang modules dynamically.
|
|
390
|
+
- Added `render_audio` function to the WASM module to render audio files.
|
|
391
|
+
|
|
7
392
|
## Version 0.0.1-alpha.9 (2025-07-14)
|
|
8
393
|
|
|
9
394
|
### ✨ Syntax
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://devalang.com/images/devalang-logo-min.png" alt="Devalang Logo" width="100" />
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
# Contributing to Devalang
|
|
6
|
+
|
|
7
|
+
Thanks for considering a contribution! This document explains how to set up your environment, build the project, and submit changes.
|
|
8
|
+
|
|
9
|
+
## Code of Conduct
|
|
10
|
+
|
|
11
|
+
By participating, you agree to follow our community standards: be respectful, constructive, and empathetic. If something goes wrong, please open an issue.
|
|
12
|
+
|
|
13
|
+
## Project structure
|
|
14
|
+
|
|
15
|
+
- `rust/`: Rust CLI, core engine, parser, preprocessor, audio runtime
|
|
16
|
+
- `typescript/`: TypeScript utilities and scripts
|
|
17
|
+
- `pkg/`: WASM package output (generated by wasm-pack)
|
|
18
|
+
- `examples/`: Devalang examples
|
|
19
|
+
- `docs/`: Documentation
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- Rust (stable, edition 2024)
|
|
24
|
+
- Node.js 18+
|
|
25
|
+
- wasm-pack (if you work on the WASM package)
|
|
26
|
+
|
|
27
|
+
## Setup
|
|
28
|
+
|
|
29
|
+
1. Install dependencies
|
|
30
|
+
|
|
31
|
+
- Rust toolchain (<https://rustup.rs>)
|
|
32
|
+
- Node.js (<https://nodejs.org>)
|
|
33
|
+
|
|
34
|
+
1. Clone and install
|
|
35
|
+
|
|
36
|
+
- Clone this repository
|
|
37
|
+
- Run `npm install`
|
|
38
|
+
|
|
39
|
+
## Build and run
|
|
40
|
+
|
|
41
|
+
- Build (debug): `cargo build`
|
|
42
|
+
- Build (release): `cargo build --release`
|
|
43
|
+
- TypeScript compile: `npm run script:build`
|
|
44
|
+
- Development helpers:
|
|
45
|
+
- `npm run rust:dev:build` — build AST/audio once
|
|
46
|
+
- `npm run rust:dev:check` — syntax checks with debug logs
|
|
47
|
+
- `npm run rust:dev:play` — play audio in a loop (repeat) with debug
|
|
48
|
+
- WASM builds:
|
|
49
|
+
- Web: `npm run rust:wasm:web`
|
|
50
|
+
- Node: `npm run rust:wasm:node`
|
|
51
|
+
|
|
52
|
+
## Tests and sanity checks
|
|
53
|
+
|
|
54
|
+
- Build and quick smoke test on examples:
|
|
55
|
+
- `cargo build`
|
|
56
|
+
- `npm run rust:dev:play`
|
|
57
|
+
- Prepublish (used by CI/release): `npm run prepublish`
|
|
58
|
+
|
|
59
|
+
## Versioning and releases
|
|
60
|
+
|
|
61
|
+
- Project version lives in multiple places:
|
|
62
|
+
- `Cargo.toml`
|
|
63
|
+
- `package.json`
|
|
64
|
+
- `project-version.json` (includes build counter and last commit)
|
|
65
|
+
- `pkg/package.json` (WASM package)
|
|
66
|
+
- Bump versions to the next pre-release (e.g. 0.0.1-alpha.16), then tag the repository:
|
|
67
|
+
- Bump version: `npm run script:version:bump pre`
|
|
68
|
+
- Commit bump: `git commit -am "chore: bump version to 0.0.1-alpha.X"`
|
|
69
|
+
- Create tag: `git tag v0.0.1-alpha.X`
|
|
70
|
+
- Push: `git push && git push origin v0.0.1-alpha.X`
|
|
71
|
+
- CI publishes release artifacts on tags matching `v*`.
|
|
72
|
+
|
|
73
|
+
## Pull requests
|
|
74
|
+
|
|
75
|
+
- Keep PRs small and focused
|
|
76
|
+
- Describe the motivation and the approach
|
|
77
|
+
- Link related issues
|
|
78
|
+
- Add/update tests (when relevant)
|
|
79
|
+
- Keep the existing style; avoid mass reformatting
|
|
80
|
+
|
|
81
|
+
## Coding guidelines
|
|
82
|
+
|
|
83
|
+
- Rust: follow Clippy suggestions where practical; prefer small, focused modules
|
|
84
|
+
- Keep public APIs stable; document breaking changes in the changelog
|
|
85
|
+
- Add comments where behavior is non-obvious (parser and interpreter paths)
|
|
86
|
+
|
|
87
|
+
## Reporting issues
|
|
88
|
+
|
|
89
|
+
Please include:
|
|
90
|
+
|
|
91
|
+
- Version (`devalang --version`), OS, and repro steps
|
|
92
|
+
- Minimal code sample (`.deva`) if possible
|
|
93
|
+
- Expected vs. actual behavior
|
|
94
|
+
|
|
95
|
+
## Security
|
|
96
|
+
|
|
97
|
+
If you discover a vulnerability, please report it privately (<contact@devaloop.com>). Do not open a public issue until coordinated disclosure.
|
|
98
|
+
|
|
99
|
+
## Thanks
|
|
100
|
+
|
|
101
|
+
We appreciate your time and contributions — whether it’s code, docs, or feedback.
|
package/docs/ROADMAP.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://devalang.com/images/devalang-logo-min.png" alt="Devalang Logo" width="100" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
# Roadmap
|
|
@@ -8,7 +8,7 @@ Devalang is a work in progress. Here’s what we’re planning next:
|
|
|
8
8
|
|
|
9
9
|
## Completed
|
|
10
10
|
|
|
11
|
-
- ✅ **Audio engine**: Integrate the audio engine for sound playback.
|
|
11
|
+
- ✅ **Audio engine**: Integrate the audio engine for sound playback.
|
|
12
12
|
- ✅ **Basic syntax**: Implement the core syntax for Devalang, including data types and basic statements.
|
|
13
13
|
- ✅ **Watch mode**: Add a watch mode to automatically rebuild on file changes.
|
|
14
14
|
- ✅ **Module system**: Add support for importing and exporting variables between files using `@import` and `@export`.
|
|
@@ -21,11 +21,14 @@ Devalang is a work in progress. Here’s what we’re planning next:
|
|
|
21
21
|
- ✅ **Let assignments**: Implement `let` assignments for storing reusable values.
|
|
22
22
|
- ✅ **Sample loading**: Add `@load` assignment to load samples (.mp3, .wav) for use as values.
|
|
23
23
|
- ✅ **WASM support**: Compile Devalang to WebAssembly for use in web applications and other environments.
|
|
24
|
+
- ✅ **VSCode extension**: Create a VSCode extension for syntax highlighting and code completion.
|
|
24
25
|
|
|
25
|
-
##
|
|
26
|
+
## In Progress
|
|
26
27
|
|
|
27
|
-
- ⏳ **
|
|
28
|
-
- ⏳ **VSCode extension**: Create a VSCode extension for syntax highlighting and code completion.
|
|
29
|
-
- ⏳ **Other statements**: Implement `pattern`, `function`, and other control structures.
|
|
30
|
-
- ⏳ **Functions**: Add support for defining and calling functions.
|
|
28
|
+
- ⏳ **Addon generator**: Implement addon generation for creating reusable plugins, banks and presets.
|
|
31
29
|
- ⏳ **Testing**: Expand test coverage for all features.
|
|
30
|
+
- ⏳ **Other statements**: Implement `pattern`, and other control structures.
|
|
31
|
+
|
|
32
|
+
## Planned
|
|
33
|
+
|
|
34
|
+
- ⏳ **Smart modules**: Let Devalang detect and use groups, samples, and variables without needing to import them manually.
|
package/docs/TODO.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://devalang.com/images/devalang-logo-min.png" alt="Devalang Logo" width="100" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
# TODOs list
|
|
@@ -11,21 +11,19 @@ This is a list of tasks and features to be implemented in Devalang. Note that th
|
|
|
11
11
|
- [x] Init project
|
|
12
12
|
- [x] Implement init command
|
|
13
13
|
- [x] Implement template selector
|
|
14
|
-
- [ ] Implement project name validation
|
|
15
14
|
- [x] Template
|
|
16
15
|
- [x] Implement template list
|
|
17
16
|
- [x] Implement template info
|
|
18
17
|
- [x] Checking
|
|
19
18
|
- [x] Implement watch mode
|
|
20
|
-
- [
|
|
21
|
-
- [ ] Implement compilation mode
|
|
19
|
+
- [x] Implement debug mode
|
|
22
20
|
- [x] Building
|
|
23
21
|
- [x] Implement watch mode
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [ ] Implement compression mode
|
|
22
|
+
- [x] Implement debug mode
|
|
23
|
+
- [x] Implement compression mode
|
|
27
24
|
- [x] Play
|
|
28
25
|
- [x] Implement Audio Engine
|
|
26
|
+
- [x] Implement debug mode
|
|
29
27
|
- [x] Implement loop mode
|
|
30
28
|
|
|
31
29
|
## Core components
|
|
@@ -44,7 +42,7 @@ This is a list of tasks and features to be implemented in Devalang. Note that th
|
|
|
44
42
|
- [x] @export
|
|
45
43
|
- [x] @load
|
|
46
44
|
- [ ] @include
|
|
47
|
-
- [
|
|
45
|
+
- [x] function
|
|
48
46
|
- [ ] pattern
|
|
49
47
|
- [x] group
|
|
50
48
|
- [x] call
|
|
@@ -63,8 +61,22 @@ This is a list of tasks and features to be implemented in Devalang. Note that th
|
|
|
63
61
|
- [x] Built-in triggers
|
|
64
62
|
- [x] Custom triggers
|
|
65
63
|
|
|
64
|
+
## Banks
|
|
65
|
+
|
|
66
|
+
- [x] Implement bank management (e.g. install, remove, list)
|
|
67
|
+
- [x] Create example banks
|
|
68
|
+
|
|
69
|
+
## Plugins
|
|
70
|
+
|
|
71
|
+
- [x] Implement plugin system (e.g. install, remove, list)
|
|
72
|
+
- [ ] Create example plugins
|
|
73
|
+
|
|
74
|
+
## Addon generator
|
|
75
|
+
|
|
76
|
+
- [x] Implement addon generator
|
|
77
|
+
- [ ] Create example addons
|
|
78
|
+
|
|
66
79
|
## Other TODOs
|
|
67
80
|
|
|
68
|
-
- [ ] Patch path handling to support relative paths
|
|
69
81
|
- [ ] Comment all core components
|
|
70
82
|
- [ ] Add unit tests for all core components
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
bpm 120
|
|
2
|
+
|
|
3
|
+
group myLead:
|
|
4
|
+
let mySynth = synth sine
|
|
5
|
+
|
|
6
|
+
# This will automate all notes inside mySynth
|
|
7
|
+
# automate mySynth:
|
|
8
|
+
# param volume {
|
|
9
|
+
# 0% = 0.0
|
|
10
|
+
# 100% = 1.0
|
|
11
|
+
# }
|
|
12
|
+
# param pan {
|
|
13
|
+
# 0% = -1.0
|
|
14
|
+
# 100% = 1.0
|
|
15
|
+
# }
|
|
16
|
+
# param pitch {
|
|
17
|
+
# 0% = -12.0
|
|
18
|
+
# 100% = 12.0
|
|
19
|
+
# }
|
|
20
|
+
|
|
21
|
+
# This will automate only one note
|
|
22
|
+
mySynth -> note(C4, {
|
|
23
|
+
duration: 400,
|
|
24
|
+
automate: {
|
|
25
|
+
pitch: {
|
|
26
|
+
0%: -12.0
|
|
27
|
+
100%: 12.0
|
|
28
|
+
},
|
|
29
|
+
pan: {
|
|
30
|
+
0%: -1.0,
|
|
31
|
+
100%: 1.0
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
mySynth -> note(G4, { duration: 400 })
|
|
36
|
+
mySynth -> note(E4, { duration: 600 })
|
|
37
|
+
mySynth -> note(A4, { duration: 400 })
|
|
38
|
+
mySynth -> note(F4, { duration: 800 })
|
|
39
|
+
mySynth -> note(D4, { duration: 400 })
|
|
40
|
+
mySynth -> note(B3, { duration: 600 })
|
|
41
|
+
|
|
42
|
+
call myLead
|