Notches for Volume Meter should match up to actual dB, and should use '-' for negative dB.
If I double right-click the Synthesizer volume slider, the value gets reset to 0 internally. However, the notches for the slider seem to be based on an earlier version of the code that is commented out in VolSlider::VolSlider() here
VolSlider::VolSlider(QWidget* parent) : Slider(parent) { setLog(true); // setRange(-60.0f, 10.0f); setRange(-60.0f, 20.0f);
So notice that the old range is -60 to 10, while the newer range is -60 to 20. But unfortunatley the notches are still following the old commented out range. So double-right-clicking will set the internal value to 0, but it currently in 2.0.3 appears as below like it is at "10":
So really those notches are mislabled, since the notch where the slider is at should be the 0 notch.
Also, all the notches below 0 are negative, and so should display with a minus sign '-' in front of each number.
Comments
I also want to note that the notches ideally should not be set hardcoded in the MeterSlider::paintEvent() as they are currently:
https://github.com/musescore/MuseScore/blob/master/awl/mslider.cpp#L240…
But rather I think the notches should be based on on the ranges set by setRange().
Well that's good to do. I'm on it
https://github.com/musescore/MuseScore/pull/3080
This is what the screen shot looks with Animeh's first commit:
I notice 2 small problems:
1. the "20" on top has the top of the number cut off so hard to read. It might be simplest to not bother drawing this top notch.
2. The negative numbers are too close to the red-green colored rectangle....there should at least be a pixel of space between them.
I've added comments on github.
I'd rather see the top (20) and bottom (-60) notch too, maybe moving them down, so they center with the - ?
Also they should all right-align rather then left-align
@Jojo, I was actually thinking the same thing too...if have vertically centered around the - then could fit all notches on the meter. And could have the numbers be right aligned. I didn't say that because I didn't want this issue to be too complicated because it was Animesh's second issue fix.
@Jojo, while I'm talking to you, what do you think about having an explicit '+' sign for positive dB? It is very common in audio to refer to "plus" and "minus" dB since it is a relative term to 0. So have the numbers like:
+20
+10
0 (right justified)
-10
-20
-30
-40
-50
-60
I think it looks more professional, at least.
@Jojo, there is one small problem I have with displaying a notch at the bottom of the slider, and that is that when the user moves slider all the way to bottom, the audio becomes silent. So technically if a notch was added at the bottom, it should be -∞ (negative infinity).
OK, I like the + as we as the -∞
OK, well I could do that easily... although I originally assigned this issue to Animesh (nasehim7) to help learn how to fix issues... But now I don't know if I should just fix it myself or let Animesh do it.
Let Animesh have a try
See comment: https://github.com/musescore/MuseScore/pull/3080#issuecomment-287680956 where I'm now arguing that the meter notches should be modified according to the mockup on the right:
Fixed in branch master, commit 3197abacb9
Fix #181966 Volume Slider Notches according to range
Fixed in branch master, commit d059ac7248
Merge pull request #3080 from nasehim7/vol
Fix #181966 : Notches for Volume Slider should match up exactly to range and use of negative numbers.
Fixed in branch 2.1, commit 0fd6512997
Fix #181966 Volume Slider Notches according to range
Automatically closed -- issue fixed for 2 weeks with no activity.