ramekin 0.0.11 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +86 -11
- data/lib/ramekin/cli.rb +4 -1
- data/lib/ramekin/legato.rb +1 -1
- data/lib/ramekin/loop_allocator.rb +1 -1
- data/lib/ramekin/meta.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 999d9354b8f31a49551d78893fe986a38f9ff8ca4e2ecc880970bdde628e8ac0
|
4
|
+
data.tar.gz: f3e29e81592be14e9b888de2ca731cbc285fb43763b80e2320486bbf17694434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4d0bba97851f3d9039710c750fbd1f2cdfb65f84d8279b628901b1e7e23990f5e7319264ba4f3dca4058bc7bc5b99b21078c8d65c0a20da06bb50cb6b740539
|
7
|
+
data.tar.gz: b69597095b27d7a1bfb268729bf44c510bdcf4109a747a677f6a5f9665948a71dcaf4a4c696d976c480373b84762b699cb2aad71749dfc21f64997e231ab9d8d
|
data/README.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
<style>
|
2
|
+
img { float: right; }
|
3
|
+
</style>
|
4
|
+
|
5
|
+

|
6
|
+
|
1
7
|
# Ramekin
|
2
8
|
|
3
9
|
Ramekin is a pre-processor for AddMusicK syntax that is in very early development.
|
@@ -53,6 +59,9 @@ ramekin compile -i filename.rmk [flags]
|
|
53
59
|
--play
|
54
60
|
play the generated SPC file. will automatically
|
55
61
|
set up an SPC player if none is detected.
|
62
|
+
--package my-cool-folder/
|
63
|
+
create a package directory suitable for submission
|
64
|
+
to SMWC, complete with README and packaged samples.
|
56
65
|
--wav filename.wav
|
57
66
|
--wav filename.wav:N
|
58
67
|
(non-windows only)
|
@@ -93,6 +102,7 @@ A list of some ramekin preprocessor features (see `spec/rmk` for some examples!)
|
|
93
102
|
|
94
103
|
* The metadata section (before any channels) is fairly different, I recommend reading the metadata part of the guide below.
|
95
104
|
* Macros ("replacements") are implemented in a much more robust way (*with* tokenization), and can no longer interrupt other tokens. The generated txt will not contain any replacements.
|
105
|
+
* Loops can be given arbitrary names using any combination of letters, numbers, underscores, or dashes. `(my-cool-loop)[ ... ]` is valid syntax. These are case sensitive, and are assigned numbers when compiled to AddmusicK syntax.
|
96
106
|
* Adopted the transposition syntax `_+N`, `_-N`, and `_0` from General MML. Compiles to `$fa$02$XX`.
|
97
107
|
* `#adsr:A,D,S,RR` syntax for ADSR. Also usable on an `#instrument` declaration, with the same syntax. A, D, and R are flipped so that higher numbers are longer times.
|
98
108
|
* `v+X` and `v-X` are volumes relative to the last `vXXX` command. Useful for separating expression from mixing.
|
@@ -119,7 +129,7 @@ b8 #bend >>c16^16 ^^4
|
|
119
129
|
|
120
130
|
* In ramekin, there is no difference between instrument `#adsr` syntax and the one in the pattern data. They are both compiled to their respective syntaxes in the txt.
|
121
131
|
|
122
|
-
* Tempo can alternately be declared with `#bpm:128`. This will be converted to the nearest `tXX` command.
|
132
|
+
* Tempo can alternately be declared with `#bpm:128`. This will be converted to the nearest `tXX` command. If the tempo is over `t60` (`#bpm:146`), the tempo and all note and event lengths will be halved automatically. This is similar to `#halvetempo` except that it is done automatically.
|
123
133
|
* `p0,0` compiles to `$df`.
|
124
134
|
* "Legato tie" represented by `~`, which will use `$f4$01` at appropriate times to cause the note transition to be played legato.
|
125
135
|
* If you ever want to see what exactly Ramekin is generating, just use `--txt` and you can inspect the generated AddmusicK syntax manually!
|
@@ -163,9 +173,6 @@ w150
|
|
163
173
|
|
164
174
|
; sets the bpm. (todo: mention the reasonable range for this)
|
165
175
|
#bpm:130
|
166
|
-
|
167
|
-
; echo settings. this syntax is likely to change in the future, because it sucks
|
168
|
-
#echo $ef$ff$df$df $f1$02$cf$01
|
169
176
|
```
|
170
177
|
|
171
178
|
### Instrument definitions
|
@@ -217,16 +224,20 @@ It is generally advised to stick with the default tuning. The `o5` declaration s
|
|
217
224
|
Echo settings can be set up with the `#echo/...` family of directives:
|
218
225
|
|
219
226
|
```elisp
|
227
|
+
; select which channels have echo enabled
|
220
228
|
#echo/channels:0,1,2,3
|
221
229
|
; or
|
222
230
|
#echo/channels:all
|
223
231
|
; or
|
224
232
|
#echo/channels:none
|
225
233
|
|
226
|
-
#echo/volume:20 ; range from -
|
234
|
+
#echo/volume:20 ; range from -80 to 7f, use negatives for surround
|
227
235
|
#echo/volume:20,30 ; set different values for left vs right echo
|
228
|
-
#echo/feedback:48 ; range from -
|
236
|
+
#echo/feedback:48 ; range from -80 to 7f, use negatives for surround
|
229
237
|
#echo/fir:1 ; 1 or 0 to enable/disable the FIR filter
|
238
|
+
|
239
|
+
; later, you can use this to toggle the echo on a channel.
|
240
|
+
#echo/toggle
|
230
241
|
```
|
231
242
|
|
232
243
|
|
@@ -296,7 +307,7 @@ Personally, I tend to use `l16` across the whole track for consistency.
|
|
296
307
|
|
297
308
|
Just as in Addmusick, there are two kinds of loops:
|
298
309
|
|
299
|
-
* Regular loops, marked with `[ ]`, which can optionally be tagged with a
|
310
|
+
* Regular loops, marked with `[ ]`, which can optionally be tagged with a name, as in `(my-cool-loop)[ ]`. These can not only loop immediately but also be called at arbitrary points.
|
300
311
|
* Super loops, marked with `[[ ]]`, which can only loop immediately, but can nest either inside or outside of regular loops.
|
301
312
|
|
302
313
|
This is best shown with an example:
|
@@ -306,11 +317,75 @@ This is best shown with an example:
|
|
306
317
|
[ defg ]4 ; plays defg four times (regular loop)
|
307
318
|
[[ abcd ]]4 ; plays abcd four times (superloop)
|
308
319
|
* ; calls the last defined regular loop, in this case plays defg
|
309
|
-
|
310
|
-
(
|
311
|
-
(
|
320
|
+
*3 ; same thing but 3 times
|
321
|
+
(blungus)[ fedc ] ; defines a loop named (blungus), also plays fedc immediately
|
322
|
+
(blungus) ; calls the loop (blungus)
|
323
|
+
(blungus)2 ; calls the loop (blungus) twice
|
312
324
|
```
|
313
325
|
|
314
326
|
### Expression and effects
|
315
327
|
|
316
|
-
Volume
|
328
|
+
#### Volume Expression
|
329
|
+
|
330
|
+
Volume can be set with `vXXX`, where `XXX` is a number between 0 and 255. This command also sets the current "reference volume", which can be referenced with commands `v+XX` and `v-XX`, where XX is a number to be added or subtracted to the reference volume. This way, you can add dynamics to your drums or melody lines, while also easily being able to change the overall volume of the section.
|
331
|
+
|
332
|
+
#### Pitch Expression
|
333
|
+
|
334
|
+
Pitch expression can be accomplished in two ways:
|
335
|
+
|
336
|
+
* `pA,B,C`, where A,B, and C are numbers, can be used to set vibrato - a slight pitch wiggle that starts sometime after a note is started. `A` specifies the delay - how long to wait before wiggling the pitch, `B` specifies the speed - how fast to wiggle the pitch, and `C` specifies the amplitude - how much to wiggle the pitch. Turn off vibrato with `p0,0`.
|
337
|
+
* Manual pitch bends are fairly straightforward in ramekin, using `#bend` and `^^`:
|
338
|
+
|
339
|
+
```elisp
|
340
|
+
; b plays for an 8th note, then bends up to c for an eighth note,
|
341
|
+
; then continues on c for a quarter note.
|
342
|
+
b8 #bend >c8 ^^ c4
|
343
|
+
```
|
344
|
+
|
345
|
+
#### Panning Expression
|
346
|
+
|
347
|
+
Panning can be specified with the command `yLX` or `yRX`, where X is a number from 1-10. To reset panning to the center, use `yC`:
|
348
|
+
|
349
|
+
```elisp
|
350
|
+
yR10 ; maximum pan right
|
351
|
+
yR2 ; tasteful pan right
|
352
|
+
yC ; pan center
|
353
|
+
yL2 ; tasteful pan left
|
354
|
+
yl10 ; maximum pan left
|
355
|
+
```
|
356
|
+
|
357
|
+
## Hex
|
358
|
+
|
359
|
+
For those who want to use AddmusicK features that are not currently supported by Ramekin, Ramekin still supports manual entry of hex values with `$XX`. While these can be made slightly easier to use with macros, I would very much appreciate it if you could open an issue here or contact me via SMWC or Discord if you find you are using these heavily.
|
360
|
+
|
361
|
+
## Macros
|
362
|
+
|
363
|
+
To make your life easier, Ramekin implements a very similar macro ("replacement") system as AddmusicK - allowing you to define all manner of custom shortcuts for maximum efficiency and tweakability. (Note that Ramekin's implementation of macros is far more robust than AddmusicK's, and will not interrupt other tokens - e.g. a macro called `F` will not be applied to something like `$EF`).
|
364
|
+
|
365
|
+
A macro looks like this:
|
366
|
+
|
367
|
+
```elisp
|
368
|
+
"MY_COOL_MACRO=@smwacousticbass o3 v150"
|
369
|
+
```
|
370
|
+
|
371
|
+
Now whenever you type `MY_COOL_MACRO` in a channel, it will be as if you typed `@smwacousticbass o3 v150`. This can be used to define all sorts of helpers, including some dynamics helpers:
|
372
|
+
|
373
|
+
```elisp
|
374
|
+
"F=v+0" ; forte
|
375
|
+
"M=v-20" ; mezzo
|
376
|
+
"P=v-40" ; piano
|
377
|
+
```
|
378
|
+
|
379
|
+
Or drum instrument helpers:
|
380
|
+
|
381
|
+
```elisp
|
382
|
+
"K=@smwkick o4"
|
383
|
+
"S=@smwsnare o4"
|
384
|
+
"H=@smwshaker o4"
|
385
|
+
```
|
386
|
+
|
387
|
+
Or anything else you might find helpful.
|
388
|
+
|
389
|
+
# Thank you for trying out Ramekin!
|
390
|
+
|
391
|
+
If you find any bugs, please report them in the issue tracker here on Codeberg. If you have questions, design ideas, or complaints, or just want to chat, please feel free to ask anything in [my discord](https://jneen.ca/discord). Cheers!
|
data/lib/ramekin/cli.rb
CHANGED
@@ -44,6 +44,9 @@ module Ramekin
|
|
44
44
|
'(compiles and installs spct - requires git,cmake,make)'
|
45
45
|
end
|
46
46
|
$stderr.puts " #{default_text}"
|
47
|
+
$stderr.puts " --package my-cool-folder/"
|
48
|
+
$stderr.puts " create a package directory suitable for submission"
|
49
|
+
$stderr.puts " to SMWC, complete with README and packaged samples."
|
47
50
|
unless Ramekin.config.windows?
|
48
51
|
$stderr.puts " --wav filename.wav"
|
49
52
|
$stderr.puts " --wav filename.wav:N"
|
@@ -162,6 +165,7 @@ module Ramekin
|
|
162
165
|
outer_chain = Processor.compose(
|
163
166
|
MacroExpander,
|
164
167
|
ScanForL,
|
168
|
+
LoopAllocator,
|
165
169
|
)
|
166
170
|
|
167
171
|
expanded = outer_chain.call(tokens)
|
@@ -172,7 +176,6 @@ module Ramekin
|
|
172
176
|
NoteAggregator,
|
173
177
|
RestAggregator,
|
174
178
|
Legato,
|
175
|
-
LoopAllocator,
|
176
179
|
Inspector,
|
177
180
|
)
|
178
181
|
|
data/lib/ramekin/legato.rb
CHANGED
data/lib/ramekin/meta.rb
CHANGED
@@ -118,8 +118,6 @@ module Ramekin
|
|
118
118
|
@instruments << Instrument.new(@current_pack, @current_directive, name, path, extensions)
|
119
119
|
when 'default', 'optimized' then @sample_groups << @current
|
120
120
|
|
121
|
-
# TODO: real echo syntax
|
122
|
-
when 'echo' then @echo = expect_args(*([:hex] * 8))
|
123
121
|
when 'echo/channels'
|
124
122
|
channels = @current_directive.values[1]
|
125
123
|
case channels
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ramekin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jneen
|
8
8
|
autorequire:
|
9
9
|
bindir: gembin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: strscan
|