@devaloop/devalang 0.0.1-alpha.2 → 0.0.1-alpha.4

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.
Files changed (107) hide show
  1. package/.devalang +1 -1
  2. package/Cargo.toml +46 -46
  3. package/README.md +48 -30
  4. package/docs/CHANGELOG.md +28 -6
  5. package/docs/COMMANDS.md +31 -0
  6. package/docs/CONFIG.md +6 -4
  7. package/docs/ROADMAP.md +5 -1
  8. package/docs/TODO.md +10 -35
  9. package/examples/exported.deva +1 -1
  10. package/examples/index.deva +8 -1
  11. package/examples/samples/hat-808.wav +0 -0
  12. package/out-tsc/bin/devalang.exe +0 -0
  13. package/package.json +41 -42
  14. package/project-version.json +5 -5
  15. package/rust/audio/engine.rs +130 -0
  16. package/rust/audio/interpreter.rs +143 -0
  17. package/rust/audio/loader.rs +46 -0
  18. package/rust/audio/mod.rs +5 -1
  19. package/rust/audio/player.rs +54 -0
  20. package/rust/audio/render.rs +57 -0
  21. package/rust/cli/build.rs +73 -45
  22. package/rust/cli/check.rs +47 -111
  23. package/rust/cli/init.rs +1 -1
  24. package/rust/cli/mod.rs +203 -2
  25. package/rust/cli/play.rs +191 -0
  26. package/rust/{utils/config.rs → config/loader.rs} +3 -2
  27. package/rust/config/mod.rs +16 -0
  28. package/rust/core/builder/mod.rs +69 -27
  29. package/rust/core/debugger/lexer.rs +27 -0
  30. package/rust/core/debugger/mod.rs +12 -49
  31. package/rust/core/debugger/preprocessor.rs +27 -0
  32. package/rust/core/error/mod.rs +60 -0
  33. package/rust/core/lexer/{at.rs → handler/at.rs} +1 -1
  34. package/rust/core/lexer/{brace.rs → handler/brace.rs} +1 -1
  35. package/rust/core/lexer/{colon.rs → handler/colon.rs} +1 -1
  36. package/rust/core/lexer/{comment.rs → handler/comment.rs} +3 -3
  37. package/rust/core/lexer/{dot.rs → handler/dot.rs} +1 -1
  38. package/rust/core/lexer/{equal.rs → handler/equal.rs} +1 -1
  39. package/rust/core/lexer/{identifier.rs → handler/identifier.rs} +1 -1
  40. package/rust/core/lexer/{indent.rs → handler/indent.rs} +10 -5
  41. package/rust/core/lexer/handler/mod.rs +238 -0
  42. package/rust/core/lexer/{newline.rs → handler/newline.rs} +6 -10
  43. package/rust/core/lexer/{number.rs → handler/number.rs} +1 -1
  44. package/rust/core/lexer/handler/string.rs +66 -0
  45. package/rust/core/lexer/mod.rs +25 -14
  46. package/rust/core/lexer/token.rs +55 -0
  47. package/rust/core/mod.rs +5 -2
  48. package/rust/core/parser/handler/at.rs +166 -0
  49. package/rust/core/parser/handler/bank.rs +38 -0
  50. package/rust/core/parser/handler/dot.rs +112 -0
  51. package/rust/core/parser/handler/identifier.rs +134 -0
  52. package/rust/core/parser/handler/loop_.rs +55 -0
  53. package/rust/core/parser/handler/mod.rs +6 -0
  54. package/rust/core/parser/handler/tempo.rs +47 -0
  55. package/rust/core/parser/mod.rs +204 -166
  56. package/rust/core/parser/statement.rs +91 -0
  57. package/rust/core/preprocessor/loader.rs +116 -0
  58. package/rust/core/preprocessor/mod.rs +2 -24
  59. package/rust/core/preprocessor/module.rs +37 -56
  60. package/rust/core/preprocessor/processor.rs +41 -0
  61. package/rust/core/preprocessor/resolver/bank.rs +38 -51
  62. package/rust/core/preprocessor/resolver/loop_.rs +126 -65
  63. package/rust/core/preprocessor/resolver/mod.rs +119 -80
  64. package/rust/core/preprocessor/resolver/tempo.rs +40 -61
  65. package/rust/core/preprocessor/resolver/trigger.rs +93 -155
  66. package/rust/core/shared/duration.rs +8 -0
  67. package/rust/core/shared/mod.rs +2 -0
  68. package/rust/core/shared/value.rs +18 -0
  69. package/rust/core/store/export.rs +28 -0
  70. package/rust/core/store/global.rs +39 -0
  71. package/rust/core/store/import.rs +28 -0
  72. package/rust/core/store/mod.rs +4 -0
  73. package/rust/core/store/variable.rs +28 -0
  74. package/rust/core/utils/mod.rs +2 -0
  75. package/rust/core/utils/validation.rs +35 -0
  76. package/rust/lib.rs +0 -1
  77. package/rust/main.rs +22 -18
  78. package/rust/utils/logger.rs +69 -34
  79. package/rust/utils/mod.rs +3 -5
  80. package/rust/utils/watcher.rs +10 -2
  81. package/templates/minimal/.devalang +1 -1
  82. package/templates/welcome/.devalang +1 -1
  83. package/rust/core/lexer/bracket.rs +0 -41
  84. package/rust/core/lexer/driver.rs +0 -286
  85. package/rust/core/lexer/quote.rs +0 -61
  86. package/rust/core/parser/at.rs +0 -142
  87. package/rust/core/parser/bank.rs +0 -42
  88. package/rust/core/parser/dot.rs +0 -137
  89. package/rust/core/parser/identifer.rs +0 -91
  90. package/rust/core/parser/loop_.rs +0 -62
  91. package/rust/core/parser/tempo.rs +0 -42
  92. package/rust/core/parser/variable.rs +0 -129
  93. package/rust/core/preprocessor/dependencies.rs +0 -54
  94. package/rust/core/preprocessor/resolver/at.rs +0 -24
  95. package/rust/core/types/cli.rs +0 -182
  96. package/rust/core/types/config.rs +0 -15
  97. package/rust/core/types/mod.rs +0 -8
  98. package/rust/core/types/module.rs +0 -41
  99. package/rust/core/types/parser.rs +0 -73
  100. package/rust/core/types/statement.rs +0 -105
  101. package/rust/core/types/store.rs +0 -116
  102. package/rust/core/types/token.rs +0 -83
  103. package/rust/core/types/variable.rs +0 -32
  104. package/rust/runner/executer.rs +0 -44
  105. package/rust/runner/mod.rs +0 -1
  106. /package/rust/{utils → core/utils}/path.rs +0 -0
  107. /package/rust/utils/{loader.rs → spinner.rs} +0 -0
