tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
677 stars 119 forks source link

Add global Audio Volume setting to REPL #1166

Open netux opened 3 months ago

netux commented 3 months ago

Allows for adjusting the global volume/gain of the REPL. Set default global value to 50%.

I also wanted to add a volume slider to the MiniRepl. But because multiple MiniRepl's can be on a page at the same time, while this setting is global, really makes it hard to implement.

yaxu commented 2 months ago

Awesome, I've been finding 50% works well for me as well..

yaxu commented 2 months ago

The recently merged PR #1160 added an 'audio engine target' option. The audio volume slider doesn't have any effect when the 'osc' option is selected. Would it be possible to hide or grey out the audio volume slider when webaudio isn't selected? I don't think it would make too much sense to have the slider change the gain control or something like that, as it would need a different default to match superdirt (probably 1).

netux commented 2 months ago

Sure. How about that? audio engine target set to osc, audio volume slider disabled

netux commented 2 months ago

Got a few suggestions from Discord (namely, the new algorithm to calculate resulting gain), as well as a couple things I found while retesting.