TonicAudio / Tonic

Easy and efficient audio synthesis in C++
The Unlicense
522 stars 63 forks source link

Create += operator for Generators #24

Open morganpackard opened 11 years ago

morganpackard commented 11 years ago

also for ControlGenerators

ndonald2 commented 11 years ago

Can you give an example what this would be used for?

morganpackard commented 11 years ago

for(int i = 0; i < 10; i++){ outputGen += SineWave().freq(randomFloat(100,200)); }

ndonald2 commented 11 years ago

Ahhhh gotcha, yeah that makes a lot of sense. Cool!

On Sun, Feb 24, 2013 at 6:09 PM, Morgan Packard notifications@github.comwrote:

for(int i = 0; i < 10; i++){ outputGen += SineWave().freq(randomFloat(100,200)); }

— Reply to this email directly or view it on GitHubhttps://github.com/morganpackard/Tonic/issues/24#issuecomment-14018472.

Nick Donaldson ndonald2@gmail.com

ndonald2 commented 11 years ago

There should definitely be a version for when the LHS is an adder vs. when it's not.

The Adder on LHS version might be better suited to live in the Adder class itself, rather than a static overload.