aboutsummaryrefslogtreecommitdiff
path: root/options.bqn
blob: 3495f614e055b1d084aa7748c58af11b6d20a266 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FBytes  •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"){𝔽} 𝕩 }