package/.devalang CHANGED
@@ -1,4 +1,4 @@
1
1
  [defaults]
2
2
  entry = "./examples"
3
3
  output = "./output"
4
- watch = true
4
+ watch = false
package/Cargo.toml CHANGED
@@ -1,46 +1,46 @@
1
- [package]
2
- name = "devalang"
3
- version = "0.0.1-alpha.2"
4
- authors = ["Devaloop <contact@devaloop.com>"]
5
- description = "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text."
6
- license = "MIT"
7
- repository = "https://github.com/devaloop-labs/devalang"
8
- keywords = ["music", "dsl", "audio", "cli"]
9
- categories = ["command-line-utilities", "audio", "development-tools"]
10
- readme = "README.md"
11
- homepage = "https://devaloop.com"
12
- documentation = "https://docs.rs/devalang"
13
- edition = "2024"
14
-
15
- [[bin]]
16
- name = "devalang"
17
- path = "rust/main.rs"
18
-
19
- [lib]
20
- path = "rust/lib.rs"
21
- crate-type = ["cdylib"]
22
-
23
- [profile.release]
24
- opt-level = "s"
25
-
26
- [features]
27
- default = ["cli"]
28
- cli = ["crossterm"]
29
-
30
- [dependencies]
31
- clap = { version = "4.5", features = ["derive"] }
32
- serde = { version = "1.0", features = ["derive"] }
33
- serde_json = "1.0"
34
- rodio = "0.17"
35
- hound = "3.4.0"
36
- toml = "0.8"
37
- notify = "6.1"
38
- fs_extra = "1.3"
39
- include_dir = "0.7"
40
- wasm-bindgen = "0.2"
41
- serde-wasm-bindgen = "0.4"
42
- nom_locate = "4.0.0"
43
- chrono = "0.4"
44
- crossterm = { version = "0.27", optional = true }
45
- indicatif = "0.17"
46
- inquire = "0.7.5"
1
+ [package]
2
+ name = "devalang"
3
+ version = "0.0.1-alpha.4"
4
+ authors = ["Devaloop <contact@devaloop.com>"]
5
+ description = "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text."
6
+ license = "MIT"
7
+ repository = "https://github.com/devaloop-labs/devalang"
8
+ keywords = ["music", "dsl", "audio", "cli"]
9
+ categories = ["command-line-utilities", "audio", "development-tools"]
10
+ readme = "README.md"
11
+ homepage = "https://devalang.com"
12
+ documentation = "https://docs.devalang.com/"
13
+ edition = "2024"
14
+
15
+ [[bin]]
16
+ name = "devalang"
17
+ path = "rust/main.rs"
18
+
19
+ [lib]
20
+ path = "rust/lib.rs"
21
+ crate-type = ["cdylib"]
22
+
23
+ [profile.release]
24
+ opt-level = "s"
25
+
26
+ [features]
27
+ default = ["cli"]
28
+ cli = ["crossterm"]
29
+
30
+ [dependencies]
31
+ clap = { version = "4.5", features = ["derive"] }
32
+ serde = { version = "1.0", features = ["derive"] }
33
+ serde_json = "1.0"
34
+ rodio = "0.17"
35
+ hound = "3.4.0"
36
+ toml = "0.8"
37
+ notify = "6.1"
38
+ fs_extra = "1.3"
39
+ include_dir = "0.7"
40
+ wasm-bindgen = "0.2"
41
+ serde-wasm-bindgen = "0.4"
42
+ nom_locate = "4.0.0"
43
+ chrono = "0.4"
44
+ crossterm = { version = "0.27", optional = true }
45
+ indicatif = "0.17"
46
+ inquire = "0.7.5"
package/README.md CHANGED
@@ -11,44 +11,42 @@
11
11
  ![License: MIT](https://img.shields.io/badge/license-MIT-green)
12
12
  ![Platform](https://img.shields.io/badge/platform-Windows-blue)
13
13
 
14
- ![npm](https://img.shields.io/npm/dm/@devaloop/devalang)
14
+ ![npm](https://img.shields.io/npm/dt/@devaloop/devalang)
15
15
 
16
16
  ## 🎼 Devalang, by **Devaloop Labs**
17
17
 
18
18
  🎶 Compose music with code — simple, structured, sonic.
19
19
 
20
20
  Devalang is a tiny domain-specific language (DSL) for music makers, sound designers, and audio hackers.
21
- Compose loops, control samples, and automate parameters — all in clean, readable text.
21
+ Compose loops, control samples, render and play audio — all in clean, readable text.
22
22
 
23
23
  🦊 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.
24
24
 
25
25
  From studio sketches to live sets, Devalang gives you rhythmic control — with the elegance of code.
26
26
 
27
- > 🚧 **v0.0.1-alpha.1 Notice** 🚧
27
+ > 🚧 **v0.0.1-alpha.4 Notice** 🚧
28
28
  >
29
- > Devalang is still in early development. This version does not yet include **sound rendering**.
30
- >
31
- > You can parse code, generate the AST, and validate syntax — all essential building blocks for the upcoming audio engine.
32
- >
33
- > Currently, only `.kick` is included as a built-in trigger.
34
- > Custom instruments can be defined with `@load`, allowing any sound sample to be triggered with the same syntax.
29
+ > **Audio Engine** is now integrated, enabling audio playback and rendering capabilities.
35
30
  >
36
31
  > Currently, Devalang CLI is only available for **Windows**.
37
32
  > Linux and macOS binaries will be added in future releases via cross-platform builds.
38
33
 
34
+ ---
35
+
36
+ ## 📚 Quick Access
37
+
38
+ - [📖 Documentation](./docs/)
39
+ - [💡 Examples](./examples/)
40
+ - [🌐 Project Website](https://devalang.com)
41
+
39
42
  ## 🚀 Features
40
43
 
41
- - 🧩 Module system for importing and exporting variables between files (`@import`, `@export`)
42
- - 📜 Structured AST generation for debugging and future compilation
43
- - 🔢 Basic data types: strings, numbers, booleans, maps, arrays
44
- - 👁️ Watch mode for `build` and `check` commands
45
- - ⏱️ `bpm` assignment for setting tempo
46
- - 🧱 `bank` declaration to define the instrument set
47
- - 🔁 Looping system with fixed repetitions (`loop 4:`)
48
- - 🧪 Instruction calls with parameters (e.g. `.kick auto {reverb:10, decay:20}`) for testing pattern syntax
49
- - 📄 `let` assignments for storing reusable values
50
- - 🔄 `@load` assignment to load a sample (.mp3, .wav) to use it as a value
51
- - 🛠️ CLI tools for syntax checking (`check`), AST output (`build`)
44
+ - 🎵 **Audio Engine**: Integrated audio playback and rendering
45
+ - 🧩 **Module system** for importing and exporting variables between files
46
+ - 📜 **Structured AST** generation for debugging and future compilation
47
+ - 🔢 **Basic data types**: strings, numbers, booleans, maps, arrays
48
+ - 👁️ **Watch mode** for `build`, `check` and `play` commands
49
+ - 📂 **Project templates** for quick setup
52
50
 
53
51
  ## 📆 Installation
54
52
 
@@ -80,15 +78,23 @@ npx @devaloop/devalang <command>
80
78
  > cargo install --path .
81
79
  ```
82
80
 
83
- Usage for development (feel free to change arguments in package.json)
81
+ Development usage (you can customize arguments in package.json)
84
82
 
85
83
  ```bash
86
84
  # For syntax checking test
87
- npm run rust:dev <command>
85
+ npm run rust:dev:check
86
+ # For building test
87
+ npm run rust:dev:build
88
88
  ```
89
89
 
90
90
  ## ❔ Usage
91
91
 
92
+ NOTE: Commands are available via `devalang` or `npx @devaloop/devalang`.
93
+
94
+ 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.
95
+
96
+ 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.
97
+
92
98
  For more examples, see [docs/COMMANDS.md](./docs/COMMANDS.md)
93
99
 
94
100
  ### Initialize a new project
@@ -105,16 +111,28 @@ Or use optional arguments to specify a directory name and a template
105
111
  devalang init --name <project-name> --template <template-name>
106
112
  ```
107
113
 
108
- ### Checking syntax only and output debug files
114
+ ### Checking syntax only
109
115
 
110
116
  ```bash
111
- devalang check --entry <entry-directory> --output <output-directory> --watch
117
+ devalang check --watch
112
118
  ```
113
119
 
114
- ### Building output file(s) (AST generation for the moment)
120
+ ### Building output files
115
121
 
116
122
  ```bash
117
- devalang build --entry <entry-directory> --output <output-directory> --watch
123
+ devalang build --watch
124
+ ```
125
+
126
+ ### Playing audio files (once by file change)
127
+
128
+ ```bash
129
+ devalang play --watch
130
+ ```
131
+
132
+ ### Playing audio files (continuous playback, even without file changes)
133
+
134
+ ```bash
135
+ devalang play --repeat
118
136
  ```
119
137
 
120
138
  ## ⚙️ Configuration
@@ -134,6 +152,8 @@ For more examples, see [docs/SYNTAX.md](./docs/SYNTAX.md)
134
152
 
135
153
  @import { globalBpm, globalBank, kickDuration } from "global.deva"
136
154
 
155
+ @load "./examples/samples/kick-808.wav" as customKick
156
+
137
157
  bpm globalBpm
138
158
  # Will declare the tempo at the globalBpm variable beats per minute
139
159
 
@@ -141,7 +161,7 @@ bank globalBank
141
161
  # Will declare a custom instrument bank using the globalBank variable
142
162
 
143
163
  loop 5:
144
- .kick kickDuration {reverb=50, drive=25}
164
+ .customKick kickDuration {reverb=50, drive=25}
145
165
  # Will play 5 times a kick for the duration of the kickDuration variable with reverb and drive effects
146
166
  ```
147
167
 
@@ -157,16 +177,14 @@ let kickDuration = 500
157
177
 
158
178
  ## 🧯 Known issues
159
179
 
160
- - No support yet for Audio Engine
161
180
  - No support yet for `if`, `else`, `else if` statements
162
181
  - No support yet for `@group`, `@pattern`, `@function` statements
163
- - Nested loops and conditions may not be fully tested
182
+ - No support yet for cross-platform builds (Linux, macOS)
164
183
 
165
184
  ## 🧪 Roadmap Highlights
166
185
 
167
186
  For more info, see [docs/ROADMAP.md](./docs/ROADMAP.md)
168
187
 
169
- - ⏳ Audio engine integration
170
188
  - ⏳ Other statements (e.g `if`, `@group`, ...)
171
189
  - ⏳ Cross-platform support (Linux, macOS)
172
190
  - ⏳ More built-in instruments (e.g. snare, hi-hat, etc.)
package/docs/CHANGELOG.md CHANGED
@@ -4,7 +4,32 @@
4
4
 
5
5
  # Changelog
6
6
 
7
- ## Version 0.0.1-alpha.2 (2024-06-26)
7
+ ## Version 0.0.1-alpha.4 (2025-07-03)
8
+
9
+ ### Audio Engine
10
+
11
+ - Integrated Audio Engine to handle audio playback and rendering.
12
+ - Implemented Audio Player to play audio files.
13
+ - Added support for audio playback with the `play` command.
14
+
15
+ ### Commands
16
+
17
+ - Implemented `play` command to play Devalang files.
18
+ - Added `--watch` option to watch for changes in files and automatically rebuild and play them. (once)
19
+ - Added `--repeat` option to repeat the playback of the audio file. (infinite)
20
+
21
+ Note : You cannot use `--watch` and `--repeat` options together. Use `--repeat` instead.
22
+
23
+
24
+ ## Version 0.0.1-alpha.3 (2025-07-01)
25
+
26
+ - /!\ Major refactor of the project structure and module system /!\
27
+ - Refactored module system to support multiple modules and submodules.
28
+ - Patched all directives to be compatible with the new project structure.
29
+ - Prepared for the upcoming audio engine integration and sound rendering capabilities.
30
+ - Updated documentation to reflect the new project structure and features.
31
+
32
+ ## Version 0.0.1-alpha.2 (2025-06-26)
8
33
 
9
34
  ### Commands
10
35
 
@@ -18,17 +43,14 @@
18
43
 
19
44
  - Implemented Config manager to handle configuration files.
20
45
  - Added support for `.devalang` configuration file as a TOML file.
21
- - Added support for `--no-config` flag to disable configuration file usage.
22
46
  - Implemented File System watcher to monitor file changes.
23
47
  - Implemented Template manager to handle templates and their metadata.
24
- - Refactored Lexer to support new syntax elements and directives.
25
48
 
26
49
  ### Syntax
27
50
 
28
- - Added support for built-in triggers for `.snare`, `.hihat`, `.clap`, `.tom`, `.crash`, `.ride`.
29
- - Added support for custom triggers with `@load` using the syntax `.trigger-name`.
51
+ - Added support for built-in triggers for `.snare`, `.hihat`, `.clap`, `.tom`, `.crash`, `.ride`, `.synth`, `.bass`, and `.pad`.
30
52
 
31
- ## Version 0.0.1-alpha.1 (2024-06-25)
53
+ ## Version 0.0.1-alpha.1 (2025-06-25)
32
54
 
33
55
  ### Syntax
34
56
 
package/docs/COMMANDS.md CHANGED
@@ -52,3 +52,34 @@ Available arguments :
52
52
  - `--entry`: The input folder (default to `./src`)
53
53
  - `--output`: The output folder (default to `./output`)
54
54
  - `--watch`: Whether to watch for changes and rebuild (default to `false`)
55
+
56
+
57
+ ## Playing
58
+
59
+ Playing .deva file(s) without audio playback (once)
60
+
61
+ ```bash
62
+ devalang play --entry ./examples --output ./output
63
+ ```
64
+
65
+ Playing .deva file(s) with audio playback (once by file change)
66
+
67
+ ```bash
68
+ devalang play --entry ./examples --output ./output --watch
69
+ ```
70
+
71
+ Playing .deva file(s) with audio playback (infinite loop)
72
+
73
+ ```bash
74
+ devalang play --entry ./examples --output ./output --repeat
75
+ ```
76
+
77
+ Note : You cannot use `--watch` and `--repeat` options together. Use `--repeat` instead.
78
+
79
+ Available arguments :
80
+
81
+ - `--no-config`: Whether to ignore the configuration file (default to `false`)
82
+ - `--entry`: The input folder (default to `./src`)
83
+ - `--output`: The output folder (default to `./output`)
84
+ - `--watch`: Whether to watch for changes and rebuild + play (default to `false`)
85
+ - `--repeat`: Whether to repeat the playback of the audio file (default to `false`)
package/docs/CONFIG.md CHANGED
@@ -18,11 +18,13 @@ The configuration file is a TOML (Tom's Obvious, Minimal Language) file that con
18
18
  [defaults]
19
19
  entry = "./src"
20
20
  output = "./output"
21
- watch = true
21
+ watch = false
22
+ repeat = true
22
23
  ```
23
24
 
24
25
  ### Available Settings
25
26
 
26
- - `entry`: (String) The entry point for your Devalang project
27
- - `output`: (String) The output directory for generated files
28
- - `watch`: (Boolean) Whether to watch for changes in files and automatically rebuild or check them
27
+ - `entry`: (String) The entry point for your Devalang project (default to `./src`)
28
+ - `output`: (String) The output directory for generated files (default to `./output`)
29
+ - `watch`: (Boolean) Whether to watch for changes in files and automatically rebuild or check them (default to `false`)
30
+ - `repeat`: (Boolean) Whether to repeat the playback of audio files (default to `false`)
package/docs/ROADMAP.md CHANGED
@@ -6,6 +6,9 @@
6
6
 
7
7
  Devalang is a work in progress. Here’s what we’re planning next:
8
8
 
9
+ ### Stable
10
+
11
+ - ✅ **Audio engine**: Integrate the audio engine for sound playback.
9
12
  - ✅ **Basic syntax**: Implement the core syntax for Devalang, including data types and basic statements.
10
13
  - ✅ **Watch mode**: Add a watch mode to automatically rebuild on file changes.
11
14
  - ✅ **Module system**: Add support for importing and exporting variables between files using `@import` and `@export`.
@@ -18,10 +21,11 @@ Devalang is a work in progress. Here’s what we’re planning next:
18
21
  - ✅ **Let assignments**: Implement `let` assignments for storing reusable values.
19
22
  - ✅ **Sample loading**: Add `@load` assignment to load samples (.mp3, .wav) for use as values.
20
23
 
24
+ ### Upcoming
25
+
21
26
  - ⏳ **VSCode extension**: Create a VSCode extension for syntax highlighting and code completion.
22
27
  - ⏳ **WASM support**: Compile Devalang to WebAssembly for use in web applications.
23
28
  - ⏳ **Other statements**: Implement `if`, `else`, and other control structures.
24
29
  - ⏳ **Pattern and group statements**: Add support for `@pattern` and `@group` to organize code.
25
30
  - ⏳ **Functions**: Add support for defining and calling functions.
26
- - ⏳ **Audio engine**: Integrate the audio engine for sound playback.
27
31
  - ⏳ **Testing**: Expand test coverage for all features.
package/docs/TODO.md CHANGED
@@ -24,14 +24,13 @@ This is a list of tasks and features to be implemented in Devalang. Note that th
24
24
  - [ ] Implement debug mode
25
25
  - [ ] Implement compilation mode
26
26
  - [ ] Implement compression mode
27
- - [ ] Play
28
- - [ ] Implement Audio Engine
29
- - [ ] Implement loop mode
27
+ - [x] Play
28
+ - [x] Implement Audio Engine
29
+ - [x] Implement loop mode
30
30
 
31
31
  ## Core components
32
32
 
33
- - [ ] Audio Engine
34
- - [x] Configuration
33
+ - [x] Audio Engine
35
34
  - [x] Lexer
36
35
  - [x] Parser
37
36
  - [x] Preprocessor
@@ -58,37 +57,13 @@ This is a list of tasks and features to be implemented in Devalang. Note that th
58
57
 
59
58
  ## Triggers
60
59
 
61
- ### One-shot triggers
62
-
63
- - [x] .kick
64
- - [x] .snare
65
- - [x] .hihat
66
- - [x] .tom
67
- - [x] .clap
68
- - [x] .crash
69
- - [x] .ride
70
-
71
- ### Instrument triggers
72
-
73
- - [ ] .guitar
74
- - [ ] .piano
75
- - [ ] .flute
76
- - [ ] .violin
77
-
78
- ### Synth & effects triggers
79
-
80
- - [ ] .lead
81
- - [ ] .bass
82
- - [ ] .pad
83
- - [ ] .arp
84
- - [ ] .fx
85
- - [ ] .vocal
60
+ - [x] Built-in triggers
61
+ - [x] Custom triggers
86
62
 
87
63
  ## Other TODOs
88
64
 
89
- - [ ] Possibility to overload built-in triggers
90
- - [ ] Implement a more robust error handling system
91
- - [ ] Replace eprintln & println with `log_message` function
92
- - [ ] Implement a more comprehensive logging system
65
+ - [x] Implement a more robust error handling system
66
+ - [x] Replace eprintln & println with `log_message` function
67
+ - [x] Implement a more comprehensive logging system
93
68
  - [ ] Add unit tests for all core components
94
- - [ ] Comment all core components
69
+ - [ ] Comment all core components
@@ -1,7 +1,7 @@
1
1
  let duration = auto
2
2
  let default_bank = 808
3
3
  let params = {decay:10, delay:30}
4
- let loopCount = 15
4
+ let loopCount = 5
5
5
  let tempo = 155
6
6
 
7
7
  @export { duration, default_bank, params, loopCount, tempo }
@@ -1,9 +1,16 @@
1
1
  @import { duration, default_bank, params, loopCount, tempo } from "./examples/exported.deva"
2
+
2
3
  @load "./examples/samples/kick-808.wav" as sample
4
+ @load "./examples/samples/hat-808.wav" as hat
3
5
 
4
6
  bpm tempo
5
7
 
6
8
  bank default_bank
7
9
 
8
10
  loop loopCount:
9
- .sample duration params
11
+ .sample duration params
12
+
13
+ # Uncomment the next line (.hat) while executing "play" command
14
+ # with `--repeat` option to see magic happen !
15
+
16
+ # .hat duration params
Binary file
Binary file
package/package.json CHANGED
@@ -1,43 +1,42 @@
1
- {
2
- "name": "@devaloop/devalang",
3
- "private": false,
4
- "version": "0.0.1-alpha.2",
5
- "description": "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text.",
6
- "main": "out-tsc/index.js",
7
- "bin": {
8
- "devalang": "./out-tsc/bin/index.js"
9
- },
10
- "scripts": {
11
- "prepublish": "cargo build --release && npm run script:postbuild",
12
- "rust:dev": "cargo run",
13
- "rust:dev:build": "cargo run build --entry examples --output output",
14
- "rust:dev:check": "cargo run check --entry examples --output output",
15
- "script:postbuild": "tsc && node out-tsc/scripts/postbuild.js",
16
- "script:version:bump": "tsc && node out-tsc/scripts/version/index.js"
17
- },
18
- "homepage": "https://devaloop.com",
19
- "keywords": [
20
- "devalang",
21
- "music",
22
- "sound",
23
- "domain-specific language",
24
- "dsl",
25
- "programming language",
26
- "sound design",
27
- "music hacking",
28
- "audio",
29
- "synthesis",
30
- "scripting",
31
- "sound synthesis",
32
- "music programming"
33
- ],
34
- "author": "Devaloop",
35
- "license": "MIT",
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/devaloop-labs/devalang.git"
39
- },
40
- "dependencies": {
41
- "@types/node": "^24.0.3"
42
- }
1
+ {
2
+ "name": "@devaloop/devalang",
3
+ "private": false,
4
+ "version": "0.0.1-alpha.4",
5
+ "description": "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text.",
6
+ "main": "out-tsc/index.js",
7
+ "bin": {
8
+ "devalang": "./out-tsc/bin/index.js"
9
+ },
10
+ "scripts": {
11
+ "prepublish": "cargo build --release && npm run script:postbuild",
12
+ "rust:dev:build": "cargo run build --entry examples --output output",
13
+ "rust:dev:check": "cargo run check --entry examples --output output",
14
+ "script:postbuild": "tsc && node out-tsc/scripts/postbuild.js",
15
+ "script:version:bump": "tsc && node out-tsc/scripts/version/index.js"
16
+ },
17
+ "homepage": "https://devalang.com",
18
+ "keywords": [
19
+ "devalang",
20
+ "music",
21
+ "sound",
22
+ "domain-specific language",
23
+ "dsl",
24
+ "programming language",
25
+ "sound design",
26
+ "music hacking",
27
+ "audio",
28
+ "synthesis",
29
+ "scripting",
30
+ "sound synthesis",
31
+ "music programming"
32
+ ],
33
+ "author": "Devaloop",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/devaloop-labs/devalang.git"
38
+ },
39
+ "dependencies": {
40
+ "@types/node": "^24.0.3"
41
+ }
43
42
  }
@@ -1,6 +1,6 @@
1
- {
2
- "version": "0.0.1-alpha.2",
3
- "channel": "alpha",
4
- "lastCommit": "6f92a4421db96f45c6accd6607e09876c0735531",
5
- "build": 2
1
+ {
2
+ "version": "0.0.1-alpha.4",
3
+ "channel": "alpha",
4
+ "lastCommit": "ca5336b3cd3f2189971e9e99a93a66042faff007",
5
+ "build": 3
6
6
  }