phetsims / ratio-and-proportion

"Ratio and Proportion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

Implement sound design #9

Closed jbphet closed 4 years ago

jbphet commented 4 years ago

@Ashton-Morris, @emily-phet, and I (@jbphet) did some brainstorming on the sound design for the proportion sim and thought we should write some of these things down.

zepumph commented 4 years ago

Decisions from today's meeting:

zepumph commented 4 years ago

@jbphet mentioned that you can move through and past a ratio success sound without hearing the success. Perhaps it would be nice to always have a success sound when there has been a success, even though the ratio success didn't linger. Perhaps the important thing is just to make sure that "some sound" plays in this case. We want to discuss this further in a future design meeting.

I reworked the logic for the staccato success/in proportion sound, and I think this is much better. Before the algorithm only tried to play the success sound based on the same loop delay as for the normal marimba approaching sound. This meant that the success sound was not eligible for playing every step. Which it should be, so I pulled the success sound out of the logic that sees if enough time has passed to warrant a new approach sound. If that doesn't make sense, then try it out and see if it is better. I'm going to check this box off, but please uncheck if there is more to discuss.

Ashton-Morris commented 4 years ago

Here are some Marimba variations to try out

zepumph commented 4 years ago

From today's sound design meeting:

zepumph commented 4 years ago

Added the variations on marimba above. Note I also made the staccato sound quieter (along with the success sound).

emily-phet commented 4 years ago

@zepumph I'd love to hear the staccato sounds with the pitch change, but at the moment (without that in place), i like the last option (pluck against drywall) the best. It has just enough of a natural feel to not sound like it could be an error indicator (which the ploink and thoink have a little of).

Also a thought related to pitch change - maybe we're trying to hard to get everything to align to "fitness". It might be worth trying a simpler pitch change that is based just on the y-location, so same pitch change as you go up/down regardless of fitness.

Ashton-Morris commented 4 years ago

Here are some non pitched sounds to try. They are more like button or UI sounds, some of which are from our previous UI tests.

non-melodic-indicator-1.wav non-melodic-indicator-1-002.mp3 non-melodic-indicator-1-002.wav non-melodic-indicator-1-001.mp3 non-melodic-indicator-1-001.wav non-melodic-indicator-1.mp3

zepumph commented 4 years ago

From sound design meeting today:

zepumph commented 4 years ago

Alright, I think that I got to everything we discussed today during sound design meeting. Here is a version with the "random mix" of sounds for staccato by default, and also an option to use the marimba. When on the marimba sound, the pitch won't modulate.

https://phet-dev.colorado.edu/html/ratio-and-proportion/1.0.0-dev.27/phet/ratio-and-proportion_en_phet.html

zepumph commented 4 years ago

Next design meeting it would be nice to take a quick look at the layering done in the c major sin waves. I doubt we will change our strategy now, but it sounds pretty nice no matter.

zepumph commented 4 years ago

We also never discussed @Ashton-Morris's non-melodic sounds. Otherwise, I have done all for this issue that I can right now. Unassigning.

emily-phet commented 4 years ago

To discuss:

zepumph commented 4 years ago

Discussion from design meeting today:

```diff Index: js/common/view/sound/StaccatoFrequencySoundGenerator.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- js/common/view/sound/StaccatoFrequencySoundGenerator.js (revision b0ed1308860a16ca20dbf3306d12c269a531ee6f) +++ js/common/view/sound/StaccatoFrequencySoundGenerator.js (date 1592948920513) @@ -21,11 +21,11 @@ import designingProperties from '../../designingProperties.js'; import RatioAndProportionQueryParameters from '../../RatioAndProportionQueryParameters.js'; -const SUCCESS_OUTPUT_LEVEL = 1; +const SUCCESS_OUTPUT_LEVEL = .8; const INITIAL_PLAYBACK_RATE = 1; // Playback rate will be between 1 and a major third above -const getPlaybackRate = fitness => fitness * ( Math.pow( 2, 4 / 12 ) - INITIAL_PLAYBACK_RATE ) + INITIAL_PLAYBACK_RATE; +const getPlaybackRate = fitness => fitness * ( Math.pow( 2, 7 / 12 ) - INITIAL_PLAYBACK_RATE ) + INITIAL_PLAYBACK_RATE; const BRIGHT_MARIMBA_VALUE = 0; @@ -92,7 +92,13 @@ // @private this.fitnessChanged = true; - fitnessProperty.lazyLink( () => {this.fitnessChanged = true;} ); + let previousFitness = 1; + fitnessProperty.lazyLink( newValue => { + if ( Math.abs( previousFitness - newValue ) > .2 ) { + this.fitnessChanged = true; + previousFitness = newValue; + } + } ); } /** @@ -134,7 +140,7 @@ this.successSoundClip.play(); this.playedSuccessYet = true; } - else if ( this.timeSinceLastPlay > this.timeLinearFunction( newFitness ) && !isInRatio ) { + else if ( true && !isInRatio ) { // Don't modulate pitch for marimba sound if ( designingProperties.staccatoSoundSelectorProperty.value !== BRIGHT_MARIMBA_VALUE ) { ```
zepumph commented 4 years ago

