aboutsummaryrefslogtreecommitdiff
path: root/options.bqn
diff options
context:
space:
mode:
Diffstat (limited to 'options.bqn')
-rw-r--r--options.bqn6
1 files changed, 5 insertions, 1 deletions
diff --git a/options.bqn b/options.bqn
index 7e2aa25..2cc055a 100644
--- a/options.bqn
+++ b/options.bqn
@@ -3,8 +3,12 @@ fmt ⇐ 1‿16 # Format: 16-bit integer
freq ⇐ 44100 # Frequency: 44.1kHz
Set ⇐ {fmt‿freq↩𝕩}
+# For generating random waveforms; result is a shape 𝕩 array of uniform
+# random numbers between 0 and 1
+RandFloats ⇐ •RAND∘⥊⟜0
+
# For reading/writing wave files
warn_dither ⇐ 0 # Whether to warn on non-integer signal
warn_clip ⇐ 1 # Whether to warn on out-of-bounds signal
-Dither ⇐ ⌊ (-˝ 0 •RAND∘⥊˜ 2∾≢)⊸+
+Dither ⇐ ⌊ (-˝ ·RandFloats 2∾≢)⊸+
Resample ⇐ "No resampling function specified"!0˙