Hi everyone,
I am trying to process two audio nodes and pass on the result (sidechain ducking). There do not seem to be public properties I can access. AI suggests something like that:
const ctx = audio.ctx as AudioContext;
await ctx.audioWorklet.addModule('./assets/+proto/ducking.js');
const babyAudio = audio.audioEngine;
const duckingNode = new AudioWorkletNode(ctx, 'ducking-processor', {
numberOfInputs: 2,
numberOfOutputs: 1
});
const duckingNodeBabylon = await babyAudio.createSoundSourceAsync("duckingNode", duckingNode);
this.sounds.buses.ambient._outNode.disconnect();
this.sounds.buses.music._outNode.disconnect();
this.sounds.buses.ambient._outNode.connect(duckingNode, 0, 0);
this.sounds.buses.music._outNode.connect(duckingNode, 0, 1);
duckingNodeBabylon.outBus = babyAudio.defaultMainBus;
This, however, makes both busses dead quiet
So before I move on, please let me just ask: is it possible at all to use busses like so? Or maybe I use the private props incorrectly?
FYI: await ctx.audioWorklet.addModule('./assets/+proto/ducking.js'); This cannot run in the playground. But the question is rather general so I hope it is alright ![]()
Best wishes
Joe