I added a time-consistent staccato sound option above, and made it default. There are two query parameters to control it. The first has a use in the frequency modulated version also (staccatoMinRepeatTime), and in this mode it is the min time between to sounds, regardless of if the fitness changed enough to trigger that sound. The second is what the fitness change threshold is (fitnessChangeThreshold).

Here is an example of a very ugly version of these query parameters, they play to often back to back, and with too little fitness change: http://phettest.colorado.edu/ratio-and-proportion/ratio-and-proportion_en.html?ea&brand=phet&staccatoMinRepeatTime=10&fitnessChangeThreshold=.05

The defaults are http://phettest.colorado.edu/ratio-and-proportion/ratio-and-proportion_en.html?ea&brand=phet&staccatoMinRepeatTime=120&fitnessChangeThreshold=.2 (same as omitting the query parameters)

Please see https://github.com/phetsims/ratio-and-proportion/blob/6cd3eb6c6840c1571244327aa0765e76b1b464b9/js/common/RatioAndProportionQueryParameters.js#L27-L44 for more explanation on the query parameters.

Ashton-Morris commented 4 years ago

Here are some new success sounds.

zepumph commented 4 years ago

From today's sound meeting:

zepumph commented 4 years ago

Now I am just waiting on sounds from @Ashton-Morris. Unassigning.

Ashton-Morris commented 4 years ago

All right @zepumph here are these files

Ashton-Morris commented 4 years ago

My own personal notes have this "Create two versions of the C G C G organ sound and send that in" I think I was going to create a second success variation so it wouldn't sound too repetitive.

@zepumph The dev build wasn't published, can you let me know which organ sound we had in use so I can create a variation of that?

zepumph commented 4 years ago

From design meeting today:

zepumph commented 4 years ago

To discuss for next meeting from me:

I may add more in later.

zepumph commented 4 years ago

I have implemented all my stuff for this issue, and will continue to work on NumberPicker sounds over in https://github.com/phetsims/scenery-phet/issues/612. Unassigning until Tuesday.

Ashton-Morris commented 4 years ago

Here are some faster electric piano sounds with a faster attack

Ashton-Morris commented 4 years ago

I tried to create a woop like John suggested.

I also tried sounds that were closer to a real Accordion but I didn't bounce them because I feel they were too extreme sounding for PhET.

This approach was not appreciated the last time we were creating sounds for opening and closing but I added some white noise sweeps just in case. This is a common UI sounds used in applications and I thought it was a good reference point

All in all I think we'll need to iterate on this to get closer to the correct sound.

jbphet commented 4 years ago

Issue for adding sound to PhET button: https://github.com/phetsims/joist/issues/637

zepumph commented 4 years ago

From design meeting today:

"In Proportion" sound:

"Moving in Proportion" sound:

We want these options created and delivered by Monday so that I will have time to input them before the next meeting which will be either next Tuesday or Wednesday.

zepumph commented 4 years ago

I have nothing to do in this issue until there are sounds for me to add to the sim. Unassigning.

Ashton-Morris commented 4 years ago

"We want these options created and delivered by Monday so that I will have time to input them before the next meeting which will be either next Tuesday or Wednesday." Just read this again. Hope you get time! "In Proportion" sound: in-proportion-fifths-option-1.wav in-proportion-major-chord-option-3.mp3 in-proportion-major-chord-option-3.wav in-proportion-major-chord-option-2.mp3 in-proportion-major-chord-option-2.wav in-proportion-major-chord-option-1.mp3 in-proportion-major-chord-option-1.wav in-proportion-fifths-option-3.mp3 in-proportion-fifths-option-3.wav in-proportion-fifths-option-2.mp3 in-proportion-fifths-option-2.wav in-proportion-fifths-option-1.mp3

"Moving in Proportion" sound: moving-in-proportion-loop-option-4.wav moving-in-proportion-loop-option-3 .wav moving-in-proportion-loop-option-2.wav moving-in-proportion-loop-option-1.wav

zepumph commented 4 years ago

All options above have been implemented. They can be found in this dev link. Looking forward to discussing them tomorrow!

https://phet-dev.colorado.edu/html/ratio-and-proportion/1.0.0-dev.38/phet/ratio-and-proportion_en_phet.html

zepumph commented 4 years ago

Discussion about the Moving in Proportion options:

Discussion about the in Proportion options:

Thoughts about how the moving in proportion sound relates to the in proportion

These are all thoughts, with no direction just yet on what to implement. @BLFiedler and @emily-phet will take a look at the sim tomorrow and see if there are any implementation options to try to add. Keeping in mind that this is in addition to the change I just made in https://github.com/phetsims/ratio-and-proportion/commit/77f0c610f1c41928c87f166460a1ec64da24fd73

The goal for next week's meeting is for everyone to come to it with a combination of sounds that they think works well together, and for us to discuss which ones to implement as sets, instead of just individual sounds.

emily-phet commented 4 years ago

@zepumph @BLFiedler - I played with the sim this morning quite a bit. I think the dev 40 paradigm for mutually exclusive in proportion, success, and choir sounds is good.

I think the choir sound could tail off faster. Sometimes it feels like I can still hear it even if I'm quite far off the ratio position.

If @BLFiedler agrees, I think we move to all using the sim with the different sound combinations, and listing out preferred options (considering all the sounds together).

brettfiedler commented 4 years ago

Yeah - I think this is plenty smooth. The staccato and in-prop sounds seem to play when you move far enough out and/or re-enter just fine.

re: choir sound tailing off: I think this is particularly noticeable when you lock the ratio. There is a time delay between ending movement and the choir sound stopping. I agree that delay could be shorter so it's not still playing if you stop or leave the proper proportion.

Side note: @zepumph, I discovered if you select the Peaceful Tranquility velocity sound and then hit the reset button (iPad, Safari) it locks all interaction with the simulation. Only that sound option though. Made an issue: #97

zepumph commented 4 years ago

Side note: @zepumph, I discovered if you select the Peaceful Tranquility velocity sound and then hit the reset button (iPad, Safari) it locks all interaction with the simulation. Only that sound option though. Made an issue: #97

Should now be fixed

I think the choir sound could tail off faster. Sometimes it feels like I can still hear it even if I'm quite far off the ratio position.

This could be a bug, or could be our current fade out time of .2 seconds. I'll try decreasing that to .1 to see if that is better. I'll get back to you after some investigation.

All other sound options have been implemented on master.

emily-phet commented 4 years ago

Sounds like we're all set to come up with our list of favorite combinations, in preparation for Tuesday. I'll let all know to do this in the RaP slack channel. :)

emily-phet commented 4 years ago

Note - there are still some remaining to dos for @zepumph and @Ashton-Morris in this: https://github.com/phetsims/ratio-and-proportion/issues/9#issuecomment-662725606 above.

Ashton-Morris commented 4 years ago

I have this here. ^__^

emily-phet commented 4 years ago

My thoughts re staccato success sound and velocity sound.

I'd be fine with any combination of "Fifths option 2", "Chord option 2" for the staccato success sound, and "Choir" or "Peaceful + Choir = nirvana" :) sound.

My top two favorites are: 1) Fifths option 2 + choir 2) Chord option 2 + choir

Some thoughts on these preferences:

emily-phet commented 4 years ago

@zepumph There were times when I thought I was hearing sound feedback when the screen looked white. Is this the case, or is the tolerance such that the screen just happens to look white because it's a super subtle shade of green? If it's the case that the background is exactly white but providing sound feedback, we should discuss if we want this to happen tomorrow.

zepumph commented 4 years ago

After https://github.com/phetsims/ratio-and-proportion/commit/3523bc99cd94018890f94f2c585e5d4a2a4526f9, now the ?movingInProportionThreshold query parameter takes the value in "distance from max fitness" instead of distance from min fitness. So the value used to be .7, but now it is .3.

zepumph commented 4 years ago

Notes from adding the new combined wav sound:

zepumph commented 4 years ago

Everything has been implemented from the above checkboxes.

If it's the case that the background is exactly white but providing sound feedback, we should discuss if we want this to happen tomorrow.

I have not seen this, but will be on the lookout. Please create a new issue if you can consistently reproduce. I'm pretty sure that it is just a very faint shade of green. Hopefully logging added in #103 will help see that.


My thoughts about combos:

Looking forward to tomorrows chat!

jbphet commented 4 years ago

As requested by @emily-phet, I spent some time reviewing the latest dev version (https://phet-dev.colorado.edu/html/ratio-and-proportion/1.0.0-dev.41/phet/ratio-and-proportion_en_phet.html) and have the following comments:

zepumph commented 4 years ago

The hysteresis for playing the "in proportion" sound is too much when not doing dual drag. and The "in proportion" sound should play every time the threshold is crossed. As it is now, some fast crossings don't cause it to play.

This was fixed in master in https://github.com/phetsims/ratio-and-proportion/commit/b643b7a894efc85a2c3900d42cdbaa8516e9c034 and was a bullet from a previous design meeting, see https://github.com/phetsims/ratio-and-proportion/issues/9#issuecomment-662725606:

The hysteresis option is weird when just moving a single value, as fine tuning it can yield just a flash of green, and no sound. Perhaps it should only be implemented for when moving in proportion.

brettfiedler commented 4 years ago

The velocity sounds are reaaalllyyy quiet for me relative to the in/out of prop sounds, so this was a little harder to assess how rich/crowded the soundspace was, but:

Could we maybe consider playing a minimum amount of a success sound that we consider the "core" part before it rings out? It does feel a little weird to let go and have some of the arpeggiated sound cut out so quickly. This may also address John's comment on sounds sometimes not playing. I suspect it may be triggering, but getting cut off just as quickly?

zepumph commented 4 years ago

From sound design meeting today:

zepumph commented 4 years ago

Some notes to look at when (if) we come back to fine tune the Choir + Peaceful and Fifths 2 sound combo:

zepumph commented 4 years ago

Once the above is implemented, we can close this issue. As stuff comes out of interviews, we can make more issues for it.

zepumph commented 4 years ago

Alright! All has been implemented and cleaned up. Let's create new issues from here as we fine tune our sounds. Good work team!