WebAudio / web-audio-api-v2

The Web Audio API v2.0, developed by the W3C Audio WG
Other
120 stars 11 forks source link

Add frequency of one oscillator to be based on another #93

Closed OscarDev closed 4 years ago

OscarDev commented 4 years ago

Describe the feature Take two oscillators. Say I have one oscillatorA that is ramping linearly, I'd like there to be a way such that you can make the other oscillatorB scale as a function of the initial one.

For example: oscNodeA.frequency.setValueAtTime(1, context.currentTime); oscNodeA.frequency.linearRampToValueAtTime( 3000, context.currentTime + 10 ); oscNodeB.frequency.value = oscNodeA.frequency.value * 2;

Which should operate like if I pass oscNodeA.frequency.value in an object, it will constantly update the frequency as oscNodeA changes frequency. It's useful for shifting frequencies of whole chords made by Oscillators

rtoy commented 4 years ago

This issue tracker is for issues with the spec, not a general support tracker.

You should ask on the WebAudio Slack Channel (register here) or StackOverflow

Perhaps look into the connect method to connect the output of node a to the input to oscNodeB.frequency.