diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-19 10:19:41 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-19 10:19:41 -0500 |
| commit | 932ce855d74848c4721d7ec35dc92a6a3d628a22 (patch) | |
| tree | 782912501a1dae22751740b8590ebf97ea7c0750 /oscillator.bqn | |
| parent | 5643af00cc8922d94b91b53b37ba4a42eaa0d07c (diff) | |
Switch to •math trig functions
Diffstat (limited to 'oscillator.bqn')
| -rw-r--r-- | oscillator.bqn | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/oscillator.bqn b/oscillator.bqn index 3531a76..2713074 100644 --- a/oscillator.bqn +++ b/oscillator.bqn @@ -9,7 +9,6 @@ o ← ≠◶⟨•Import∘"options.bqn", ⊑⟩ •args # Utilities Ce ← 1-˜2⊸× # Center: transform [0,1] to [¯1,1] -SP ← (4⊸×÷5⊸-) 4׬⊸× # Sine π×𝕩 by Bhaskara I Rand ← Ce {o.RandFloats 𝕩} # Basic waveforms @@ -21,8 +20,7 @@ Saw ⇐ Ce∘P # Sawtooth wave ////// Triangle ⇐ Ce∘| {𝕨+0.25}Saw⊢ # Triangle wave ´\/\/\ Square⇐ Ce 0.5<P # Square wave ⊔¯⊔¯⊔¯ Pulse ⇐ Ce <⟜P # Pulse wave with duty cycle 𝕨 -#Sine ⇐ •Math.Sine (2×π) × Id # Sine wave -Sine ⇐ (××SP∘|) {𝕨+0.5}Saw⊢ # Sine wave, more or less +Sine ⇐ •math.Sin (2×π) × Id # Sine wave # Random waveforms White ⇐ Rand ≢ # White noise |
