From 4ba3085412b0e945082c950cc25835630876b74c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 6 Dec 2020 11:09:01 -0500 Subject: Move options to a separate file so they can be shared across scripts --- wav.bqn | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'wav.bqn') diff --git a/wav.bqn b/wav.bqn index 623959a..24e1a4a 100644 --- a/wav.bqn +++ b/wav.bqn @@ -3,16 +3,8 @@ ⟨ReadWav, WriteWav, ReadWav_set, ReadWav_coerce⟩⇐ -o ← options ⇐ { - FBytes ⇐ •FBytes - fmt ⇐ 1‿16 # Format: 16-bit integer - freq ⇐ 44100 # Frequency: 44.1kHz - warn_dither ⇐ 0 # Whether to warn on non-integer signal - warn_clip ⇐ 1 # Whether to warn on out-of-bounds signal - Dither ⇐ ⌊ (0.5 + 0 -˝∘(•RAND∘⥊)˜ (2∾≢))⊸+ - Resample ⇐ "No resampling function specified"!0˙ - Set ⇐ {fmt‿freq↩𝕩} -} +"wav.bqn takes a single option namespace, or no arguments" ! 1≥≠•args +o ← ≠◶⟨•Import∘"options.bqn", ⊑⟩ •args # The output from ReadWav, or input to WriteWav, is either: # - A list of: -- cgit v1.2.3