-
-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
featureNew featureNew feature
Description
Feature Request
I would like to request the ability to modulate the gain parameter of the GainNode within the react-native-audio-api, specifically by connecting an OscillatorNode directly to the gain parameter.
In the Web Audio API, it's possible to connect an OscillatorNode directly to an AudioParam, such as the gain parameter of a GainNode. This allows for powerful and efficient modulation of audio parameters, creating effects like tremolo, vibrato, and complex envelope followers.
const context = new AudioContext();
const gainNode = context.createGain();
gainNode.connect(context.destination);
const oscillator = context.createOscillator();
oscillator.type = "square";
oscillator.frequency.setValueAtTime(440, context.currentTime);
oscillator.connect(gainNode);
oscillator.start();
const lfo = context.createOscillator();
lfo.frequency.setValueAtTime(1, context.currentTime);
lfo.connect(gainNode.gain);
lfo.start(0);
Currently, when I try to connect the lfo to the gainNode's gain parameter, react-native-audio-api throws an error because connect method does not expect an AudioParam.
Metadata
Metadata
Assignees
Labels
featureNew featureNew feature