rserota / wad

Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
MIT License
1.89k stars 160 forks source link

Operators for PolyWad #75

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello there again. I wonder if PolyWad also supports substract and multiply methods, other than add.

Thanks in advance.

rserota commented 7 years ago

There is a remove() method, but there are no subtract or multiply methods.

Polywads are basically just containers for other wads and polywads. You can add() and remove() wads from them, but I'm not really sure what 'multiplying' would mean in this context.

ghost commented 7 years ago

I guess add is for additive synthesis, so substract and multiply would be for subtractive and FM.

rserota commented 7 years ago

Ah, I think I see what you're getting at.

You can perform additive synthesis by adding multiple oscillators to a Polywad.

Subtractive synthesis mostly just involves layering filters over an oscillator.

Wad.js does not support FM synthesis.

ghost commented 7 years ago

How do I do? Is it already supported? Is FM planned?

rserota commented 7 years ago

There are some examples in the documentation about using filters. You might have to play around with them a bit to find sounds you like.

I'm not planning to add FM synthesis to Wad.js.

ghost commented 7 years ago

Thanks.

ghost commented 7 years ago

Sorry, I have 2 more questions: 1) Does a filter support envelope? 2) Please, point me to the documentation section for layering filters

Thanks in advance

rserota commented 7 years ago

You can only set the attack for a filter envelope, but often that's all you need. The section of the documentation about the constructor contains information about using filters.

An example of using multiple filters can be found here: https://github.com/rserota/wad#filters

ghost commented 7 years ago

Three last questions: 1) Can I add an envelope for a LFO? 2) Can I automate an envelope using a LFO? 3) Can I automate a filter using a LFO?

If so, how? If not, why?

rserota commented 7 years ago

The only sorts of LFO modulation that Wad.js supports are vibrato and tremolo. Wad.js doesn't support attaching LFOs to arbitrary parameters, though that would be pretty cool.

ghost commented 7 years ago

I really need FM and AM synthesis, and some way to procedurally change filter and oscillator parameters during playback.