Add control aliases (#497)
* add and simplify control aliases, fixes #496 * roomsize now alias of room * simplify webaudio param handling --------- Co-authored-by: Felix Roos <flix91@gmail.com>
This commit is contained in:
parent
06cffbc31b
commit
db4d0f26a8
3 changed files with 320 additions and 523 deletions
|
|
@ -208,20 +208,14 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
|
|||
note,
|
||||
gain = 0.8,
|
||||
// low pass
|
||||
lpf,
|
||||
cutoff = lpf,
|
||||
lpq = 1,
|
||||
resonance = lpq,
|
||||
cutoff,
|
||||
resonance = 1,
|
||||
// high pass
|
||||
hpf,
|
||||
hcutoff = hpf,
|
||||
hpq = 1,
|
||||
hresonance = hpq,
|
||||
hcutoff,
|
||||
hresonance = 1,
|
||||
// band pass
|
||||
bpf,
|
||||
bandf = bpf,
|
||||
bpq = 1,
|
||||
bandq = bpq,
|
||||
bandf,
|
||||
bandq = 1,
|
||||
//
|
||||
coarse,
|
||||
crush,
|
||||
|
|
@ -241,7 +235,6 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
|
|||
orbit = 1,
|
||||
room,
|
||||
size = 2,
|
||||
roomsize = size,
|
||||
} = hap.value;
|
||||
const { velocity = 1 } = hap.context;
|
||||
gain *= velocity; // legacy fix for velocity
|
||||
|
|
@ -373,8 +366,8 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
|
|||
}
|
||||
// reverb
|
||||
let reverbSend;
|
||||
if (room > 0 && roomsize > 0) {
|
||||
const reverbNode = getReverb(orbit, roomsize);
|
||||
if (room > 0 && size > 0) {
|
||||
const reverbNode = getReverb(orbit, size);
|
||||
reverbSend = effectSend(post, reverbNode, room);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue