Closed Ashton-Morris closed 4 years ago
@samreid I can't add assignees so hopefully you are notified of this.
Since this will be implemented in the "wave interference" repo, I'll move the issue there for tracking.
I added the proposed sounds. @ariel-phet or @Ashton-Morris can you please review?
I think the sound needs to be volume balanced, but it certainly seems much less "geiger counter" to me. I think the sim as a whole needs to be reviewed once volume balanced, but to me this issue solved the main problem I was hearing.
(most important!) The sounds I hear when I move the slider are more “click"-y (and less "bump"-y) than I remember form the last design meeting that @jbphet or @Ashton-Morris demoed. @samreid and @Ashton-Morris - can you confirm that this is latest sound for the sliders - Here's the sound I hear (note - slight warping at the end of each click sound is an artifact of my recording this as it is played from my computer speakers). Let's make sure we're all considering the correct bump-y sound (and not the default click-y sound in common code) before proceeding.
Timing - Also I wish the timing of the clicks sound felt more consistent with the visual tick marks across the slider range. It lines up nicely when moving slowly, but feels slightly off at times when moving more quickly. Is there any way to associate the click sound with the literal visual location of the slider/grid marks? I feel like we’re discussed this before, but I think the more associated the click sound is to exactly the grid marks on the slider, the more “intuitive” the sound will feel and less attention-grabbing. @jbphet - thoughts on this?
End sounds - one thing that might help us out in tweaking the sounds so that they feel more like they are associated with the tick marks is to have a slightly different sound for the extreme ends of the slider (when you've "hit the edge" so to speak). @Ashton-Morris - once we are clear on which version of the sound is the right one to move forward with (the bump-y one!), please make a variant that is a subtle indicator max/min has been reached. I imagine max/min can be the same sound, but if you think it's better to have these be slightly different, please go ahead.
Volume - I think if the volume is decreased further in the final sound balancing (these should be barely noticeable at medium volume), it would help. Let's not deal with that in this issue, though. It will depend if there is a mix-up on the sound timbre, a "bump"-y sound may need to be slightly louder than a more "click"-y sound to be perceived as the same volume.
Another issue about the slider "clicking" sounds: on the water drop screen, the slider clicks sound kind of like water drops: may be a little confusing.
The sounds I hear when I move the slider are more “click"-y (and less "bump"-y) than I remember form the last design meeting
I just listened to the current master version, and I'm pretty sure it is the same sound. It sounds less "clicky" in headphones to me, more so over my computer speakers.
[T]he timing of the clicks...feels slightly off at times when moving more quickly...@jbphet - thoughts on this?
I just tested this, again using the current master version, on Chrome and Firefox on my Win 10 machine, and I don't find the timing to be noticeably off when moving fast. This might be a browser-specific thing. @emily-phet - can you let us know what browser and OS you're using when you see this, and can you test whether it occurs on other browsers on that same machine.
My thoughts are that I would have to duplicate this, make some measurements, and see what changes could be made to improve it. Different browsers may be handling the situation where there are a lot of sounds to play at nearly the same time differently, and we may be able to make some adjustments to improve the performance in such situations.
(Updating my previous comment after discussion with @jbphet)
- (most important!) The sounds I hear when I move the slider are more “click"-y (and less "bump"-y) than I remember form the last design meeting that @jbphet or @Ashton-Morris demoed. @samreid and @Ashton-Morris - can you confirm that this is latest sound for the sliders - Here's the sound I hear (note - slight warping at the end of each click sound is an artifact of my recording this as it is played from my computer speakers). Let's make sure we're all considering the correct bump-y sound (and not the default click-y sound in common code) before proceeding.
With @jbphet it's clear I'm hearing the correct sound. We concluded that my impression of it during last week's meeting was influenced by hearing the original click sound...comparing the new sound to the old, the newer one definitely sounds 'bump'-y, but I think we can still improve upon it. @Ashton-Morris can you please propose one or a few variations of a 'bump'-y sound, rather than a 'click' sound. We can discuss further in tomorrow's meeting if that would be helpful. Whatever we go with, we'll also want sounds specifically for the max/min points (from 3) below).
- Timing - Also I wish the timing of the clicks sound felt more consistent with the visual tick marks across the slider range. It lines up nicely when moving slowly, but feels slightly off at times when moving more quickly. Is there any way to associate the click sound with the literal visual location of the slider/grid marks? I feel like we’re discussed this before, but I think the more associated the click sound is to exactly the grid marks on the slider, the more “intuitive” the sound will feel and less attention-grabbing. @jbphet - thoughts on this?
@jbphet had a number of suggestions as to why the timing might feel off, and why the sound may be perceived as amplified or more noticeable when the slider is moving quickly (I believe he'll list these in a later comment).
- End sounds - one thing that might help us out in tweaking the sounds so that they feel more like they are associated with the tick marks is to have a slightly different sound for the extreme ends of the slider (when you've "hit the edge" so to speak). @Ashton-Morris - once we are clear on which version of the sound is the right one to move forward with (the bump-y one!), please make a variant that is a subtle indicator max/min has been reached. I imagine max/min can be the same sound, but if you think it's better to have these be slightly different, please go ahead.
See 1) above.
- Volume - I think if the volume is decreased further in the final sound balancing (these should be barely noticeable at medium volume), it would help. Let's not deal with that in this issue, though. It will depend if there is a mix-up on the sound timbre, a "bump"-y sound may need to be slightly louder than a more "click"-y sound to be perceived as the same volume.
No update on 4) to add.
Unassigning @samreid for now, as I think there's some things here for me, @Ashton-Morris and @jbphet to sort out for the moment.
In the previous comment, @emily-phet mentioned that she and I discussed why the slider sounds a bit odd and artificial. I think a possible cause of this is that the sounds are initiated only at very specific times based on the 60 frames/sec rate at which the browser runs. As a result of this, sound can end up with the same phase relationship all the time, which can add together and boost the volume. In a situation where a lot of sounds are being initiated at once, such as when the slider is moving very quickly, it may even be that the sound clip is being initiated more than once in a given animation frame. There are several things that I can think of that might serve to address this.
Once @Ashton-Morris has created the new sounds and they have been integrated, @samreid and I can collaborate and try some of these out and find which ones are the most effective at addressing the issue.
I have experimented with some more slider clicks for everyone to listen to. I have individual files but I also recorded a few examples of how it would sound dragging it from left to right. Hear below.
slider-clicks-idea-a-example.mp3 slider-clicks-idea-b-example.mp3 slider-clicks-idea-c-example slider-clicks-idea-d-example.mp3 slider-clicks-idea-e-example.mp3 slider-clicks-idea-f-example.mp3
I listened to each of the sounds that are linked in the previous comment and below is how I would rank them, with notes on each. I listened on headphones and did not evaluate on any speakers. These are my opinions, your mileage may vary.
Adding @samreid to the list of assignees. If everyone can comment on which of the latest sounds they like best, I'll add the top three or four as options for this week's review process.
For me, a,b,f,d seem too percussive. "c" seems like a balance between not too percussive to be annoying, but still succinct enough that it cues dragging across each tick. I agree with @jbphet that "e" is too toneful and game-ish.
In a radio button group, there is a pitch shift between each successive option. That seems like it would be a good audio cue here as well for what is happening. Not just telling you "you took a step up or down" but telling you "you took a step up or down and here's where you are now." Can we try mocking up a pitch shift on each successive tick mark? Or will a quick drag be too cacophonous?
Also, have we tried a less "full" sound, like playing cards in bicycle spokes? Maybe like the and last couple of seconds of https://www.shutterstock.com/video/clip-2065526-playing-card-spokes-bicycle (in the middle 3 seconds to 25 seconds, it is too rapid to be useful.)
I feel like playing cards would end up sounding too much like a geiger counter like the other clicks.
I'm going for more of a bump as @emily-phet suggested but a lot of these issues might be solved with the implementation and amount the sound is allowed to play when sliding.
Here are my thoughts:
C - favorite, particularly for sliders with visible tick marks. May want to consider different variant of this for sliders without tick marks, or with few tick marks. E - kind of like C, but has a bit of an undesirable “space-y’ or ’sci-fi’ feel D - still a little too shooting game-y to me, but perhaps could be softened a bit or something to emphasis more of a ‘bump’ feel than a ‘shooting’ feel. F - too physical sounding, but could work for a different purpose in a different sim. I like how it sounds like a cartoon-ized mechanical sound. A - too shooting game-y B - too chirpy
Seems like there's a lot of interest in C. If there's any way we can get a working version of that in a slider before today's afternoon meeting (in Waves or some other one if that's easier) would be awesome!
Regarding the pitch change to cue increase/decrease of slider that @samreid mentioned, I think @samreid is spot on in general - but not for this slider sound. The specific slider sound we're designing in this issue is explicitly intended to not be one of the top sounds the learner is being scaffolded to attend to. It's intended to serve as secondary feedback, and needs to be relatively neutral. If folks want to discuss this further, let me know, and I can describe specific examples that have led us to this general conclusion, based on 1) various studies that we've completed on how many and what types of sound mappings work well together, as well as 2) wanting to create standardized UI sounds (such as this slider sound) that can be used across many sims without re-design.
I committed the "C" series sounds for right-dragging and and reduced it by one semitone for left-dragging. It can be reviewed on phettest for today's meeting.
I added a boundary sound based on @Ashton-Morris's idea-c example clip, which can also be reviewed at the meeting.
We reviewed the latest in today's meetings, and we agreed that "idea-c" sounds good in context. Next steps:
I'll implement these before the next meeting.
I've implemented all three items from the list above.
The third item involved testing whether a sound was being played in the same animation frame. I added some debug code to test whether this was happening, and found that while the playing of the clicks was often less than a frame time (1/60=0.016667 seconds) apart, they weren't occurring on frame time boundaries. I think this means that Scenery input events are no longer batched, and I have a question out about this. I was seeing cases where the play requests were as little as 2 ms apart, and on fast slider moves differences of 4 to 8 ms were fairly common. I went ahead and added code to prevent playing sounds closer than 1/60 seconds apart, but if the events aren't batched, this value is rather arbitrary and can be anything we want based on what sounds best (if we end up wanting it at all).
I personally don't notice a big difference when this is in place, but I'm happy to leave it in if others find it to be an improvement.
@jbphet How do I hear the latest? I listened to what I thought was the latest on phettest, and it sounded like the squishy button and slider sound from last week, not the new ones...
@jbphet How do I hear the latest? I listened to what I thought was the latest on phettest, and it sounded like the squishy button and slider sound from last week, not the new ones...
I just checked, and the updated sounds are playing on the master version for me. The button sound is one of the sounds that we had in place last week, but it wasn't the default, and the differences for the click sound are somewhat subtle, since I made it so that the move-right and move-left sounds are the same, added new end sounds, and prevented overlap playing. Or maybe phettest isn't updating correctly.
@emily-phet - if you're available during today's sound design meeting, let's have a listen then. If not, we can set up a time to meet on Zoom.
@emily-phet I wasn't always hearing new sounds in phettest either. It might be a caching issue that I had too.
In Chrome there are three dots on the upper right. Click that then - more tools then - developer tools. There is a way do disable caching while the developer tools are open. I can't remember though @jbphet might know.
But doing that has helped me hear the latest versions.
We reviewed the latest implementation in today's sound design review meeting, and @emily-phet and @Ashton-Morris agree that this sound behavior is good.
Assigning to @samreid to follow up on handling for keyboard-based interaction. The current code looks like it will only handle tick mark crossings, and it needs to be able to generate a sound on each value change when triggered by a keyboard action (this may be there and I was just missing it, I'm not certain).
@jessegreenberg or @zepumph we would like to play a sound effect when the slider value is changed by a keyboard press. There is already a different sound effect when the slider thumb is dragged across a tick mark. How can we listen for the keyboard press?
I pushed a proposed a change for this in https://github.com/phetsims/sun/issues/589. @samreid if you pull sun, you should be able to have sounds from alternative input by adding logic under an event.isFromPDOM()
check in your drag
function. It would look something like
drag: event => {
const value = property.value;
if ( event.isFromPDOM() ) {
// generate a sound once per event from alternative input
...
}
else {
// handle the sound as desired for mouse/touch style input
for ( let i = 0; i < ticks.length; i++ ) {
const tick = ticks[ i ];
if ( lastValue !== value && ( value === property.range.min || value === property.range.max ) ) {
sliderBoundaryClickSoundClip.play();
break;
}
else if ( lastValue < tick.value && value >= tick.value ) {
sliderIncreaseClickSoundClip.play();
break;
}
else if ( lastValue > tick.value && value <= tick.value ) {
sliderDecreaseClickSoundClip.play();
break;
}
}
}
lastValue = value;
}
Happy to talk more if its helpful!
Thanks @jessegreenberg. In order to play a different sound when at the extrema, I needed to wait until I have the final property value, and also to know the direction of the change. Can you please review the change and help me make it more robust? What if other keyboard events cause the slider thumb to move?
I made more commits that eliminate the keycode problem. But the two remaining problems are:
drag
will be called before the property value changes? The proposed implementation relies on that and would break if that changes in the future.Are we guaranteed that drag will be called before the property value changes?
This seems like a very deliberate decision in Slider.js, I assume this not going to change.
I wonder if we need to make sure that using the keyboard puts it at 1.00000 instead of 0.9999999 in the first place, so there's no discrepancy there. How could this be done?
Could we use constrainValue
for this, something like
constrainValue: value => Utils.toFixedNumber( value, 5 )
I don't see a better way currently within the drag
callback to get what the value is going to be and get around the timeout. We could potentially add a new callback option to Slider.js and AccessibleValueHandler.js to support this. But maybe it would be acceptable to have sound from alternative input happen on endDrag
?
endDrag: event => {
if ( event.isFromPDOM() ) {
if ( property.value === property.range.min || property.value === property.range.max ) {
sliderBoundaryClickSoundClip.play();
}
else {
sliderClickSoundClip.play();
}
}
}
The downside of this is that you wouldn't get any sound while pressing and holding an arrow key, only on release.
Are we guaranteed that drag will be called before the property value changes?
This seems like a very deliberate decision in Slider.js, I assume this not going to change.
It looks like it was added as part of https://github.com/phetsims/sun/issues/561
At first glance it seems quite buggy to have the callback before the Property changes. I commented over in https://github.com/phetsims/sun/issues/561#issuecomment-614929991 about that.
Everything else here is looking very nice!
Blocked until https://github.com/phetsims/sun/issues/561 is improved.
@jbphet I'd like to discuss today any tweaking we can do to decrease the total number of slider sounds heard when moving the slider very fast.
We made a mod in today's sound design meeting, @emily-phet will try it out and report back.
@jbphet - Checked latest in phettest - changes from today sound good to me! Let's go with that. Next step would be a final sound volume mix check-off from @Ashton-Morris, and then send out to full team for final input (ideally on sound volumes only, limiting other feedback to only if absolute deal breaker for moving forward for publication).
I reviewed the levels today and determined that the were actually spot on! No changes were needed from my perspective.
@emily-phet You can get this to the full team for final input.
Off to final feedback from the team. Closing this issue, as feedback will be requested on the sim as whole, not just the slider sounds.
Reopening for the remaining questions about alternative input. https://github.com/phetsims/sun/issues/561 is done so this is no longer on hold and we should be able to remove the timeout.
The other question from https://github.com/phetsims/wave-interference/issues/484#issuecomment-614266199 was
I wonder if we need to make sure that using the keyboard puts it at 1.00000 instead of 0.9999999 in the first place, so there's no discrepancy there. How could this be done?
Can constrainValue
be used for this?
I used constrainValue and the new slider interface, works great! Thanks @jessegreenberg, closing.
I spoke with Ariel and we liked the subtlety of the step forward button.
So here is a shortened version of that to try
click-right click-left