This repository was archived by the owner on Jun 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
Add global Audio Volume setting to REPL #1166
Open
netux
wants to merge
8
commits into
tidalcycles:main
Choose a base branch
from
netux:global-volume-slider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allows for adjusting the global volume/gain of the REPL. Set default global value to 50%. Acts similarily to `gain()`, but without modifying the code, so passerbys who don't know how to use the tool can adjust the volume too). The volume slider uses a logarithmic scale, so it adjusts better to human sound perception.
Member
|
Awesome, I've been finding 50% works well for me as well.. |
Member
|
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). |
Contributor
Author
…correctly when step < 1 If we keep flooring the value, but have a step of, e.g., 0.1, then we are never going to reach the next whole number value. This applies specifically to the Audio Volume slider.
This is a bit overkill, but this way we can somewhat adjust the width of the input so no symbols are cut off (either by the input being too small, or the up/down arrows from the browser). I am not happy about having to use `calc()` with some magic numbers either, but this is what looked nicest to me and had the least effort.
This ensures the audio volume is synced across tabs, since changing the volume in one tab would retrigger the effect in the other tabs. It also means we can remove the explicit call to `setGlobalAudioVolume()` from <SettingsTab>
Contributor
Author
|
Got a few suggestions from Discord (namely, the new algorithm to calculate resulting gain), as well as a couple things I found while retesting. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Allows for adjusting the global volume/gain of the REPL. Set default global value to 50%.
gain(), but without modifying the code.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.