aboutsummaryrefslogtreecommitdiff
path: root/options.bqn
blob: 07c26d5280e28135971eecda67be9e83f2eac22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fBytes  •BQN"•FBytes"
fmt   116      # Format: 16-bit integer
freq  44100     # Frequency: 44.1kHz
Set  {fmtfreq𝕩}
SetFBytes  {FBytes𝕏}
SetFreq  {freq𝕩}

# For generating random waveforms; result is a shape 𝕩 array of uniform
# random numbers between 0 and 1
RandFloats  (•BQN(•rand˙) "•MakeRand 1").Range0

# 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   (-˝ ·RandFloats 2∾≢)+
Resample  { 𝕨 (resample  •Import "soxresample.bqn"){𝔽} 𝕩 }