mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
More mixer FX improvements
This commit is contained in:
1 parent
717685f621
commit
4799eaef17
9 files changed
+70
-58
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { beatSeconds, delayBeatsAt, eqGain, phaserBeatsAt, faderGain, filterSweep, gainToDb, xfadeGains } from './mixerMath'
|
||||
import { beatSeconds, delayBeatsAt, eqGain, sweepBeatsAt, faderGain, filterSweep, gainToDb, xfadeGains } from './mixerMath'
|
||||
|
||||
describe('eqGain', () => {
|
||||
it('is flat at the centre, +6 dB at full right', () => {
|
||||
@@ -87,14 +87,14 @@ describe('filterSweep', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('phaserBeatsAt', () => {
|
||||
describe('sweepBeatsAt', () => {
|
||||
it('starts at the slowest sweep and halves at each quarter of the knob', () => {
|
||||
expect(phaserBeatsAt(4, 0.05)).toBe(4)
|
||||
expect(phaserBeatsAt(4, 0.3)).toBe(2)
|
||||
expect(phaserBeatsAt(4, 0.6)).toBe(1)
|
||||
expect(phaserBeatsAt(4, 0.8)).toBe(0.5)
|
||||
expect(phaserBeatsAt(4, 1)).toBe(0.5)
|
||||
expect(phaserBeatsAt(8, 1)).toBe(1)
|
||||
expect(sweepBeatsAt(4, 0.05)).toBe(4)
|
||||
expect(sweepBeatsAt(4, 0.3)).toBe(2)
|
||||
expect(sweepBeatsAt(4, 0.6)).toBe(1)
|
||||
expect(sweepBeatsAt(4, 0.8)).toBe(0.5)
|
||||
expect(sweepBeatsAt(4, 1)).toBe(0.5)
|
||||
expect(sweepBeatsAt(8, 1)).toBe(1)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user