-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track volume limited to initial value #453
Comments
Thanks for the awesome explanation. I've been doing some more testing. I noticed 2 things: You said that the maximum volume is 300%. But the volume get clamped here to a maximum of 100%. alphaTab/src/synth/AlphaSynth.ts Lines 335 to 338 in 43b9843
From 0 to 1 as seen here: alphaTab/src/synth/SynthConstants.ts Lines 9 to 10 in 43b9843
If I remove the clamp, or change the MaxVolume constant, I hear a difference in volume if I increase the slider. But if I align the slider that is initially 50%, then it still sounds a lot quieter then the first track. If for example I change this line: alphaTab/src/synth/synthesis/Voice.ts Line 217 in 43b9843
To: Then the volumes sound the same if I set the sliders to the same value. Here are some examples: With the MaxVolume constant set to 3, and the gainMono change: If you change the sliders to 100%, they should sound the same (except for the last 2, because the slider is maxed at 300%) The same test with the .gp file: |
Oh, the
Not sure why I reduced this to 1, seems like rather an unintended change. |
Any plans to change that back? And I also think that logarithmic sliders would be a nice addition, at least as an optional setting. |
I simply removed the whole max volume limitation. "Let the people turn up the volume!" 📢 🤘 😁 Building logarithmic sliders is something for the developer integrating alphaTab as it is part of the surrounding UI. The playground and tutorial are more samples how to use alphaTab and not an all-in-one control. |
Your environment
Example with track-volume.gp
Description
While working on #451 I noticed that when I increase the volume slider (of a track that is by default for example 20%) the volume does not increase. But if I go lower that 20% is does decrease. So it seems the volume is limited to the volume in the track information.
Expected Results
Volume increases when I increase the slider
Observed Results
Volume is limited to the initial value.
Steps to Reproduce (for bugs)
But lower than 50% still lowers the volume.
As example you can use the project link, and the -16DB track.
Possible Solution
I am not sure what the intended behaviour is.
alphaTab/playground-template/control.js
Lines 30 to 36 in 72512ce
If I read this than I think that the slider should initially always be set to 100%, and the slider is relative to the track information.
But I think that it would be more logical that the slider value represent the actual volume. So if the initial value from the track information is at 50%, the slider would also be at 50% and can be set higher by the user if desired.
The text was updated successfully, but these errors were encountered: